Tooltip

The main tooltip component that manages state and positioning.

Read more Read less

Options

  • :id - Unique identifier for the tooltip (optional, auto-generated if not provided).
  • :open-delay - Delay in milliseconds before opening the tooltip. Defaults to 150.
  • :close-delay - Delay in milliseconds before closing the tooltip. Defaults to 100.
  • :on-open - Handler for tooltip open event.
  • :on-close - Handler for tooltip close event.
  • :class - Additional CSS classes.
Attribute Type Documentation Default Value
id :string
open-delay :integer

Delay in milliseconds before opening the tooltip

150
close-delay :integer

Delay in milliseconds before closing the tooltip

100
on-open :any

Handler for tooltip open event

on-close :any

Handler for tooltip close event

class :string
rest :global
Required inner_block * :slot
<.tooltip_trigger>
  <.button variant="outline">Styled tooltip</.button>
</.tooltip_trigger>
<.tooltip_content class="bg-primary text-primary-foreground border-primary">
  <p>I have custom styling!</p>
</.tooltip_content>