Skip to main content

Popover

A popover displays content in a floating container that appears above other content.

On this page
Props
<Dialog>
  <Button>Open Popover</Button>
  <Popover>
    <DialogContent className="w-56">
      <DialogTitle>Popover Title</DialogTitle>
      <p className="text-sm text-fg-muted">This is a popover with some content. You can put any content here.</p>
    </DialogContent>
  </Popover>
</Dialog>

Installation

npx shadcn@latest add @dotui/popover

Usage

Use popovers to display rich content in a floating container that appears above other content.

import { Button } from '@/components/ui/button'
import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog'
import { Popover } from '@/components/ui/popover'
<Dialog>
  <Button>Open Popover</Button>
  <Popover>
    <DialogContent>
      <DialogTitle>Popover Title</DialogTitle>
      <p>Popover content</p>
    </DialogContent>
  </Popover>
</Dialog>

Examples

API Reference

A popover is an overlay element positioned relative to a trigger.

PropType
boolean
Element
number
RefObject<Element | null>
Element
ReactNode | function
((target: Element) => DOMRect | null | undefined)
boolean
boolean
boolean
boolean
number
Placement
RefObject<Element | null>
function
boolean
string
RefObject<Element | null>

Last updated on 6/16/2026