Tooltip
Hover/focus popup with descriptive text
Start Here
Start from the smallest working snippet, then move to interactive examples and the full API contract below.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
<script lang="ts">
import '@dryui/ui/themes/default.css';
import '@dryui/ui/themes/dark.css';
import { Tooltip } from '@dryui/ui';
</script>
<Tooltip.Root>
<Tooltip.Trigger>
<Button variant="ghost">Hover me</Button>
</Tooltip.Trigger>
<Tooltip.Content>Extra information</Tooltip.Content>
</Tooltip.Root>Import options
Root package
import { Tooltip } from '@dryui/ui'Per-component subpath
import { Tooltip } from '@dryui/ui/tooltip'Customize
Use the interactive examples to see common variants, states, and composition patterns before building your own.
Basic Tooltip
<Tooltip.Root>
<Tooltip.Trigger>Hover me</Tooltip.Trigger>
<Tooltip.Content>This is a helpful tooltip</Tooltip.Content>
</Tooltip.Root>Tooltip with delay
<Tooltip.Root openDelay={500} closeDelay={200}>
<Tooltip.Trigger>Hover for delayed tooltip</Tooltip.Trigger>
<Tooltip.Content>Appears after 500ms delay</Tooltip.Content>
</Tooltip.Root>Tooltip on button
<Tooltip.Root>
<Tooltip.Trigger>
<Button variant="ghost">?</Button>
</Tooltip.Trigger>
<Tooltip.Content>Click for help documentation</Tooltip.Content>
</Tooltip.Root>Structure
Compound components always start with Tooltip.Root. Use this structure block to understand required wrappers before you wire state or styling.
Tooltip.Root Tooltip.Trigger Tooltip.Content
Compose
The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.
Compound component. Start with Tooltip.Root, then add only the parts you need.
Tooltip.Root
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
openDelay | number | — | — | — |
closeDelay | number | — | — | — |
children | Snippet | — | ✓ | — |
Also accepts standard HTML attributes (class, style, id, etc.)
Tooltip.Trigger
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
children | Snippet | — | ✓ | — |
Forwards <span> attributes via rest props. Common examples: id, style, aria-label.
Tooltip.Content
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
offset | number | — | — | — |
children | Snippet | — | ✓ | — |
Forwards <div> attributes via rest props. Common examples: id, style, role.