Check UI code against the design system
check_uiCheck TSX/JSX for design system compliance, reporting hardcoded styles, unknown components/props, and missing accessible names with fixes.
Instructions
Lint TSX/JSX against the design system. Reports hardcoded colors, spacing and radius (with the nearest token), native elements that have a design-system component, unknown components, props and variant values, and icon-only buttons without an accessible name. Each diagnostic has line/column, a rule id, a message and a suggested fix. Run it on every snippet or file you write and fix all errors. Pass code for unsaved code, or path for a file in the project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | TSX/JSX source to check (up to 1,000,000 characters). | |
| path | No | Path of a file to check, relative to the project root (the monorepo root, when served from there). | |
| limit | No | Most diagnostics to return, errors first (default 50). The counts and byRule cover all of them. | |
| filename | No | Name to report `code` under; a .jsx extension parses it as JSX. At a monorepo root, the path the code will be saved under, which picks the project whose design system checks it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when there are no errors. | |
| file | Yes | ||
| byRule | Yes | Every finding per rule, shown or not. | |
| notice | No | Set when no components or no color tokens were found, so rules did not run, or when components came from modules the model does not include. | |
| omitted | Yes | Diagnostics left out by `limit`. | |
| skipped | No | Why the file was not checked: it renders an image (next/og) or an email. | |
| unchecked | No | Components imported from modules the model does not include, not checked. | |
| errorCount | Yes | ||
| diagnostics | Yes | Up to `limit` diagnostics, errors first; `omitted` says how many more there are. | |
| warningCount | Yes |