Popover
Popover combines an anchored trigger with content and optional controlled opening.
Practical React example
Let someone inspect or adjust a small preference beside the button that opened it.
Before you copy and paste
Keep the example in the React rendering environment required by the imported component. Copy components/motion/popover.tsx and its returned support files from the Code tab; preserve the project-relative paths.
Listed package dependencies: clsx, lucide-react, motion, react, react-dom, tailwind-merge.
Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.
Let someone inspect or adjust a small preference beside the button that opened it
// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";
import { Button } from "@/components/motion/button";
import {
Popover,
PopoverContent,
PopoverTrigger,
} from "@/components/motion/popover";
export function PopoverPreview() {
return (
<div className="flex flex-wrap items-center justify-center gap-4">
<Popover side="bottom" align="start">
<PopoverTrigger>
<Button variant="secondary">Edit profile</Button>
</PopoverTrigger>
<PopoverContent className="w-72">
<p className="text-sm font-medium text-foreground">Dimensions</p>
<p className="mt-1 text-xs text-muted-foreground">
Set the width and height for the layer.
</p>
<div className="mt-3 flex flex-col gap-2">
<label className="flex items-center justify-between gap-3 text-sm">
<span className="text-muted-foreground">Width</span>
<input
defaultValue="100%"
className="h-8 w-32 rounded-lg border border-border bg-background px-2.5 text-sm text-foreground outline-none focus-visible:ring-2 focus-visible:ring-foreground/20"
/>
</label>
<label className="flex items-center justify-between gap-3 text-sm">
<span className="text-muted-foreground">Height</span>
<input
defaultValue="auto"
className="h-8 w-32 rounded-lg border border-border bg-background px-2.5 text-sm text-foreground outline-none focus-visible:ring-2 focus-visible:ring-foreground/20"
/>
</label>
</div>
</PopoverContent>
</Popover>
<Popover trigger="hover" side="top">
<PopoverTrigger>
<Button variant="outline">Hover me</Button>
</PopoverTrigger>
<PopoverContent className="w-56">
<p className="text-sm text-foreground">
Opens on hover, with a grace window so you can move into the panel.
</p>
</PopoverContent>
</Popover>
</div>
);
}
Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.
Use one focusable trigger element. Keep the control’s state outside the popover when closing should not discard an edit.
Customization
- PopoverProps.children
- Required; ReactNode.
- PopoverProps.open
- Optional; boolean. Controlled open state.
- PopoverProps.defaultOpen
- Optional; boolean. Uncontrolled initial open state.
- PopoverProps.onOpenChange
- Optional; (open: boolean) => void.
- PopoverProps.trigger
- Optional; TriggerMode. How the popover is summoned. Default "click".
- PopoverProps.side
- Optional; Side. Which side of the trigger the panel oozes out of. Default "bottom".
- PopoverProps.align
- Optional; Align. Alignment along the trigger's edge. Default "center".
- PopoverProps.sideOffset
- Optional; number. Gap between trigger and panel, in px — the length of the gooey neck. Default 14.
- PopoverProps.panelRadius
- Optional; number. Corner radius of the open panel, in px. Default 16.
- PopoverProps.gooStrength
- Optional; number. Blur radius feeding the goo filter — higher melts more. Default 8.
- PopoverProps.className
- Optional; string.
- PopoverTriggerProps.children
- Required; ReactElement. A single focusable element (e.g. a Button) that opens the popover.
- PopoverContentProps.children
- Required; ReactNode.
- PopoverContentProps.className
- Optional; string.
Integration notes
- Use a dialog for a task that requires a full modal interaction.
- Test collision, clipping and focus behavior when the trigger sits near the viewport edge.
Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.
Give your agent taste.
The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.
All components are free. Sign up only to connect MCP.