Skip to Content
Puzzle

Popout

Low-level anchored positioning for custom floating content.

Import

import { Popout } from "@puzzle-ui/ui";

Trigger and placement

Popout positions content and handles opening/dismissal without imposing menu, tooltip, or dialog semantics. Use Popover or Tooltip for their higher-level interactions.

390 × 350

API

PropTypeDefaultDescription
triggerReactElement<PopoutTriggerProps>RequiredElement that forwards refs and event handlers.
childrenReactNodeRequiredFloating content.
position"top" | "right" | "bottom" | "left""bottom"Preferred side, adjusted for collisions.
align"start" | "center" | "end""start"Alignment on the chosen side.
action"hover" | "click" | "down""click"Pointer opening strategy.
offset, collisionPaddingnumber8Pixel distances from trigger and viewport edges.
exitDelaynumber150Hover-close delay in milliseconds.
open, defaultOpenbooleanfalseControlled/initial open state.
onOpenChange(open: boolean) => void-State changes.
closeOnOutsideClick, closeOnEscapebooleantrueDismissal behavior.
toggleOnClickbooleanfalseAllow repeated trigger clicks to close.
matchTriggerWidthbooleanfalseMatch floating width to trigger.
className, contentClassNamestring-Floating wrapper/content classes.

Supply appropriate accessible relationships for custom interactive content. Hover-only opening must not be the only way to reach essential information. Do not use a disabled element as the only trigger.

;