The Tooltip component displays a contextual hint that appears when hovering over a trigger element.
It provides a simple way to show additional information without requiring a click.
} from ' @fintech-sandpit/ui/react ' ;
< Tooltip.Trigger asChild >
< Button colorScheme = " primary " >
This is a tooltip message
} from ' @fintech-sandpit/ui/vue ' ;
< Button color-scheme = " primary " >
This is a tooltip message
Name Type Default Description openboolean— Whether the tooltip is open (controlled) defaultOpenbooleanfalseWhether the tooltip is open by default (uncontrolled) positioningPositioningOptions— Positioning options for the tooltip. See PositioningOptions type below.
Name Type Default Description openboolean— Whether the tooltip is open (controlled) default-openbooleanfalseWhether the tooltip is open by default (uncontrolled) positioningPositioningOptions— Positioning options for the tooltip. See PositioningOptions type below.
Name Type Default Description asChildbooleanfalseWhen true, merges props with the child element instead of rendering a wrapper
Name Type Default Description as-childbooleanfalseWhen true, merges props with the child element instead of rendering a wrapper
Name Arguments Description onOpenChange(details: { open: boolean }) => voidCallback fired when open state changes
Name Arguments Description @open-change(details: { open: boolean }) => voidCallback fired when open state changes
type PositioningOptions = {
placement ?: ' top ' | ' top-start ' | ' top-end ' | ' bottom ' | ' bottom-start ' | ' bottom-end ' | ' left ' | ' left-start ' | ' left-end ' | ' right ' | ' right-start ' | ' right-end '
offset ?: { mainAxis ?: number ; crossAxis ?: number }
The root component that manages the tooltip state and provides context to child components. Supports both controlled and uncontrolled usage.
The element that triggers the tooltip when hovered over. Use asChild prop to merge props with a child element.
The main content container for the tooltip. Automatically includes positioning and portal rendering.