Skip to content

Popover

Feedback

Floating content panel triggered by a button click. Used for filters and mini-forms.

Editable popoverCentered alignment
Open preview

Responsive viewport — resize the window to explore. Direction and density apply only to this preview. Theme applies to the docs too.

Usage

Use for compact contextual controls. Compose PopoverTrigger and PopoverContent; keep larger forms in a Dialog or Sheet. Position with side and align.

Import
import {
  Popover,
  PopoverTrigger,
  PopoverContent,
} from "@dashboardpack/core/components/ui/popover";

Available in the included @dashboardpack/core package. Copy the complete example from Source code for all imports and state. Add "use client" when using hooks or event handlers. See installation and theming for project setup.

API reference

Common props and defaults. Slot-specific props are named below; native elements also accept their standard HTML attributes. The component TypeScript definitions are the complete type reference.

Popover props
PropType / DefaultDescription
open / defaultOpenboolean

Default: false

Controlled or initial visibility.
onOpenChange(open: boolean) => void

Default: —

Handle visibility changes.
align (PopoverContent)start | center | end

Default: center

Alignment relative to the trigger.
side (PopoverContent)top | right | bottom | left

Default: bottom

Preferred placement.
sideOffset (PopoverContent)number

Default: 0

Gap from the trigger.

Build with these too