Popover
muffled-ui-registry/popoverFreeComponent
Floating panel on paper with hairline border and no shadow.
Live preview
live · rendered by the registry
Rendered by muffled-ui-registry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.muffled.studio/r/popover.jsonSource
1"use client"23import * as React from "react"4import { Popover as PopoverPrimitive } from "@base-ui/react/popover"56import { cn, floatingSurfaceClasses } from "@/registry/lib/surface"7import { ThemedPortalShell } from "@/registry/lib/portal-container"89function Popover({ ...props }: PopoverPrimitive.Root.Props) {10 return <PopoverPrimitive.Root data-slot="popover" {...props} />11}1213function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {14 return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />15}1617function PopoverContent({18 className,19 align = "center",20 alignOffset = 0,21 side = "bottom",22 sideOffset = 4,23 ...props24}: PopoverPrimitive.Popup.Props &25 Pick<26 PopoverPrimitive.Positioner.Props,27 "align" | "alignOffset" | "side" | "sideOffset"28 >) {29 return (30 <PopoverPrimitive.Portal>31 <ThemedPortalShell>32 <PopoverPrimitive.Positioner33 align={align}34 alignOffset={alignOffset}35 side={side}36 sideOffset={sideOffset}37 className="isolate z-50"38 >39 <PopoverPrimitive.Popup40 data-slot="popover-content"41 className={cn(42 "z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 p-2.5 text-sm",43 floatingSurfaceClasses(),44 className45 )}46 {...props}47 />48 </PopoverPrimitive.Positioner>49 </ThemedPortalShell>50 </PopoverPrimitive.Portal>51 )52}5354function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {55 return (56 <div57 data-slot="popover-header"58 className={cn("flex flex-col gap-0.5 text-sm", className)}59 {...props}60 />61 )62}6364function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {65 return (66 <PopoverPrimitive.Title67 data-slot="popover-title"68 className={cn("font-medium", className)}69 {...props}70 />71 )72}7374function PopoverDescription({75 className,76 ...props77}: PopoverPrimitive.Description.Props) {78 return (79 <PopoverPrimitive.Description80 data-slot="popover-description"81 className={cn("text-muted-foreground", className)}82 {...props}83 />84 )85}8687export {88 Popover,89 PopoverContent,90 PopoverDescription,91 PopoverHeader,92 PopoverTitle,93 PopoverTrigger,94}
What it pulls in
npm packages
Other registry items
Files it writes
More from muffled-ui-registry
All 55 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | muffled-ui-registry | Components | Free | 2 deps | |
| Alertalert | muffled-ui-registry | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | muffled-ui-registry | Components | Free | 1 dep | |
| Avataravatar | muffled-ui-registry | Components | Free | 1 dep | |
| Badgebadge | muffled-ui-registry | Components | Free | 2 deps | |
| Breadcrumbbreadcrumb | muffled-ui-registry | Components | Free | 2 deps | |
| Buttonbutton | muffled-ui-registry | Components | Free | 2 deps | |
| Button Groupbutton-group | muffled-ui-registry | Components | Free | 2 deps |
