110k
New

Popover

Displays rich content in a portal, triggered by a button.

Component popover-demo not found in registry.

Installation

pnpm dlx createui@latest add popover

Usage

import {
  Popover,
  PopoverContent,
  PopoverDescription,
  PopoverHeader,
  PopoverTitle,
  PopoverTrigger,
} from "@/components/ui/popover"
<Popover>
  <PopoverTrigger asChild>
    <Button variant="outline">Open Popover</Button>
  </PopoverTrigger>
  <PopoverContent>
    <PopoverHeader>
      <PopoverTitle>Title</PopoverTitle>
      <PopoverDescription>Description text here.</PopoverDescription>
    </PopoverHeader>
  </PopoverContent>
</Popover>

Examples

Basic

A simple popover with a header, title, and description.

Component popover-basic not found in registry.

Align

Use the align prop on PopoverContent to control the horizontal alignment.

Component popover-alignments not found in registry.

With Form

A popover with form fields inside.

Component popover-form not found in registry.

API Reference

See the Radix UI Popover documentation.