OPUS/UI

Navigation

Popover

Click-to-open floating panel with an optional arrow, collision flipping, focus handoff and Esc/outside dismiss.

6 files · 293 locdeps: clsx, tailwind-merge

Installation

With the shadcn CLI, pointing at this platform’s registry:

npx shadcn@latest add https://opusui.131199999.xyz/r/popover.json

Or offline, straight from your opus55 checkout (copies every file it needs):

node ../tailwind_component/opus55/scripts/add.mjs popover

Usage

import { Popover } from "@/components/opus/ui/popover";

<Popover trigger={<Button>Edit</Button>}>{(close) => <Form onDone={close} />}</Popover>

API

PropTypeDefaultDescription
triggerReactElement—Toggle element.
childrenReactNode | (close) => ReactNode—Content.
open / defaultOpen / onOpenChangeboolean—State.
side / align / offset / arrow——Placement.

Command palette