Zephora UI

Data

Tooltip

Text hint shown on hover (after a delay) and on keyboard focus. Rendered in a portal with role tooltip and wired to the trigger via aria-describedby.

Import

import { Tooltip } from "@zephora/react";

Examples

Basic

Hover or focus the button to reveal the tooltip.

Placement

No delay

`delay` only applies to pointer hover — focus always opens immediately.

API

Tooltip props

PropTypeDefaultDescription
content *ReactNodeTooltip text / node.
children *ReactElementSingle trigger element; handlers and `aria-describedby` are cloned onto it.
placementPlacement"top"Preferred side / alignment relative to the trigger.
delaynumber200Open delay in ms for pointer hover (focus opens immediately).
showArrowbooleantrueRenders a small arrow pointing at the trigger. The bubble and arrow expose the resolved side via a data-side attribute for CSS targeting.
disabledbooleanfalseNever opens while true.
open / defaultOpen / onOpenChangeboolean / boolean / (open: boolean) => voidControlled and uncontrolled open state.
classNamesPartial<Record<"root" | "arrow", string>>Per-slot class overrides: root targets the bubble (alongside className), arrow the arrow element. Applied after module classes and also in unstyled mode.
unstyledbooleanfalseHeadless mode — skips Zephora styling.

Keyboard

KeyAction
TabFocusing the trigger opens the tooltip immediately.
EscapeCloses the open tooltip.