Tooltip
Tooltip displays informational text when hovering over or focusing on an element.
Import
import { Tooltip, Button, Badge, Row, Flex } from '@sigx/daisyui';
Basic Usage
Loading preview...
Force Open
Use the open prop to force the tooltip to be visible.
Loading preview...
Positions
Loading preview...
Colors
Loading preview...
Custom Content
Use Tooltip.Content for rich tooltip content instead of plain text.
Loading preview...
Responsive
Use Tailwind responsive prefixes on the class prop to control tooltip visibility at different breakpoints.
Loading preview...
Props
Tooltip
| Prop | Type | Default | Description |
|---|---|---|---|
tip | string | undefined | Tooltip text (sets data-tip attribute) |
position | 'top' | 'bottom' | 'left' | 'right' | undefined (top) | Position of the tooltip |
color | 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | undefined | Color variant |
open | boolean | false | Force the tooltip to be visible |
class | string | undefined | Additional CSS classes |
Tooltip.Content
| Prop | Type | Default | Description |
|---|---|---|---|
class | string | undefined | Additional CSS classes |