Components
Popover
A floating tonal surface anchored to a trigger element, supporting rich content, actions, and spring entrance motion.
import { Button } from "@/components/ui/button";
import {
Popover,
PopoverDescription,
PopoverPopup,
PopoverTitle,
PopoverTrigger,
} from "@/components/ui/popover";
export default function Particle() {
return (
<Popover>
<PopoverTrigger
render={<Button variant="outline">Open Popover</Button>}
/>
<PopoverPopup>
<PopoverTitle>What's new</PopoverTitle>
<PopoverDescription>
We just shipped a major update with new components and improved
performance across the board.
</PopoverDescription>
</PopoverPopup>
</Popover>
);
}
Installation
pnpm dlx shadcn@latest add @taut-ui/popover
Usage
import { Button } from "@/components/ui/button"
import {
Popover,
PopoverActions,
PopoverClose,
PopoverDescription,
PopoverPopup,
PopoverTitle,
PopoverTrigger,
} from "@/components/ui/popover"<Popover>
<PopoverTrigger render={<Button variant="outline">Open Popover</Button>} />
<PopoverPopup>
<PopoverTitle>Popover Title</PopoverTitle>
<PopoverDescription>
Supporting copy displayed inside the popover surface.
</PopoverDescription>
<PopoverActions>
<PopoverClose render={<Button size="xs" />}>Done</PopoverClose>
</PopoverActions>
</PopoverPopup>
</Popover>Examples
With Actions
import { Button } from "@/components/ui/button";
import {
Popover,
PopoverActions,
PopoverClose,
PopoverDescription,
PopoverPopup,
PopoverTitle,
PopoverTrigger,
} from "@/components/ui/popover";
export default function Particle() {
return (
<Popover>
<PopoverTrigger render={<Button variant="outline">Updates</Button>} />
<PopoverPopup>
<PopoverTitle>Sync completed</PopoverTitle>
<PopoverDescription>
All workspace tokens and registry files are up to date with the latest
release.
</PopoverDescription>
<PopoverActions>
<PopoverClose render={<Button size="xs" variant="ghost" />}>
Dismiss
</PopoverClose>
<PopoverClose render={<Button size="xs" />}>Got it</PopoverClose>
</PopoverActions>
</PopoverPopup>
</Popover>
);
}
Vibrant
import { ZapIcon } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
Popover,
PopoverActions,
PopoverClose,
PopoverDescription,
PopoverPopup,
PopoverTitle,
PopoverTrigger,
} from "@/components/ui/popover";
export default function Particle() {
return (
<Popover>
<PopoverTrigger
render={
<Button variant="secondary">
<ZapIcon />
Quick tip
</Button>
}
/>
<PopoverPopup colorScheme="vibrant">
<PopoverTitle>Keyboard shortcuts</PopoverTitle>
<PopoverDescription>
Press Ctrl+Space inside Autocomplete inputs to open suggestions
without a trigger button.
</PopoverDescription>
<PopoverActions>
<PopoverClose render={<Button size="xs" />}>Nice</PopoverClose>
</PopoverActions>
</PopoverPopup>
</Popover>
);
}
With Form
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import {
Popover,
PopoverActions,
PopoverClose,
PopoverDescription,
PopoverPopup,
PopoverTitle,
PopoverTrigger,
} from "@/components/ui/popover";
export default function Particle() {
return (
<Popover>
<PopoverTrigger
render={<Button variant="outline">Invite member</Button>}
/>
<PopoverPopup className="w-80">
<PopoverTitle>Invite collaborator</PopoverTitle>
<PopoverDescription>
Send an invite link directly to their inbox.
</PopoverDescription>
<div className="mt-2">
<Input placeholder="name@company.com" size="sm" type="email" />
</div>
<PopoverActions>
<PopoverClose render={<Button size="xs" variant="ghost" />}>
Cancel
</PopoverClose>
<PopoverClose render={<Button size="xs" />}>Send invite</PopoverClose>
</PopoverActions>
</PopoverPopup>
</Popover>
);
}
API Reference
Popover
Alias for Popover.Root from Base UI. Manages open state.
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | - | Controlled open state |
defaultOpen | boolean | false | Initial uncontrolled open state |
onOpenChange | (open: boolean) => void | - | Called when the open state changes |
modal | boolean | false | Blocks interaction outside when true |
...props | Base UI Popover Root props | - | All other Popover Root props are supported |
PopoverPopup
The positioned floating container rendered inside a portal. Also exported as PopoverContent.
| Prop | Type | Default | Description |
|---|---|---|---|
colorScheme | "standard" | "vibrant" | "standard" | Surface tint scheme |
side | "top" | "bottom" | "left" | "right" | "bottom" | Preferred side relative to the anchor |
align | "start" | "center" | "end" | "center" | Alignment along the chosen side |
sideOffset | number | 8 | Distance in pixels from the anchor |
alignOffset | number | 0 | Offset along the alignment axis |
anchor | Popover.Positioner.Props["anchor"] | - | Custom anchor element |
portalProps | Popover.Portal.Props | - | Props forwarded to the internal portal |
...props | Base UI Popover Popup props | - | All standard popover popup props |
PopoverTrigger / PopoverClose
Trigger and dismiss primitives wrapping Base UI Popover.Trigger and Popover.Close.
PopoverTitle / PopoverDescription
Accessible heading and supporting description slots inside PopoverPopup.
PopoverActions
Right-aligned action row at the bottom of PopoverPopup for buttons and PopoverClose.