Sections
Installation
Components
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"Installation#
pnpm dlx shadcn@latest add https://retroui.dev/r/base/popover.json
Usage#
import {
Popover,
PopoverContent,
PopoverDescription,
PopoverHeader,
PopoverTitle,
PopoverTrigger,
} from "@/components/ui/popover"<Popover>
<PopoverTrigger render={<Button variant="outline" />}>
Open Popover
</PopoverTrigger>
<PopoverContent>
<PopoverHeader>
<PopoverTitle>Title</PopoverTitle>
<PopoverDescription>Description text here.</PopoverDescription>
</PopoverHeader>
</PopoverContent>
</Popover>Composition#
Use the following composition to build a Popover:
Popover
├── PopoverTrigger
└── PopoverContentExamples#
Basic#
A simple popover with a header, title, and description.
import { Button } from "@/components/ui/button"
import {
Popover,Align#
Use the align prop on PopoverContent to control the horizontal alignment.
import { Button } from "@/components/ui/button"
import {
Popover,With Form#
A popover with form fields inside.
import { Button } from "@/components/ui/button"
import { Field, FieldGroup, FieldLabel } from "@/components/ui/field"
import { Input } from "@/components/ui/input"RTL#
To enable RTL support in RetroUI, see the RTL configuration guide.
"use client"
import {API Reference#
See the Base UI Popover documentation.