Popover

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

<Dialog>
  <Button aria-label="Help">
    <InfoIcon />
  </Button>
  <Popover>
    <DialogContent className="w-56 space-y-4">
      <DialogHeading>Need help?</DialogHeading>
      <p>
        If you&apos;re having issues accessing your account, contact our
        customer support team for help.
      </p>
    </DialogContent>
  </Popover>
</Dialog>

Installation

pnpm dlx 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, DialogHeading } from "@/components/ui/dialog";
import { Popover } from "@/components/ui/popover";
<Dialog>
  <Button>Open Popover</Button>
  <Popover>
    <DialogContent>
      <DialogHeading>Popover Title</DialogHeading>
      <p>Popover content</p>
    </DialogContent>
  </Popover>
</Dialog>

Playground

Use the controls below to experiment with different popover props and see the live preview and code update.

placement

API Reference

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

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

Last updated on 12/21/2025

dotUI

Bringing singularity to the web.

Built with passion by @mehdibha.