--- title: Popover description: Displays rich content in a portal, triggered by a button. base: base component: true links: doc: https://base-ui.com/react/components/popover api: https://base-ui.com/react/components/popover#api-reference --- ## Installation Command Manual ```bash npx shadcn@latest add popover ``` Install the following dependencies: ```bash npm install @base-ui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, } from "@/components/ui/popover" ``` ```tsx showLineNumbers }> Open Popover Title Description text here. ``` ## Examples ### Basic A simple popover with a header, title, and description. ### Align Use the `align` prop on `PopoverContent` to control the horizontal alignment. ### With Form A popover with form fields inside. ## RTL To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl). ## API Reference See the [Base UI Popover](https://base-ui.com/react/components/popover#api-reference) documentation.