An accessible popover panel anchored to a trigger button, with title, description, and optional compact tooltip styling, built on Base UI.
import { Popover, PopoverDescription, PopoverPopup, PopoverTitle, PopoverTrigger, } from "@/components/ui/popover"; export default function PopoverDemo() { return ( <div className="flex min-h-64 items-center justify-center"> <Popover> <PopoverTrigger className="inline-flex h-9 items-center justify-center rounded-lg border bg-background px-4 text-sm font-medium shadow-sm outline-none transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring"> Open Popover </PopoverTrigger> <PopoverPopup className="w-80"> <PopoverTitle className="text-base">Send us feedback</PopoverTitle> <PopoverDescription> Let us know how we can improve. </PopoverDescription> </PopoverPopup> </Popover> </div> ); }
Part of Cnippet — browse the full library on 21st.dev.