design-component
Skill1.5k starsChanged 3 months agoMITView on GitHub
Design a UI component spec to the house quality bar — anatomy, variants, sizes, the 8 states, token mapping, and accessibility. Use when the user wants to design or document a component (button, input, tabs, toast, combobox, date picker, modal, etc.) at the spec level before or alongside code. For generating framework code, use design-code.
2 other projects use a version of this.
Trending
Quiet since October.thin dataabout the whole repository
Most recently taken up by
- nickdraft/skillstheir own version, first seen Aug 24, 2026
- SmartAssets-io/skillstheir own version, first seen Aug 12, 2026
Who's talking about plugin87/ux-ui-agent-skills
- sudosubin/agents.nix“agent-skills.github.plugin87.ux-ui-agent-skills: init at 2.8.0”GitHub · Oct 1, 2026
- MeyraLab/Meyracle.com“Install plugin87 UX/UI agent skills”GitHub · Sep 17, 2026
- MarkQWu/agents-in-the-wild“Audit candidate: plugin87/ux-ui-agent-skills”GitHub · Sep 14, 2026
- xiaolai/nlpm“Audit candidate: plugin87/ux-ui-agent-skills”GitHub · Sep 14, 2026
- queeennnnblue/lumiere-luxury-remotion“Create UI”GitHub · Sep 12, 2026
The biggest 5 of 5 mentions linking to the repository that our crawl found. Each line is their own headline.
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- nickdraft/skills★ 2same name
- SmartAssets-io/skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a11y-auditSkill
- apply-aestheticSkill
- brandkitSkill
- data-dashboardSkill
- design-codeSkill
- design-doctrineSkill
- design-qaSkill
- design-reviewSkill
- design-tokensSkill
- figma-integrationSkill
- governanceSkill
- image-to-codeSkill
- migrate-design-systemSkill
- performanceSkill
- prototypeSkill
- redesignSkill
- token-buildSkill
- ux-writingSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Read .claude/rules/components.md → "Component Quality Bar" (the 8-state table) and "Atomic Design".
- Very specific: line 13
Check if it already exists: components/atoms.md, molecules.md, organisms.md, templates.md, navigation.md, feedback.md, forms-advanced.md, …
- Distinctive: line 28
Every state must pass in light AND dark before the component is "done".
- Distinctive: line 39
Read the PNG. Then look for, specifically:
- Very specific: line 64
Keep a11y: expand = remove hidden then add .open next frame.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Skill: Design Component
Produce a complete component specification matching the project format.
Steps
- Read
.claude/rules/components.md→ "Component Quality Bar" (the 8-state table) and "Atomic Design"; the always-on 8-state table is inCLAUDE.md→ Non-Negotiables. - Check if it already exists:
components/atoms.md,molecules.md,organisms.md,templates.md,navigation.md,feedback.md,forms-advanced.md,overlays.md. Match the existing spec format. - Pull the ARIA pattern from
accessibility/aria-patterns.mdand contrast/target rules fromaccessibility/wcag-checklist.md. - Map every value to tokens (
tokens/*.json) — sizes viasizing.json, states viastates.json. - Apply visual judgment from
taste/design-taste.md(states, focus, no slop). - Optional fast start:
python3 scripts/scaffold_component.py "<Name>"to emit a stub, then fill it in.
Output
Spec with: anatomy diagram, variants table, sizes table, all 8 applicable states, token mapping, accessibility (role/keyboard/SR), and a note to render via frameworks/adapter-protocol.md.
Accuracy — verify every state, don't assume (mandatory when code is produced)
A component is only "correct" when every variant × state renders right — not just the resting default. Build a states harness: render the component in each applicable state (default, hover, focus, active, disabled, loading aria-busy, error aria-invalid, selected aria-pressed/aria-selected) × each variant in one HTML file (see examples/component-states/button.html). Then RUN the gates and report their real output (CLAUDE.md → Verification Protocol):
node scripts/verify_states.mjs <harness> [--dark]— contrast of every element in default/hover/focusnode scripts/axe_audit.mjs <harness> [--dark]— ARIA/role/name/label correctnessnode scripts/measure_render.mjs <harness> [--dark]— every text element AA- overlays/modals also:
node scripts/verify_focustrap.mjs <harness> --open=<trigger>Every state must pass in light AND dark before the component is "done". Never claim a state is correct without a gate proving it.
Gates prove contrast/a11y — they do NOT prove pixels. RENDER AND LOOK.
The contrast/axe gates pass while the UI is still visibly broken: a checkbox that doesn't toggle, a dash sitting at the bottom of its box, a checkmark and an indeterminate dash with mismatched stroke weight, a control that's too heavy. You must screenshot the harness and inspect it before claiming done — for every state, and after interaction. Playwright + system Chrome:
const b = await chromium.launch({channel:'chrome'});
const p = await b.newPage({deviceScaleFactor:4});
await p.goto('file://'+abs); await p.addStyleTag({content:'*{transition:none!important}'});
await p.mouse.move(2000,2000); // park pointer OFF the component
await p.locator('.stack').first().screenshot({path:'/tmp/x.png'});Read the PNG. Then look for, specifically:
- Functional: click each interactive element and assert the state actually changed (
await loc.click(); expect(await loc.isChecked())). A custom control whose overlay box covers the real<input>will not toggle unless the box haspointer-events:none(or an enclosing<label>forwards the click). - Geometry: glyphs centered, not stacked/offset. If a
display:gridbox holds anopacity:0sibling plus a::after, the pseudo lands in row 2 → usedisplay:noneon the hidden sibling, or one container child. - Stroke consistency: a checkmark and its indeterminate dash must use the same rendering method (one
<svg>, two<path>toggled by state — samestroke-width), never an svg check vs a CSS::afterrect (they read as different weights). - Transition artifact: screenshot WITHOUT disabling transitions and a just-clicked control looks half-faded mid-animation — that is not a bug. Always disable transitions and park the pointer before judging a state.
Consistency across files is non-negotiable. The same component (e.g. checkbox) must use byte-identical CSS + markup in every harness/page. A checkbox that looks thin in form-controls and heavy (native accent-color) in data-table is a bug. Factor one pattern, reuse it verbatim.
Verified custom checkbox/radio pattern (thin, token-driven, gated + eyeballed)
Real <input> underneath (keeps native a11y + keyboard); a drawn .box overlay with pointer-events:none; check + dash as two <path> in one <svg> toggled by :checked / :indeterminate; 1.5px border-strong, .25rem radius, .62rem glyph, stroke-width:2 round caps. Reference: examples/component-states/form-controls.html and data-table.html (select-all uses indeterminate). Native accent-color renders too heavy — do not use it when the house look is "thin".
Responsive — every component, no sideways scroll (gated)
Build mobile-first; a fixed-px width that can't shrink is a bug. Run node scripts/verify_responsive.mjs <file|dir> — it loads each harness at 280/320/414px and fails on any horizontal overflow. The four recurring causes and their fixes:
- fixed
inline-size:Npx→inline-size:100%;max-inline-size:Npx(cap, don't pin). <ul>/<ol>default 40px inline-start padding (a*{margin:0}reset does NOT clear padding) →padding:0;margin:0on every list. This also silently mis-aligns a list's edge vs a sibling block (looks like unequal widths) — same fix.- non-wrapping flex rows (breadcrumb, stepper, tabs) →
flex-wrap:wrap, or for tabsoverflow-x:auto+.tab{flex:none}. grid minmax(Npx,1fr)min larger than viewport →minmax(min(Npx,100%),1fr).
Motion — tokenized, real easing, animate the thing that moves
Timing/easing are tokens (--duration-fast|normal|slow, --ease-out|in|in-out|emphasized in the theme; --transition-micro = fast ease-out). Never hardcode ms/curves. A component that toggles open/closed must animate its height, not just rotate a chevron — collapse via hidden/display:none alone reads as "rigid, no transition". Smooth-height pattern (no JS measuring): wrap content in an inner that clips overflow, animate the grid track:
.panel{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-normal) var(--ease-emphasized)}
.panel.open{grid-template-rows:1fr}
.panel > .inner{overflow:hidden;min-block-size:0}Keep a11y: expand = remove hidden then add .open next frame; collapse = remove .open, set hidden on transitionend. Reference: accordion in examples/component-states/overlays.html. Always honor @media(prefers-reduced-motion:reduce){…transition:none}.
Layout — fill the space, don't ship AI-empty filler
auto-fit, neverauto-fillfor card grids.auto-fillkeeps empty phantom tracks so 3 cards cluster left with a void on the right;auto-fitcollapses empties so cards stretch to fill the row. Alwaysrepeat(auto-fit,minmax(min(Npx,100%),1fr)).- Equal-height panels in a row:
align-items:stretchon the grid, AND make the shorter panel's body fill —.panel{display:flex;flex-direction:column}+ the inner regionflex:1. A child sized withblock-size:%(e.g. chart bars) needs a definite-height ancestor (aflex:1box or explicit height), or the % resolves to 0 and the element collapses. Wrap the bar in aflex:1.barboxand give the barblock-size:%of that. - A main region that's 80% whitespace reads as machine-generated. Fill a dashboard with real, plausible content (stats row + activity list + a chart), not one lonely widget. Intentional density is the difference between "designed" and "AI slop".
- Trailing gap in a toolbar/header: a flex item with
flex:1capped bymax-inline-sizestops growing and leaves empty space after the last item. Push the right-hand cluster withmargin-inline-start:autoon its first element. - Mobile nav must not overlap. Putting the sidebar and main in the same grid area makes an opened sidebar paint over content. On mobile switch the shell to
display:blockso opening the sidebar pushes main down. Reference:examples/component-states/app-shell.html.
Icons — real lucide, referenced by name (never hand-draw paths)
Hand-approximated SVG path data renders as broken glyphs (a help "?" became a dot; settings became a hamburger). Use verbatim lucide paths, referenced by name via an injected <symbol> sprite — examples/component-states/icons.js defines each icon once and <svg class="ico" aria-hidden="true"><use href="#i-NAME"/></svg> uses it. No per-use path duplication, no network, offline + gate-safe. Add a new icon to icons.js once; never paste raw paths into markup. (Inline lucide is acceptable only if the path is copied verbatim from lucide.) .ico{stroke:currentColor;fill:none;stroke-width:2} — color via currentColor.
Graphical / icon-only controls (3:1, theme-stable)
A no-text control (carousel dot, kebab, icon button) is held to 3:1 (WCAG 1.4.11), not 4.5 — verify_states applies this automatically when an element has no direct text node. Two traps it catches:
- An empty
<button>keeps the UAcolor:buttontext(≈black) regardless of theme → set itscolorto the actual indicator color and drive the visual viacurrentColor(e.g. dot is a::before{background:currentColor}), so the gate measures the real thing. - Theme-flipping tokens (
--color-chart-N,--color-surface-brand) invert between light/dark; white text or a teal indicator on them passes in one mode and fails the other. Use dark-aware values (override in[data-theme="dark"]) or stable tokens (--color-action-primary,--color-text-linkwhich adapts) for avatars, active dots, and selected states.
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.

