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

Input

nswds-ui/input
FreeComponent

A text input built on the Base UI input primitive with NSW form styling.

Install it

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

Source

src/components/input.tsxraw.githubusercontent.com/digitalnsw/nswds-ui/main/apps/registry/public/r/input.json
1'use client'
2
3import { Input as InputPrimitive } from '@base-ui/react/input'
4import * as React from 'react'
5
6import { cn } from '@/lib/utils'
7
8function Input({ className, type, ref, ...props }: React.ComponentProps<'input'>) {
9 return (
10 <InputPrimitive
11 ref={ref}
12 type={type}
13 data-slot='input'
14 data-type={type}
15 className={cn(
16 // No `outline-none` here: it sets `--tw-outline-style: none` globally
17 // on the element, which then suppresses the focus outline below
18 // (which reads `outline-style: var(--tw-outline-style)`).
19 'h-12 w-full min-w-0 rounded-sm px-4 py-2 text-base motion-safe:transition-colors',
20 // Every colour routes through the --input-* semantic tokens (layer 3,
21 // theme.css / the registry theme item). Dark mode and brand themes
22 // restyle the input by remapping tokens — no dark: variants here.
23 'border border-(--input-border) bg-(--input-surface) text-(--input-foreground)',
24 // Hover
25 'hover:bg-(--input-surface-hover)',
26 // Focus — `focus-visible:` per the design-system policy (matches
27 // Button/Link). For text fields this is behaviour-preserving:
28 // browsers flag keyboard-editable controls as :focus-visible even
29 // when focused by pointer, so the ring still shows on click.
30 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--input-ring)',
31 // File input slot
32 'file:inline-flex file:h-8 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-(--input-foreground)',
33 // Placeholder styles
34 'placeholder:text-(--input-placeholder)',
35 // Disabled
36 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
37 // Invalid — 2px danger border, danger hover surface (Figma error variants)
38 'aria-invalid:border-2 aria-invalid:border-(--input-invalid-border) aria-invalid:hover:bg-(--input-invalid-surface-hover) aria-invalid:focus-visible:outline-(--input-invalid-ring)',
39 className,
40 )}
41 {...props}
42 />
43 )
44}
45
46export { Input }
47
48export type InputProps = React.ComponentProps<typeof Input>

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