--- title: Popover description: Displays rich content in a portal, triggered by a button. base: aria component: true links: doc: https://react-aria.adobe.com/Popover api: https://react-aria.adobe.com/Popover#api --- ## Installation Command Manual ```bash npx shadcn@latest add popover ``` Install the following dependencies: ```bash npm install react-aria-components ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { Popover, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, } from "@/components/ui/popover" ``` ```tsx showLineNumbers Title Description text here. ``` ## Composition Use the following composition to build a `Popover`: ```text PopoverTrigger ├── Button └── Popover ``` ## Basic A simple popover with a header, title, and description. ## Align Use the `placement` prop on `Popover` 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 [React Aria Popover](https://react-aria.adobe.com/Popover#api) documentation.