‮Skip to content‬
uiify

Popup

‮Popover surface anchored to its trigger.‬

‮Browsers‬
Chrome 114+Firefox 125+Safari 17+
‮Tier‬
0
‮Bundle compressed‬
883 B
‮Forced layout budget‬
0 ms
‮Axe budget‬
0
‮SSR compatible‬
‮Yes‬
‮Built on‬
elements/popover
‮Published contract‬
‮Test harness‬

‮Playground‬

Popup

Preferences

Invite teammate

Manual dismissal

‮API‬

PopupTrigger

‮Prop‬‮Type‬‮Default‬‮Description‬
target*string—‮Id of the PopupContent this button toggles; the browser handles the toggle, light dismiss and Escape without hydration.‬
childrenReactNode—‮Content of the trigger button.‬
asTAs & NativeButtonAs<TAs>"button"‮A component that forwards props and ref to a native button; other tags are rejected, because invoker commands need a real button.‬

PopupContent

‮Prop‬‮Type‬‮Default‬‮Description‬
id*string—‮Unique id supplied by the consumer; referenced by the trigger and close.‬
side"top" | "right" | "bottom" | "left""bottom"‮Side of the trigger the surface is anchored to.‬
align"start" | "center" | "end""center"‮Alignment of the surface along the chosen side.‬
mode"auto" | "manual""auto"‮Popover behavior: "auto" closes on outside click and Escape, "manual" stays open until a close invoker hides it.‬
childrenReactNode—‮Content of the popover surface.‬

PopupClose

‮Prop‬‮Type‬‮Default‬‮Description‬
target*string—‮Id of the PopupContent this button hides.‬
childrenReactNode—‮Content of the close button.‬
asTAs & NativeButtonAs<TAs>"button"‮A component that forwards props and ref to a native button; other tags are rejected, because invoker commands need a real button.‬

Popup.Root (legacy compound)

‮Prop‬‮Type‬‮Default‬‮Description‬
id*string—‮Stable id for the popover surface and invoker commands, injected into the direct Trigger, Content and Close children.‬
mode"auto" | "manual" | "hint""auto"‮Popover behavior passed down to the Content surface.‬
classNamestring—‮Class applied to the wrapping element.‬
childrenReactNode—‮The Trigger, Content and Close parts.‬

Popup.Trigger (legacy compound)

‮Prop‬‮Type‬‮Default‬‮Description‬
classNamestring—‮Class applied to the trigger button.‬
childrenReactNode—‮Content of the trigger button.‬

Popup.Content (legacy compound)

‮Prop‬‮Type‬‮Default‬‮Description‬
side"top" | "right" | "bottom" | "left""bottom"‮Side of the trigger the surface is anchored to.‬
align"start" | "center" | "end""center"‮Alignment of the surface along the chosen side.‬
classNamestring—‮Class applied to the popover surface.‬
childrenReactNode—‮Content of the popover surface.‬

Popup.Close (legacy compound)

‮Prop‬‮Type‬‮Default‬‮Description‬
classNamestring—‮Class applied to the close button.‬
childrenReactNode—‮Content of the close button.‬

‮Keyboard‬

‮Key‬‮Action‬
Escape‮Dismiss‬
Tab‮Move into popup content when open‬

‮Accessibility‬

‮Native Popover API: a popovertarget invoker toggles the surface before any JavaScript runs; the browser owns light dismiss, Escape and nesting, and anchors the surface to the invoker that opened it.‬

‮Styling hooks‬

data-sidedata-aligndata-positioningdata-uiify-popupdata-part="trigger|content|close"--uiify-trigger-open (inside [data-uiify-popup][data-part="root"])