component-specs
Skill1 starsChanged 40 days agoMITView on GitHub
How common UI components should look and behave so they match the app instead of shipping browser defaults. Use when building or styling selects, comboboxes, inputs, checkboxes, radios, switches, sliders, textareas, date pickers, calendars, data tables, dialogs, sheets, drawers, popovers, dropdowns, tooltips, toasts, tabs, accordions, sidebars, pagination, skeletons, empty states, badges, avatars or buttons — with or without shadcn/ui, on Base UI by default. Triggers on layout shift when a select or popup opens, elements growing or shrinking on open, hover or focus, default-looking controls, select arrow touching the border, unstyled date picker, off-center checkmark, radio dot or switch thumb, misaligned controls, cramped or squeezed table columns, column resizing.
In this repository37 other files it gives its agents.
- global/CLAUDE.mdCLAUDE.md
- agent-writingSkill
- animate-expoSkill
- animateSkill
- animation-performanceSkill
- animation-vocabularySkill
- apple-designSkill
- better-accessibilitySkill
- better-colorsSkill
- better-interfaceSkill
- better-layoutSkill
- better-typographySkill
- better-uiSkill
- better-writingSkill
- breakSkill
- build-designSkill
- componentsSkill
- debugSkill
- design-critiqueSkill
- design-engSkill
- design-exploreSkill
- design-setupSkill
- designSkill
- design-statesSkill
- design-syncSkill
- design-systemSkill
- explain-interfaceSkill
- find-animation-opportunitiesSkill
- grillSkill
- improve-animationsSkill
- interface-reviewSkill
- mobile-nativeSkill
- pick-ui-librarySkill
- planSkill
- review-animationsSkill
- state-machineSkill
- variantSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Style from the project's tokens: Never leave a control on the browser's colors, and never invent a one-off value inside a component.
- Distinctive: line 16
Every state is designed: default, hover, focus-visible, active, disabled, invalid, read-only, loading, empty.
- Distinctive: line 35
Read only the file for the family you are building.
- Distinctive: line 42
Every indicator passes the centering measurement in alignment.md.
- Distinctive: line 43
Every state listed above renders, in light and dark mode.
- Distinctive: line 48
If you cannot open a browser, say which checks you could not run.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Component specs
The exact behavior and styling of the components every app needs. Browser defaults and copy-pasted examples ship controls that ignore the app's tokens: a select with its arrow against the border, a native date input in light mode inside a dark app, a checkmark one pixel off center, a table squeezing twelve columns into one screen. This skill names the standard for each.
Whether a component should exist and what its API is belongs to components. Run that first, then build to the spec here.
Universal rules
- Controls are one family. Input, select, combobox, textarea, date field and button share the same height, radius, border, horizontal padding, font size, and focus, invalid and disabled styles, all from tokens. Put two side by side: their edges and baselines line up.
- Style from the project's tokens. Never leave a control on the browser's colors, and never invent a one-off value inside a component.
- Every state is designed: default, hover, focus-visible, active, disabled, invalid, read-only, loading, empty. A state you did not style is a state that looks broken.
- Indicators are centered by layout, not by offsets. Checkmarks, radio dots, switch thumbs, chevrons and icons are centered with grid or flex on a box whose size leaves an even remainder. Never with
top/leftmagic numbers. Read alignment.md before building any of them. - Declare
color-scheme. Setcolor-scheme: light dark(or the app's single scheme) on:rootand switch it with the theme, so native popups, scrollbars, date pickers and autofill follow the theme. - Build on Base UI by default. New project or no component library:
@base-ui/react, or shadcn's Base UI components when the project uses shadcn. A project already on Radix, React Aria or another headless library keeps it. Fix visuals in the theme or the component file; never mix two libraries for the same role. Read base-ui.md. - Nothing moves unless it was touched. Opening a select, hovering a row, focusing an input or showing an error never changes the size or position of another element. The usual causes: double scrollbar compensation when a popup locks scroll, borders or font weight that change on hover or focus, error text inserted without reserved space. See overlays.md.
Where each component's spec lives
| Building | Read |
| Base UI parts, data attributes, positioning variables | base-ui.md |
| Checkbox, radio, switch, any centered indicator or icon | alignment.md |
| Input, input group, select, native select, combobox, textarea, slider, OTP, field, label, button | controls.md |
| Date picker, calendar, date range, time | dates.md |
| Table, data table, pagination | tables.md |
| Dialog, alert dialog, sheet, drawer, popover, dropdown, context menu, hover card, tooltip, toast | overlays.md |
| Tabs, accordion, collapsible, sidebar, navigation menu, breadcrumb, scroll area, carousel | navigation.md |
| Skeleton, spinner, progress, empty state, alert, badge, avatar, chart | feedback.md |
Read only the file for the family you are building.
Verify before calling it done
Open the page in a browser (dev server plus Playwright, or the user's browser) and check:
- Controls placed side by side have equal heights and aligned edges.
- Every indicator passes the centering measurement in alignment.md.
- Every state listed above renders, in light and dark mode.
- Native popups (select options, date picker) follow the theme.
- Opening each popup (select, menu, combobox, dialog) leaves every other element where it was: measure a flexible neighbor's width before and after opening, the difference is
0. - The page works at 375px wide and at 200% zoom.
If you cannot open a browser, say which checks you could not run.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

