Hyunsui
Docs
Tooltip
Lightweight descriptions that stay pinned to their trigger with precise positioning and accessibility baked in.
Anatomy
Import the parts you need and compose them freely.
API Reference
Root
Handles both controlled and uncontrolled open state, wires scroll/outside click/ESC dismissal, and connects Floating UI positioning.
PropTypeDefault
open
boolean-
defaultOpen
booleanfalse
onOpenChange
function-
placement
"top" | "bottom" | "left" | "right""right"
offset
number8
closeOnScroll
booleantrue
closeOnOutside
booleantrue
closeOnEscape
booleantrue
disabled
booleanfalse
Data AttributeValue
data-state
"open" | "closed"
data-disabled
""
Trigger
Interactive button that toggles the tooltip on click and automatically closes on blur.
PropTypeDefault
type
stringbutton
onClick
function-
Content
Renders inside a portal, can stay mounted with forceMount, exposes data-state and data-positioned for animation control, and closes itself on click.
PropTypeDefault
forceMount
booleanfalse
container
Element | DocumentFragment | nulldocument.body
Data AttributeValue
data-state
"open" | "closed"
data-placement
"top" | "bottom" | "left" | "right"
data-positioned
""