Swirski UI

Interaction

Tooltip

A compact hover/focus label for icon buttons and dense UI.

Component

17

Request Changes

Import

import { Tooltip } from "@swirski/ui";

Playground

3 controls

Controls

Usage

<Tooltip content="Helpful context">
  <Button tone="blue">
    Hover me
  </Button>
</Tooltip>

Props

6 generated
PropTypeDefaultNotes
asChildbooleanfalseGenerated from TooltipProps.
childrenRequiredReactNode-Element that owns the tooltip.
contentRequiredstring | (React.ReactElement<unknown, string | React.JSXElementConstructor<any>> & string) | (Iterable<ReactNode> & string) | (React.ReactPortal & string) | (Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null> & string)-Tooltip label content.
size'sm' | 'md'"md"Generated from TooltipProps.
tone'yellow' | 'black'"black"Generated from TooltipProps.
variant'default'"default"Generated from TooltipProps.
classNamestring-Adds classes to the tooltip wrapper.
Previous: DropdownMenuNext: Tabs