Measured entry

shadcn-field

formunclassified

A copy-in React and Tailwind set of composable form-layout primitives for fieldsets, labels, descriptions, errors, content, groups, and separators. It uses class-variance-authority, a shadcn-style class merge helper, and the registry's Label and Separator components, which bring the declared Radix and class-merging dependencies.

Specimen
Harness screenshot of shadcn-field at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of shadcn-field at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-field at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for shadcn-field
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal33.4 KB (98.9 KB build, 65.5 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 1.11s
error during build:
[vite]: Rollup failed to resolve import "class-variance-authority" from "<sandbox>re-f43671b27698/src/cut/components/ui/field.tsx".

Verdict

A solid source-owned foundation for structured forms, with clean mounting and no reported accessibility violations. The narrow-screen overflow comes from the demo's fixed-width fieldset, so adopters should replace that constraint rather than reject the primitives.

Use it if

  • You need consistent label, help text, error, and grouping structure across varied form controls.
  • Your Tailwind setup supports the component's state, relational, and container-query utility classes.
  • You want source-owned primitives that can be adapted alongside an existing shadcn-style design system.

Skip it if

  • You want a complete form-state, validation, or submission solution rather than layout primitives.
  • Your styling stack is not Tailwind and translating the dense utility selectors would cost more than a local wrapper.
  • You cannot accommodate the Label, Separator, variant, and class-merge dependencies.
  • You need the supplied demo to fit narrow screens unchanged, since its fixed-width fieldset can overflow there.

Install

Installation record for shadcn-field
Declared dependenciesradix-ui, clsx, tailwind-merge
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

In a non-shadcn project, add Tailwind with support for the utilities used here, class-variance-authority, Radix-backed Label and Separator equivalents, plus clsx and tailwind-merge for the class helper. Repoint the alias imports and define the referenced theme tokens.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Author repository

github.com/shadcn-ui/ui
License
MIT
Record published
2026-08-16

Alternatives

Other published entries for the form pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.