Skip to content

Browse components

← All components

Popover

Floating popover anchored to a trigger.

Install
npx shadcn@latest add https://ui.anuragroy.dev/r/popover.json

Preview

Loading preview…

Installation

Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.

Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/popover.json

GitHub fallback if the website is down:

Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/popover.json

Usage

Import paths follow your components.json aliases. After install, the default path is @/components/ui/popover.

Import
import {  Popover,  PopoverContent,  PopoverDescription,  PopoverTitle,  PopoverTrigger} from "@/components/ui/popover"
example.tsx
import { Button } from "@/components/ui/button"import {  Popover,  PopoverContent,  PopoverDescription,  PopoverTitle,  PopoverTrigger,} from "@/components/ui/popover"export function Example() {  return (    <Popover>      <PopoverTrigger render={<Button variant="outline" />}>        Open popover      </PopoverTrigger>      <PopoverContent>        <PopoverTitle>Popover</PopoverTitle>        <PopoverDescription>          Floating content anchored to the trigger.        </PopoverDescription>      </PopoverContent>    </Popover>  )}

API Reference

Popover

Base UI Popover root.

PropTypeDefault
openboolean—
onOpenChange(open: boolean) => void—