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/separator

Separator

nswds-ui/separator
FreeComponent

A semantic or decorative divider built on the Base UI separator primitive.

Install it

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

Source

src/components/separator.tsxraw.githubusercontent.com/digitalnsw/nswds-ui/main/apps/registry/public/r/separator.json
1'use client'
2
3import type * as React from 'react'
4
5import { Separator as SeparatorPrimitive } from '@base-ui/react/separator'
6
7import { cn } from '@/lib/utils'
8
9type SeparatorProps = SeparatorPrimitive.Props & {
10 /**
11 * When true, the separator is purely presentational and is hidden from
12 * assistive tech by setting `role="none"`. Defaults to `false`, in which
13 * case Base UI's default `role="separator"` is left intact so AT users
14 * hear it as a region boundary.
15 */
16 decorative?: boolean
17}
18
19function Separator({
20 className,
21 orientation = 'horizontal',
22 decorative = false,
23 role,
24 ref,
25 ...props
26}: SeparatorProps) {
27 // Base UI's Separator emits `data-orientation="horizontal|vertical"` for
28 // CSS targeting AND `aria-orientation` for assistive tech. The previous
29 // `data-horizontal:` / `data-vertical:` selectors targeted non-existent
30 // boolean attributes and never matched, leaving the separator with no
31 // explicit axis sizing.
32 const sharedClassName = cn(
33 'shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch',
34 className,
35 )
36
37 // A consumer passing `role="none"` / `"presentation"` is asking for a
38 // presentational separator just as `decorative` does — treat them the same.
39 // Otherwise Base UI would still emit `aria-orientation` (which it sets from
40 // the orientation prop regardless of role), recreating the axe
41 // `aria-allowed-attr` violation that `decorative` exists to avoid.
42 const isPresentational = decorative || role === 'none' || role === 'presentation'
43
44 if (isPresentational) {
45 // Render a plain <div> for presentational separators. Bypass the
46 // primitive so the rendered element carries no ARIA semantics at all
47 // (no `aria-orientation`).
48 return (
49 <div
50 ref={ref as React.Ref<HTMLDivElement>}
51 data-slot='separator'
52 data-orientation={orientation}
53 role='none'
54 className={sharedClassName}
55 {...(props as React.HTMLAttributes<HTMLDivElement>)}
56 />
57 )
58 }
59
60 return (
61 <SeparatorPrimitive
62 ref={ref}
63 data-slot='separator'
64 orientation={orientation}
65 role={role ?? 'separator'}
66 className={sharedClassName}
67 {...props}
68 />
69 )
70}
71
72export { Separator }
73export type { SeparatorProps }

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/separator.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