BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/amarjay-ui/popover

popover

amarjay-ui/popover
FreeComponent

Floating popover component.

Live preview

live · rendered by the registry
Rendered by amarjay-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ui.amarjay.com/r/popover.json

Source

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

What it pulls in

npm packages

  • radix-ui

Other registry items

  • utils

Files it writes

  • src/components/ui/popover.tsx

Facts

Registry
amarjay-ui
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-10
Last confirmed
today

Go to the source

Docs on amarjay-ui ui.amarjay.com amar-jay/ui on GitHub Raw registry item This item as JSON

More from amarjay-ui

All 18 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
alertalertamarjay-uiComponentsFree1 dep
avataravataramarjay-uiComponentsFree1 dep
badgebadgeamarjay-uiComponentsFree2 deps
buttonbuttonamarjay-uiComponentsFree2 deps
cardcardamarjay-uiComponentsFreeno deps
chartchartamarjay-uiComponentsFree1 dep
context-menucontext-menuamarjay-uiComponentsFree2 deps
dialogdialogamarjay-uiComponentsFree2 deps
BlockDex

Built by

Kynth Studios

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 Studios

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 Studios

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