"use client";
import { Tooltip } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
content (required) | ReactNode | — | Tooltip text (keep it short; it is not focusable). |
closeDelay | number | 150 | Hide delay after the pointer leaves, in ms (default 150). |
container | Element | DocumentFragment | null | document.body | Portal container (default document.body). |
defaultOpen | boolean | — | Initial open state when uncontrolled. |
disabled | boolean | — | Disables interaction. |
longPressDelay | number | 500 | Long-press duration that shows the tooltip on touch, in ms (default 500). |
mode | "description" | "label" | description | description (default): the tooltip describes the trigger (aria-describedby). label: it names it (aria-labelledby), for icon-only buttons without their own label. |
onOpenChange | (open: boolean) => void | — | Called with the next open state. |
open | boolean | — | Open state (controlled). |
openDelay | number | 400 | Hover delay before showing, in ms (default 400). |
placement | FloatingPlacement | — | Where it sits relative to its anchor (start/end follow the writing direction). |
contentrequiredReactNode
Tooltip text (keep it short; it is not focusable).
closeDelaydefault 150number
Hide delay after the pointer leaves, in ms (default 150).
containerdefault document.bodyElement | DocumentFragment | null
Portal container (default document.body).
defaultOpenboolean
Initial open state when uncontrolled.
disabledboolean
Disables interaction.
longPressDelaydefault 500number
Long-press duration that shows the tooltip on touch, in ms (default 500).
modedefault description"description" | "label"
description (default): the tooltip describes the trigger (aria-describedby). label: it names it (aria-labelledby), for icon-only buttons without their own label.
onOpenChange(open: boolean) => void
Called with the next open state.
openboolean
Open state (controlled).
openDelaydefault 400number
Hover delay before showing, in ms (default 400).
placementFloatingPlacement
Where it sits relative to its anchor (start/end follow the writing direction).
Other props are passed to the root element (HTMLAttributes<HTMLSpanElement>), including className, style, id and aria-* attributes.
<Tooltip content="Search">...</Tooltip>