Skip to content

Tooltip ​

Informational tooltip that appears on hover over an element, with configurable delay and directional arrow.

Tooltip

Design lines ​

vue
1<Tabs defaultValue="tuix">2  <TabsList>3    <Tab value="tuix">TUIX</Tab>4    <Tab value="rubik">Rubik</Tab>5  </TabsList>6  <TabPanel value="tuix">7    <div class="tooltip-demo">8      <Tooltip text="Copy to clipboard" design="tuix">9        <Button icon="📋" fill="outline" color="primary">Copy</Button>10      </Tooltip>11    </div>12  </TabPanel>13  <TabPanel value="rubik">14    <div class="tooltip-demo">15      <Tooltip text="Copy to clipboard" design="rubik">16        <Button icon="📋" fill="outline" color="primary">Copy</Button>17      </Tooltip>18    </div>19  </TabPanel>20</Tabs>

Demo ​

Position (position) ​

Posición relativa al trigger.

vue
1<Tooltip text="Top" position="top"><Button>Top</Button></Tooltip>2<Tooltip text="Bottom" position="bottom"><Button>Bottom</Button></Tooltip>3<Tooltip text="Left" position="left"><Button>Left</Button></Tooltip>4<Tooltip text="Right" position="right"><Button>Right</Button></Tooltip>

Color (color) ​

Color del borde y flecha.

vue
1<Tooltip text="Primary" color="primary"><Button>Primary</Button></Tooltip>2<Tooltip text="Success" color="success"><Button>Success</Button></Tooltip>3<Tooltip text="Warning" color="warning"><Button>Warning</Button></Tooltip>4<Tooltip text="Danger" color="danger"><Button>Danger</Button></Tooltip>

Delay (delay) ​

Milisegundos antes de mostrar.

vue
1<Tooltip text="Instant" :delay="0"><Button>Instant</Button></Tooltip>2<Tooltip text="Default" :delay="300"><Button>Default</Button></Tooltip>3<Tooltip text="Slow" :delay="1000"><Button>Slow</Button></Tooltip>

Content (text) ​

Texto del tooltip.

vue
1<Tooltip text="Help message"><Button>Hover me</Button></Tooltip>

Props ​

PropTypeDefaultDescription
textstring''Tooltip content
position'top' | 'bottom' | 'left' | 'right''top'Position relative to the trigger
color'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark''primary'Border and arrow color
delaynumber300Milliseconds before showing
design'tuix' | 'rubik'— (inherits from data-design)Design line (or inherit from data-design).

Slots ​

SlotDescription
defaultTooltip trigger (the element that hovers to show the tooltip). When the slot is used, the text prop is ignored.

CSS Custom Properties ​

TokenDefaultDescription
--font-mono"JetBrains Mono", ui-monospace, monospaceMonospace font stack for code-like content (key labels, log lines, chips).
--accentfrom theme (--ctp-latte-mauve / --ctp-mocha-mauve)Accent color, mapped from the active semantic color.
--bgfrom theme (--ctp-latte-base / --ctp-mocha-base)Base background of the surface.
--bg-elevatedfrom theme (--ctp-latte-surface0 / --ctp-mocha-surface0)Background of floating surfaces (modals, dropdowns, popovers).
--textfrom theme (--ctp-latte-text / --ctp-mocha-text)Primary text color used inside the component.
--cp-ease-snapcubic-bezier(.3, 1.4, .5, 1)Snap easing (overshoots) for pop interactions.

Ver Theming para la convención completa.