Chewypixel component
Popover
A frosted panel that scales in from its trigger and animates out before it closes.
Installation
npx shadcn@latest add @chewypixel/popoverUsage
import { Button } from "@/components/ui/button";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
export function GiftNote() {
return (
<Popover>
<PopoverTrigger asChild>
<Button variant="outline">Add a gift note</Button>
</PopoverTrigger>
<PopoverContent>We'll tuck it in the box, handwritten.</PopoverContent>
</Popover>
);
}Props
openWhether it's open, when controlled. Goes on Popover.
boolean
onOpenChangeCalled when it opens or closes. Goes on Popover.
(open: boolean) => void
alignHow it lines up with the trigger. Goes on PopoverContent.
"start" | "center" | "end" = "center"
sideOffsetThe gap between the trigger and the panel, in pixels. Goes on PopoverContent.
number = 4
Released under the MIT License.
More components
- Date PickerA date field that opens a calendar. Months slide in the direction you page, and arrow keys move between days.
- Password InputA password field with a button that shows or hides what you typed. The eye icon swaps with a quick pop.
- Code InputOne box per digit for verification codes, with a blinking caret in the next box. Pasting a code and autofill from SMS both work.
- Copy ButtonAn icon button that copies text. The copy icon pops into a check, then back.
See them in a real app
These components come from Mochi, our admin dashboard template built with Next.js, shadcn/ui and Motion.