popover
neobrutalui/popoverFreeComponent
Show contextual content anchored to a trigger element.
Live preview
live · rendered by the registry
Rendered by neobrutalui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.neobrutalui.live/r/popover.jsonSource
1"use client"23import * as React from "react"4import { Popover as BasePopover } from "@base-ui/react/popover"5import { cn } from "@/lib/utils"67const Popover = BasePopover.Root89const PopoverTrigger = BasePopover.Trigger1011type PopoverContentProps = React.ComponentPropsWithoutRef<typeof BasePopover.Popup> & {12 align?: "start" | "center" | "end"13 sideOffset?: number14}1516const PopoverContent = React.forwardRef<17 React.ComponentRef<typeof BasePopover.Popup>,18 PopoverContentProps19>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (20 <BasePopover.Portal>21 <BasePopover.Positioner sideOffset={sideOffset} align={align}>22 <BasePopover.Popup23 ref={ref}24 className={cn(25 "z-50 w-72 rounded-base border-2 border-black bg-white p-4 text-black outline-none transition-opacity motion-reduce:transition-none data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0",26 className27 )}28 {...props}29 />30 </BasePopover.Positioner>31 </BasePopover.Portal>32))33PopoverContent.displayName = "PopoverContent"3435export { Popover, PopoverTrigger, PopoverContent }
What it pulls in
npm packages
Other registry items
More from neobrutalui
All 24 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | neobrutalui | Components | Free | 2 deps | |
| alertalert | neobrutalui | Components | Free | 1 dep | |
| avataravatar | neobrutalui | Components | Free | no deps | |
| badgebadge | neobrutalui | Components | Free | 1 dep | |
| buttonbutton | neobrutalui | Components | Free | 1 dep | |
| cardcard | neobrutalui | Components | Free | no deps | |
| checkboxcheckbox | neobrutalui | Components | Free | 2 deps | |
| date-pickerdate-picker | neobrutalui | Components | Free | 2 deps |
