BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/@nswds/ui/popover

Popover

nswds-ui/popover
FreeComponent

A floating panel anchored to a trigger, built on the Base UI popover primitive.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/digitalnsw/nswds-ui/main/apps/registry/public/r/popover.json

Source

src/components/popover.tsxraw.githubusercontent.com/digitalnsw/nswds-ui/main/apps/registry/public/r/popover.json
1'use client'
2
3import { Popover as PopoverPrimitive } from '@base-ui/react/popover'
4import * as React from 'react'
5
6import { cn } from '@/lib/utils'
7
8function Popover({ ...props }: PopoverPrimitive.Root.Props) {
9 return <PopoverPrimitive.Root data-slot='popover' {...props} />
10}
11
12function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
13 return <PopoverPrimitive.Trigger data-slot='popover-trigger' {...props} />
14}
15
16function PopoverContent({
17 className,
18 align = 'center',
19 alignOffset = 0,
20 side = 'bottom',
21 sideOffset = 4,
22 ...props
23}: PopoverPrimitive.Popup.Props &
24 Pick<PopoverPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>) {
25 return (
26 <PopoverPrimitive.Portal>
27 <PopoverPrimitive.Positioner
28 align={align}
29 alignOffset={alignOffset}
30 side={side}
31 sideOffset={sideOffset}
32 className='isolate z-50'
33 >
34 <PopoverPrimitive.Popup
35 data-slot='popover-content'
36 className={cn(
37 'z-50 flex w-72 origin-(--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=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-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',
38 className,
39 )}
40 {...props}
41 />
42 </PopoverPrimitive.Positioner>
43 </PopoverPrimitive.Portal>
44 )
45}
46
47function PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {
48 return (
49 <div
50 data-slot='popover-header'
51 className={cn('flex flex-col gap-1 text-xs', className)}
52 {...props}
53 />
54 )
55}
56
57function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
58 return (
59 <PopoverPrimitive.Title
60 data-slot='popover-title'
61 className={cn('text-sm font-medium', className)}
62 {...props}
63 />
64 )
65}
66
67function PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props) {
68 return (
69 <PopoverPrimitive.Description
70 data-slot='popover-description'
71 className={cn('text-muted-foreground', className)}
72 {...props}
73 />
74 )
75}
76
77// … truncated

What it pulls in

npm packages

  • @base-ui/react
  • clsx
  • tailwind-merge

Other registry items

  • https://ui.digital.nsw.gov.au/registry/r/theme.json

Files it writes

  • src/components/popover.tsx
  • src/lib/utils.ts

Facts

Registry
@nswds/ui
Type
registry:ui
Access
Free
Files written
2
Licence
MIT
In the index
at or before 2026-08-20
Last confirmed
today

Go to the source

ui.digital.nsw.gov.au digitalnsw/nswds-ui on GitHub Raw registry item This item as JSON

More from @nswds/ui

All 46 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Aspect Ratioaspect-ratio@nswds/uiComponentsFree2 deps · 2 files
Badgebadge@nswds/uiComponentsFree4 deps · 2 files
Buttonbutton@nswds/uiComponentsFree4 deps · 2 files
Cardcard@nswds/uiComponentsFree2 deps · 2 files
Collapsiblecollapsible@nswds/uiComponentsFree1 dep
Drawerdrawer@nswds/uiComponentsFree3 deps · 2 files
Expandable Searchexpandable-search@nswds/uiComponentsFree3 deps · 2 files
Fieldfield@nswds/uiComponentsFree4 deps · 2 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored on what can be checked

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex