Popover

A floating panel that displays information or interactive content, triggered by a button.

Installation

$ npx shadcn@latest add "/r/popover.json"

Usage

Side and Align

Control the position of the popover using the side and align props.

Props

PopoverContent

PropTypeDefaultDescription
side"top" | "bottom" | "left" | "right""bottom"The preferred side of the trigger to render against when open.
sideOffsetnumber10The distance in pixels from the trigger.
align"start" | "center" | "end""center"The preferred alignment against the trigger.
classNamestring-Additional CSS classes to apply to the content.