43 Pro components and page blocks

Get Pro

Popover

Preview

Customize

Below
Centre
Offset10px

Usage

import { Popover } from "@/components/uibrik/popover/popover";

<Popover content={content}>…</Popover>

Installation

npx shadcn@latest add https://uibrik.com/r/popover.json
Adds the files to components/uibrik/popover and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/popover.

Props

Popover
side
Type "bottom" | "top" | "right" | "left"
"bottom"
Preferred side. Flips when there isn't room.
align
Type "start" | "center" | "end"
"center"
Which part of the button the panel lines up with.
arrow
Type boolean
true
A small arrow pointing at the button.
offset
Type number
10
Gap between button and panel.
childrenrequired
Type ReactNode
–
The button that opens the popover.
contentrequired
Type ReactNode | (close) => ReactNode
–
What's inside.
label
Type string
–
Accessible name for the panel.
open / onOpenChange
Type boolean / (open) => void
–
Controlled open state.
className
Type string
–
Classes for the panel's content box (padded by default).