BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/formscn/popover

popover

formscn/popover
FreeComponent

Popover component

Install it

npx shadcn@latest add https://formscn.space/r/popover.json

Source

src/components/ui/popover.tsxformscn.space/r/popover.json
1import * as React from "react"
2import { Popover as PopoverPrimitive } from "@base-ui/react/popover"
3
4import { cn } from "@/lib/utils"
5
6function Popover({ ...props }: PopoverPrimitive.Root.Props) {
7 return <PopoverPrimitive.Root data-slot="popover" {...props} />
8}
9
10function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
11 return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
12}
13
14function PopoverContent({
15 className,
16 align = "center",
17 alignOffset = 0,
18 side = "bottom",
19 sideOffset = 4,
20 ...props
21}: PopoverPrimitive.Popup.Props &
22 Pick<
23 PopoverPrimitive.Positioner.Props,
24 "align" | "alignOffset" | "side" | "sideOffset"
25 >) {
26 return (
27 <PopoverPrimitive.Portal>
28 <PopoverPrimitive.Positioner
29 align={align}
30 alignOffset={alignOffset}
31 side={side}
32 sideOffset={sideOffset}
33 className="isolate z-50"
34 >
35 <PopoverPrimitive.Popup
36 data-slot="popover-content"
37 className={cn(
38 "bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 z-50 w-72 origin-(--transform-origin) outline-hidden",
39 className
40 )}
41 {...props}
42 />
43 </PopoverPrimitive.Positioner>
44 </PopoverPrimitive.Portal>
45 )
46}
47
48function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
49 return (
50 <div
51 data-slot="popover-header"
52 className={cn("flex flex-col gap-0.5 text-sm", className)}
53 {...props}
54 />
55 )
56}
57
58function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
59 return (
60 <PopoverPrimitive.Title
61 data-slot="popover-title"
62 className={cn("font-medium", className)}
63 {...props}
64 />
65 )
66}
67
68function PopoverDescription({
69 className,
70 ...props
71}: PopoverPrimitive.Description.Props) {
72 return (
73 <PopoverPrimitive.Description
74 data-slot="popover-description"
75 className={cn("text-muted-foreground", className)}
76 {...props}
77 />
78 )
79}
80
81export {
82 Popover,
83 PopoverContent,
84// … truncated

What it pulls in

npm packages

  • @base-ui/react

Files it writes

  • src/components/ui/popover.tsx

Facts

Registry
formscn
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

formscn.space AbdullahMukadam/formscn on GitHub Raw registry item This item as JSON

More from formscn

All 30 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
buttonbuttonformscnComponentsFree2 deps
calendarcalendarformscnComponentsFree2 deps
cardcardformscnComponentsFreeno deps
checkboxcheckboxformscnComponentsFree1 dep
fieldfieldformscnComponentsFreeno deps
inputinputformscnComponentsFree1 dep
labellabelformscnComponentsFree2 deps
phone-inputphone-inputformscnComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex