Overlays and menus

Popover

A positioned non-modal surface with accessible trigger, focus, and dismissal behavior.

⠋

Install

npx shadcn@latest add https://4af.selfsimilar.dev/r/popover.json

Usage

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

<Popover>
  <PopoverTrigger>Open</PopoverTrigger>
  <PopoverContent>Popover content</PopoverContent>
</Popover>

API

Main exports: Popover and its trigger, close, content, header, title, and description parts

An interactive anchored panel with Base UI positioning and optional modal behaviour. The demo also shows a Select dropdown and Switch composed inside the panel body.

On this page