Why shadcn apps need behaviour rules
shadcn gives you well-made components as code you own. Its own documentation says it is not a component library but a way to build one. That is its strength: you can change everything.
It also means a lot is left open. A button component does not decide when it should be disabled. A dialog component does not decide what Escape does when someone has typed something. An input does not decide when its error appears. Every team, and every AI agent writing code for a team, answers those questions again, and answers them differently.
Where it goes wrong
Section titled “Where it goes wrong”Most accessibility problems in apps built from good components are not in the components. They are in the behaviour around them:
| What gets decided ad hoc | What can go wrong | Justified’s rule |
|---|---|---|
| A placeholder instead of a label | The field loses its name the moment someone types | FRM-001 |
| Errors only in a banner or a toast | People cannot tell which field is wrong | FRM-002a |
| Errors while someone is still typing | People are told off for something they have not finished | FRM-002b |
| A submit button that stays disabled | Nothing happens on press, and nobody says why | ACT-004, ACT-005 |
| A delete button that is the default | One stray Enter destroys data | DLG-004 |
| A dialog on top of a dialog | Focus and the way back get lost | DLG-002 |
| A layout that only works wide | Zoomed in or on a phone, people scroll sideways to read | LAY-001 |
| Grid placement that reorders content | Screen reader and keyboard users get a different story | LAY-002 |
None of these is a bug in a component. Each is a decision nobody wrote down.
What Justified adds
Section titled “What Justified adds”Justified is the layer between the components and your product: the decisions.
- Behaviour rules. Each rule is tried against WCAG 2.2 and weighed by Material, Apple and Carbon, with GOV.UK and Nielsen Norman Group as expert witnesses. The verdict says how strongly they agree. How it works
- A theme. Colours in shadcn’s names, with every text and border pair checked for contrast in light and dark, plus type, space, focus, layout and motion.
- Components that already follow the rules. Added with the shadcn CLI, as code you own. Get started
- The rules for AI agents. A skill for Claude Code and an AGENTS.md, so generated code follows the same decisions. Use with an AI agent
Rigour is beautiful
Section titled “Rigour is beautiful”Good digital services shouldn’t come down to luck. I want it to be easy to build services that are consistent, usable and accessible to everyone, whether a person or an AI writes the code.
Carl Magnus Swahn, Blackwood & Blake
What it does not do
Section titled “What it does not do”Justified helps you work toward WCAG 2.2 AA. It does not make a product compliant on its own and is not a certification: how a product is built, written and tested still decides. Read the full statement
Want the longer version? Read Design system vs component library. For what shadcn and Radix already handle and what they leave to you, read Is shadcn accessible?, and for why the decisions matter even more when an agent writes the code, Design system rules for AI coding agents.
Justified is an independent project. It is not affiliated with, sponsored or endorsed by the organisations whose guidance it cites. Read the full statement.
Apple is a trademark of Apple Inc., registered in the U.S. and other countries and regions.