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/login-form

Login Form

nswds-ui/login-form
FreeBlock

A login form worked example (Card + Field + Input + Button) wired with NSWDS components. Copy-and-adapt block — not a published component.

Install it

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

Source

src/patterns/login-form.tsxraw.githubusercontent.com/digitalnsw/nswds-ui/main/apps/registry/public/r/login-form.json
1'use client'
2
3import type * as React from 'react'
4
5import { Button } from '@/components/button'
6import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/card'
7import { Field, FieldDescription, FieldGroup, FieldLabel } from '@/components/field'
8import { Input } from '@/components/input'
9import { LabeledSeparator } from '@/components/labeled-separator'
10import { Link } from '@/components/link'
11import { Separator } from '@/components/separator'
12import { IconKey } from '@/icons/key'
13import { IconLogin } from '@/icons/login'
14import { IconMail } from '@/icons/mail'
15import { cn } from '@/lib/utils'
16
17export function LoginForm({ className, ...props }: React.ComponentProps<'div'>) {
18 return (
19 <div className={cn('flex flex-col gap-6', className)} {...props}>
20 <Card className='w-full'>
21 <CardHeader>
22 <CardTitle>Login to your account</CardTitle>
23 <CardDescription>Choose how you&apos;d like to sign in</CardDescription>
24 </CardHeader>
25 <CardContent>
26 <form>
27 <FieldGroup>
28 {/*
29 * Best-practice sign-in order, most-recommended first:
30 * 1. Single sign-on (SSO) — the preferred path
31 * 2. Email + password — the traditional fallback
32 * 3. Magic link — passwordless, reuses the email
33 * Each method is divided by a LabeledSeparator so it reads as a
34 * distinct alternative. Only SSO carries primary (solid)
35 * emphasis — one primary action per view — with password Login
36 * and the magic link stepped down to outline treatments.
37 */}
38 {/* 1 — Single sign-on: the recommended first option */}
39 <Field>
40 <Button type='button'>
41 <IconLogin />
42 Continue with single sign-on
43 </Button>
44 </Field>
45 <LabeledSeparator>or sign in with email</LabeledSeparator>
46 {/* 2 — Email + password.
47 * No htmlFor/id wiring: each control sits in a Field, which
48 * associates the label (and any description/error) with the input
49 * automatically via Base UI, generating ids per instance — so two
50 * LoginForms on one page don't collide.
51 *
52 * autoComplete is not decoration: it is the technique that
53// … truncated

What it pulls in

Other registry items

  • https://ui.digital.nsw.gov.au/registry/r/theme.json
  • https://ui.digital.nsw.gov.au/registry/r/button.json
  • https://ui.digital.nsw.gov.au/registry/r/card.json
  • https://ui.digital.nsw.gov.au/registry/r/field.json
  • https://ui.digital.nsw.gov.au/registry/r/input.json
  • https://ui.digital.nsw.gov.au/registry/r/labeled-separator.json
  • https://ui.digital.nsw.gov.au/registry/r/link.json
  • https://ui.digital.nsw.gov.au/registry/r/separator.json
  • https://ui.digital.nsw.gov.au/registry/r/icons.json

Files it writes

  • src/patterns/login-form.tsx

Facts

Registry
@nswds/ui
Type
registry:block
Access
Free
Files written
1
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
Footer — Collapsible Site Mapfooter-accordion@nswds/uiBlocksFreeno deps
Footer — Compact Barfooter-compact@nswds/uiBlocksFreeno deps
Footer — Contact Detailsfooter-contact@nswds/uiBlocksFreeno deps
Footer — Call to Actionfooter-cta@nswds/uiBlocksFreeno deps
Footer — Newsletterfooter-newsletter@nswds/uiBlocksFreeno deps
Footer — Simple Centredfooter-simple-centred@nswds/uiBlocksFreeno deps
Footer — Site Mapfooter-sitemap@nswds/uiBlocksFreeno deps
Footer — Site Map with Brandfooter-sitemap-brand@nswds/uiBlocksFreeno deps

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