@gunkin/uiify 0.0.16-alpha → 0.0.19-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -9
- package/package.json +1 -1
- package/skills/uiify/SKILL.md +125 -125
- package/skills/uiify/references/compositions/card-rhythm.md +14 -0
- package/skills/uiify/references/compositions/destructive-confirmation.md +15 -0
- package/skills/uiify/references/compositions/form-grouping.md +14 -0
- package/skills/uiify/references/compositions/hero-actions.md +14 -0
- package/skills/uiify/references/compositions/page-frame.md +14 -0
- package/skills/uiify/references/compositions/pricing-actions.md +13 -0
- package/skills/uiify/references/compositions/save-feedback.md +13 -0
- package/skills/uiify/references/compositions/table-controls.md +14 -0
- package/skills/uiify/references/elements/accordion.md +38 -0
- package/skills/uiify/references/elements/alert-modal.md +42 -0
- package/skills/uiify/references/elements/avatar.md +47 -0
- package/skills/uiify/references/elements/badge.md +47 -0
- package/skills/uiify/references/elements/bar-chart.md +61 -0
- package/skills/uiify/references/elements/breadcrumb.md +38 -0
- package/skills/uiify/references/elements/button.md +49 -0
- package/skills/uiify/references/elements/candle-chart.md +38 -0
- package/skills/uiify/references/elements/card.md +51 -0
- package/skills/uiify/references/elements/carousel.md +38 -0
- package/skills/uiify/references/elements/checkbox.md +39 -0
- package/skills/uiify/references/elements/code-block.md +50 -0
- package/skills/uiify/references/elements/collapsible.md +38 -0
- package/skills/uiify/references/elements/color-picker.md +39 -0
- package/skills/uiify/references/elements/combobox.md +37 -0
- package/skills/uiify/references/elements/command-palette.md +43 -0
- package/skills/uiify/references/elements/context-menu.md +38 -0
- package/skills/uiify/references/elements/cookie-banner.md +51 -0
- package/skills/uiify/references/elements/date-picker.md +43 -0
- package/skills/uiify/references/elements/divider.md +46 -0
- package/skills/uiify/references/elements/drawer.md +38 -0
- package/skills/uiify/references/elements/dropdown-menu.md +38 -0
- package/skills/uiify/references/elements/empty-state.md +50 -0
- package/skills/uiify/references/elements/feature-grid.md +54 -0
- package/skills/uiify/references/elements/field.md +44 -0
- package/skills/uiify/references/elements/file-upload.md +40 -0
- package/skills/uiify/references/elements/footer.md +45 -0
- package/skills/uiify/references/elements/form.md +41 -0
- package/skills/uiify/references/elements/header.md +42 -0
- package/skills/uiify/references/elements/hero.md +54 -0
- package/skills/uiify/references/elements/hover-card.md +38 -0
- package/skills/uiify/references/elements/image-gallery.md +52 -0
- package/skills/uiify/references/elements/inline-alert.md +46 -0
- package/skills/uiify/references/elements/input.md +41 -0
- package/skills/uiify/references/elements/line-chart.md +38 -0
- package/skills/uiify/references/elements/logo-wall.md +49 -0
- package/skills/uiify/references/elements/modal.md +38 -0
- package/skills/uiify/references/elements/number-field.md +39 -0
- package/skills/uiify/references/elements/otp-input.md +39 -0
- package/skills/uiify/references/elements/pagination.md +41 -0
- package/skills/uiify/references/elements/password-input.md +43 -0
- package/skills/uiify/references/elements/popup.md +38 -0
- package/skills/uiify/references/elements/pricing-table.md +66 -0
- package/skills/uiify/references/elements/progress-bar.md +47 -0
- package/skills/uiify/references/elements/radio-group.md +39 -0
- package/skills/uiify/references/elements/rating.md +39 -0
- package/skills/uiify/references/elements/search-input.md +45 -0
- package/skills/uiify/references/elements/segmented-control.md +39 -0
- package/skills/uiify/references/elements/select.md +42 -0
- package/skills/uiify/references/elements/sidebar.md +43 -0
- package/skills/uiify/references/elements/skeleton.md +38 -0
- package/skills/uiify/references/elements/slider.md +39 -0
- package/skills/uiify/references/elements/spinner.md +38 -0
- package/skills/uiify/references/elements/stats-bar.md +49 -0
- package/skills/uiify/references/elements/stepper.md +43 -0
- package/skills/uiify/references/elements/switch.md +41 -0
- package/skills/uiify/references/elements/table-of-contents.md +39 -0
- package/skills/uiify/references/elements/table.md +43 -0
- package/skills/uiify/references/elements/tabs.md +38 -0
- package/skills/uiify/references/elements/tags-input.md +39 -0
- package/skills/uiify/references/elements/testimonial.md +52 -0
- package/skills/uiify/references/elements/textarea.md +41 -0
- package/skills/uiify/references/elements/timeline.md +48 -0
- package/skills/uiify/references/elements/toast.md +39 -0
- package/skills/uiify/references/elements/toggle-group.md +39 -0
- package/skills/uiify/references/elements/toggle.md +39 -0
- package/skills/uiify/references/elements/toolbar.md +39 -0
- package/skills/uiify/references/elements/tooltip.md +38 -0
- package/skills/uiify/references/elements/virtual-scroll.md +39 -0
- package/skills/uiify/references/examples/alert-confirmation.md +34 -0
- package/skills/uiify/references/examples/field-validation.md +37 -0
- package/skills/uiify/references/examples/select-basic.md +35 -0
- package/skills/uiify/references/examples/table-controls.md +40 -0
- package/skills/uiify/references/guides/assets.md +14 -0
- package/skills/uiify/references/guides/content.md +11 -0
- package/skills/uiify/references/guides/hierarchy.md +14 -0
- package/skills/uiify/references/guides/reference.md +9 -0
- package/skills/uiify/references/guides/states.md +12 -0
- package/skills/uiify/references/guides/surface.md +27 -0
- package/skills/uiify/references/laws/accessibility.md +11 -0
- package/skills/uiify/references/laws/error-prevention.md +12 -0
- package/skills/uiify/references/laws/feedback.md +9 -0
- package/skills/uiify/references/laws/proximity.md +10 -0
- package/skills/uiify/references/laws/readability.md +9 -0
- package/skills/uiify/references/laws/von-restorff.md +9 -0
- package/skills/uiify/scripts/lint.mjs +1 -1
- package/skills/uiify/scripts/static.mjs +71 -14
package/README.md
CHANGED
|
@@ -46,11 +46,19 @@ In a monorepo with hoisted dependencies, point to the nearest `node_modules/@gun
|
|
|
46
46
|
|
|
47
47
|
### `/uiify` page-building skill
|
|
48
48
|
|
|
49
|
-
The package also includes the `/uiify` AI skill.
|
|
50
|
-
web page with UIify
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
The package also includes the `/uiify` AI skill. Invoke it explicitly when creating or improving a
|
|
50
|
+
web page with UIify. It adds component and UX knowledge to your request while preserving the agent's
|
|
51
|
+
normal workflow: no staged approvals, routine questions or special status output. It follows the
|
|
52
|
+
requested framework route and existing workspace conventions, reads version-matched component
|
|
53
|
+
references and supports custom UI for components UIify does not provide. Existing design decisions
|
|
54
|
+
are reused; invoking the skill does not require creating `DESIGN.md`.
|
|
55
|
+
|
|
56
|
+
The skill ships a compact index plus individually retrievable element, UX-law and composition
|
|
57
|
+
references under `skills/uiify/references/`. During planning it reads recipes for the requested
|
|
58
|
+
elements and relationships between them, then reads the public component docs for matched UIify
|
|
59
|
+
components. It does not load the whole catalog into the prompt. The private harness catalog is the
|
|
60
|
+
source for reviewed knowledge; the package contains only its curated public projection. Knowledge
|
|
61
|
+
is delivered as files, so this workflow does not require an MCP server.
|
|
54
62
|
|
|
55
63
|
Install the skill into the directory your agent reads:
|
|
56
64
|
|
|
@@ -64,10 +72,15 @@ mkdir -p .claude/skills/uiify
|
|
|
64
72
|
cp -R node_modules/@gunkin/uiify/skills/uiify/. .claude/skills/uiify/
|
|
65
73
|
```
|
|
66
74
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
Claude Code uses `/uiify <page brief>`; other agents use their documented explicit skill invocation.
|
|
76
|
+
No special execution flag is needed. The repository's manual smoke harness exercises Claude Code
|
|
77
|
+
only; activation syntax and token measurements do not establish behavior for other clients.
|
|
78
|
+
|
|
79
|
+
For verification, the skill reuses project tooling. If missing Playwright or axe-core tooling or
|
|
80
|
+
browser binaries are needed, the agent briefly explains what it will install and why before
|
|
81
|
+
installation. This is a notice, not a routine confirmation question. Installation follows project
|
|
82
|
+
rules, uses development dependencies and includes only what is needed. Unavailable checks are
|
|
83
|
+
reported as not run.
|
|
71
84
|
|
|
72
85
|
### Keeping the skill current when developing UIify
|
|
73
86
|
|
|
@@ -77,6 +90,18 @@ usage changes, and update the harness catalog when its coverage or gap status ch
|
|
|
77
90
|
skill, then checks their tests and freshness. Review and commit generated changes with the component
|
|
78
91
|
change. `npm run check:ai-harness` runs the focused tests and freshness checks without rewriting files.
|
|
79
92
|
|
|
93
|
+
For new design knowledge, inspect the component API and examples; record sourced evidence in the
|
|
94
|
+
private catalog; write a concise `release_body`; review the public projection for privacy and
|
|
95
|
+
usefulness; regenerate the skill; and run package-link and hygiene tests. Private evidence and owner
|
|
96
|
+
rationale stay in the harness source; changing private notes alone does not change what consumers
|
|
97
|
+
receive.
|
|
98
|
+
|
|
99
|
+
The optional paid eval runner records each agent and judge call separately. An unknown cost reserves
|
|
100
|
+
that call's configured cap and blocks later paid calls. `results.json` is atomically checkpointed
|
|
101
|
+
before and after calls and throughout page verification; an existing non-empty output directory is
|
|
102
|
+
not reused. This protects recorded progress but does not measure whether one skill produces better
|
|
103
|
+
designs than another.
|
|
104
|
+
|
|
80
105
|
Documentation: https://uiify.gunkin.dev/
|
|
81
106
|
|
|
82
107
|
MIT © Anton Gunkin
|
package/package.json
CHANGED
package/skills/uiify/SKILL.md
CHANGED
|
@@ -8,160 +8,160 @@ disable-model-invocation: true
|
|
|
8
8
|
|
|
9
9
|
# /uiify
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Page request: $ARGUMENTS
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Add UIify component and UX knowledge to the user's request. Follow the agent's normal workflow and the project's instructions; this skill is a reference, not a separate interaction protocol. Do not add approval gates, fixed stages, routine questions or pauses. Use ordinary language in the user's language for useful progress and results, without internal stage names or machine-readable status markers. Proceed with authorized work autonomously; handle genuine missing requirements through the agent's normal workflow.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Project context
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Use the explicit request in the conversation if the client does not substitute `$ARGUMENTS`. Read repository instructions, the relevant package manifest and framework config, and a route example as needed. Resolve `@gunkin/uiify` from the selected workspace, including hoisted dependencies in parent workspaces. Follow the requested framework's route conventions and RSC/client boundaries. Create the requested route rather than replacing the home page; `src/App.tsx` is a destination only when it matches the request.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Reuse existing design decisions, tokens and conventions, including `DESIGN.md` when present. Do not create `DESIGN.md` or a managed state block merely because this skill was invoked. Create or update planning files only when the user or project workflow calls for them, preserving unrelated content. Keep changes within the requested page and necessary source files; setup and dependency changes follow the user's request and project rules.
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
2. Do the stage's work; tools are allowed.
|
|
23
|
-
3. Output the stage's result.
|
|
24
|
-
4. Run the gate: ask once with AskUserQuestion ("Continue to the next stage?" with the options Continue and Stop). On Continue print `UIIFY:GATE <from>><to> asked` and go on. On Stop print `UIIFY:STOPPED` and end the run.
|
|
21
|
+
## Choose an approach before composition
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
Use the request to choose an internal approach; do not ask the user to choose a mode:
|
|
27
24
|
|
|
28
|
-
|
|
25
|
+
- Reproduce an explicit visual reference while preserving its layout, content and recognizable details; read the reference guide before choosing composition and compare again after rendering.
|
|
26
|
+
- Extend the existing UI for a scoped change; keep surrounding routes and established design choices intact.
|
|
27
|
+
- Create or redesign when the request asks for a new page or a broad visual change.
|
|
28
|
+
- Audit when the user asks for findings rather than implementation; report observed issues and evidence.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Use this precedence: explicit brief or reference → existing project → selected recipes → aesthetic guidance. This classification only guides the work; continue the agent's normal workflow.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
When images or typography shape the composition, read `references/guides/assets.md` before choosing material. Skip it for routine UI changes where imagery and type are not part of the design decision.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
## Select knowledge for the page
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Match the needed elements to the Index by name or alias. Use the listed component binding; never invent a binding. A `gap` or an unlisted element needs custom UI, not a guessed UIify API.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
For each selected element with a fourth-column reference path, read that file once. A blank path means no curated recipe is available. From the Composition index, read only relationships where both elements are needed on the page. Read each selected reference and linked law once, including the related laws named by element recipes. Do not load the complete catalog or unrelated component references.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
For mapped components, read the resolved package's `agents/index.md` once and the relevant `agents/reference/components/<name>.md`, then adapt a documented example. Import from `@gunkin/uiify/components/<name>`. Inspect Runtime exports and the Types/declaration file before rendering: use the explicit `NameRoot` export when available. A namespace export is not itself a JSX component; use its `.Root` or an explicit root export. Prefer these version-matched references over memory. Use UIify wherever its documented API covers the interaction; for gaps, use semantic native HTML or custom components following UIify's public styling and accessibility contracts.
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
2. Use the R1 bindings as the coverage map. The skill package intentionally contains no private element, law or composition catalog files; do not search for `references/elements/`, `references/laws/` or `references/compositions/` under the skill directory. R3 reads UIify's public component documentation when implementing mapped elements.
|
|
44
|
-
3. Consult the `frontend-design` skill when it is available for design direction. Use `web-design-guidelines` only when the task asks for a review, and consult `vercel-react-best-practices` only for a relevant performance decision. These optional skills are references, not dependencies; if absent, use the built-in guidance below. UIify's public component and styling contracts take precedence over any conflicting advice.
|
|
45
|
-
4. Ground the page in its actual subject, audience and primary job. Choose a visual direction that follows the brief and is specific to that subject. Plan a clear typography hierarchy, palette using the project's existing semantic roles, responsive layout, purposeful copy and one memorable signature detail. Use restraint around that signature; don't default to a gradient hero, repeated equal cards or decorative numbering without a reason. Preserve visible focus, keyboard-sized targets and reduced-motion behavior.
|
|
46
|
-
5. Example: for a settings page, group fields by the decision the person is making, keep labels and validation close to each control, and give one `Button` the save action. Use the package's documented anatomy:
|
|
42
|
+
## Design guidance
|
|
47
43
|
|
|
48
|
-
|
|
49
|
-
<Field.Root id="email" invalid={invalid} required>
|
|
50
|
-
<Field.Label fieldId="email" required>Email</Field.Label>
|
|
51
|
-
<Field.Control as="input" fieldId="email" type="email" invalid={invalid} required />
|
|
52
|
-
<Field.Error fieldId="email" invalid={invalid}>Enter a valid email address</Field.Error>
|
|
53
|
-
</Field.Root>
|
|
54
|
-
<Button type="submit">Save changes</Button>
|
|
55
|
-
```
|
|
44
|
+
Consult `frontend-design` when available for design direction; if absent, use the built-in guidance below. Consult `vercel-react-best-practices` for relevant React performance decisions and `web-design-guidelines` for reviews. These skills are optional references. UIify's public component and styling contracts take precedence over conflicting advice.
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
6. Keep existing decisions and plan the page's element order, hierarchy, grouping, actions and visual direction as a decision with id `page-plan`, a concrete `decision`, `why` and `references`. Reuse an existing plan unless the brief requires an explicit revision; retain other decisions. Research only unresolved gaps or open decisions in a subagent, if both delegation and primary-source retrieval tools are available. Request a short summary with dated primary-source links. If those tools are unavailable, report unresolved gaps and keep them `proposed`. Record dates alongside the source URLs in `sources`. Only explicit owner approval can make a gap `accepted`; `--auto` never grants approval. Follow owner prose and report conflicts with the brief; interactive mode can clarify at the normal gate, while `--auto` preserves recorded choices.
|
|
59
|
-
7. Store state only in one JSON block beneath `## Decisions`, delimited by an opening `<!-- uiify:state -->` line and a closing `<!-- /uiify:state -->` line. Its exact shape is `{ "version": 1, "elements": ["R1-name"], "decisions": [{ "id": "page-plan", "decision": "concrete page plan and visual direction", "why": "reason", "references": ["public UIify docs or dated source URLs"] }], "gaps": [{ "element": "gap-name", "status": "proposed", "sources": [] }] }`. Empty lists are allowed; IDs and elements are unique; strings are nonempty. Do not put prose or fences inside the JSON block. Reject duplicate, unclosed, misplaced or invalid blocks. Insert the block immediately after the Decisions heading's newline, without changing surrounding bytes; replace only an existing block and its following newline. If state is unchanged, leave the whole file byte-identical. Keep existing gap acceptance and sources; do not infer approval from research.
|
|
46
|
+
After the page renders, review it with a guide only when its question applies:
|
|
60
47
|
|
|
61
|
-
|
|
48
|
+
- `references/guides/surface.md` — what kind of page is this, and how expressive should it be?
|
|
49
|
+
- `references/guides/reference.md` — only when a reference or existing page is being compared.
|
|
50
|
+
- `references/guides/assets.md` — only when images or typography shape the composition.
|
|
51
|
+
- `references/guides/hierarchy.md` — what leads the eye, and do the parts read in the right order?
|
|
52
|
+
- `references/guides/content.md` — does the copy say what this page and each action actually do?
|
|
53
|
+
- `references/guides/states.md` — does the page still work outside the happy path?
|
|
62
54
|
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
tokens: {}
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
# Design
|
|
55
|
+
Ground the visual direction in the subject, audience and primary job. Plan clear typography, hierarchy, grouping, purposeful copy and responsive layout using existing semantic color roles. Choose one signature detail appropriate to the subject and keep the rest restrained. Avoid defaulting to a gradient hero, repeated equal cards or decorative numbering without a reason. Preserve visible focus, keyboard-sized targets and reduced-motion behavior.
|
|
69
56
|
|
|
70
|
-
|
|
57
|
+
For a settings page, group fields by the decision the person makes, keep labels and validation close to controls, and give one `Button` the save action. Use documented anatomy:
|
|
71
58
|
|
|
72
|
-
|
|
59
|
+
```tsx
|
|
60
|
+
<Field.Root id="email" invalid={invalid} required>
|
|
61
|
+
<Field.Label fieldId="email" required>Email</Field.Label>
|
|
62
|
+
<Field.Control as="input" fieldId="email" type="email" invalid={invalid} required />
|
|
63
|
+
<Field.Error fieldId="email" invalid={invalid}>Enter a valid email address</Field.Error>
|
|
64
|
+
</Field.Root>
|
|
65
|
+
<Button type="submit">Save changes</Button>
|
|
73
66
|
```
|
|
74
67
|
|
|
75
|
-
|
|
68
|
+
Do not add an unrelated marketing hero or make every field group an equally prominent card. For unresolved gaps, explain material limitations in plain language; research only when it helps the request. Research does not grant approval to change the library's public API or mark a catalog gap accepted.
|
|
76
69
|
|
|
77
|
-
|
|
70
|
+
## Verification guidance
|
|
78
71
|
|
|
79
|
-
|
|
72
|
+
Use applicable project build, typecheck and test commands when permitted. The optional `node <resolved-skill-directory>/scripts/lint.mjs <project-root>` runs the static checks compiled from the published laws when this skill was built and prints their names; it does not read `DESIGN.md` or other design files. It inspects literal attributes of lowercase intrinsic JSX tags and of parts imported from `@gunkin/uiify/components` or `@gunkin/uiify/elements` (for example `Button` or `Field.Control`); other custom components are not analyzed. No findings is not proof of accessibility. Missing parsers or execution failures mean unavailable, never a pass.
|
|
80
73
|
|
|
81
|
-
|
|
74
|
+
Reuse existing browser and accessibility tooling to inspect responsive layouts, keyboard access and requested interactions. When missing tools are needed for quality verification, use Playwright for browser checks and axe-core (or the project's axe integration) for accessibility checks. Before installing missing Playwright or axe-core packages or downloading browser binaries, notify the user briefly in their language, explaining what will be installed and why. For example: “I'll install Playwright and axe-core as development tools to check the page in a browser and catch accessibility issues.” This is a notification, not a confirmation question; continue within existing authorization and respect project installation rules. Use the project's package manager and development dependencies, reuse existing integrations, and install only what is needed.
|
|
82
75
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
- Prefer published UIify component documentation over memory when implementing a mapped element.
|
|
86
|
-
- Use a uiify component whenever the index names one for the element.
|
|
87
|
-
- Ground visual choices in the brief and subject; don't impose one preferred palette or page template.
|
|
88
|
-
- Apply optional frontend skills only when available and relevant; UIify's public contracts override generic advice.
|
|
89
|
-
- Match elements only against the index: never invent a binding and never use an alias as the element name.
|
|
90
|
-
- Run every stage in this conversation and never use context: fork.
|
|
91
|
-
- Write only `DESIGN.md` and files under `src/`; R2 changes only its managed state block, R4 repairs only `src/` in at most two rounds.
|
|
76
|
+
Repair findings within the task's scope and rerun the affected checks. If commands, installation or browser execution are unavailable or prohibited, report those checks as not run and explain the limitation. Report actual checks and remaining issues in ordinary language; never claim a check passed without running it.
|
|
92
77
|
|
|
93
78
|
## Index
|
|
94
79
|
|
|
95
|
-
One line per element: `element|aliases|uiify component or gap
|
|
80
|
+
One line per element: `element|aliases|uiify component or gap|reference path`. A blank final field means no curated reference.
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
accordion|faq-accordion,disclosure|accordion|references/elements/accordion.md
|
|
84
|
+
alert-modal|confirmation-dialog,alert-dialog|alert-modal|references/elements/alert-modal.md
|
|
85
|
+
avatar|profile-picture|gap|references/elements/avatar.md
|
|
86
|
+
badge|chip,tag|gap|references/elements/badge.md
|
|
87
|
+
bar-chart|column-chart|gap|references/elements/bar-chart.md
|
|
88
|
+
breadcrumb|breadcrumbs|breadcrumb|references/elements/breadcrumb.md
|
|
89
|
+
button|cta-button,icon-button,primary-button|button|references/elements/button.md
|
|
90
|
+
candle-chart|candlestick-chart|candle-chart|references/elements/candle-chart.md
|
|
91
|
+
card|content-card|gap|references/elements/card.md
|
|
92
|
+
carousel|testimonial-carousel,image-slider|carousel|references/elements/carousel.md
|
|
93
|
+
checkbox||checkbox|references/elements/checkbox.md
|
|
94
|
+
code-block|code-snippet|gap|references/elements/code-block.md
|
|
95
|
+
collapsible|expandable-section|collapsible|references/elements/collapsible.md
|
|
96
|
+
color-picker||color-picker|references/elements/color-picker.md
|
|
97
|
+
combobox|autocomplete,typeahead|combobox|references/elements/combobox.md
|
|
98
|
+
command-palette|spotlight-search|gap|references/elements/command-palette.md
|
|
99
|
+
context-menu|right-click-menu|context-menu|references/elements/context-menu.md
|
|
100
|
+
cookie-banner|cookie-consent|gap|references/elements/cookie-banner.md
|
|
101
|
+
date-picker|calendar-picker|gap|references/elements/date-picker.md
|
|
102
|
+
divider|separator|gap|references/elements/divider.md
|
|
103
|
+
drawer|sheet,off-canvas-menu|drawer|references/elements/drawer.md
|
|
104
|
+
dropdown-menu|menu|dropdown-menu|references/elements/dropdown-menu.md
|
|
105
|
+
empty-state|no-results|gap|references/elements/empty-state.md
|
|
106
|
+
feature-grid|feature-cards,feature-list|gap|references/elements/feature-grid.md
|
|
107
|
+
field|form-field|field|references/elements/field.md
|
|
108
|
+
file-upload|file-input,dropzone|file-upload|references/elements/file-upload.md
|
|
109
|
+
footer|site-footer|gap|references/elements/footer.md
|
|
110
|
+
form||form|references/elements/form.md
|
|
111
|
+
header|navbar,top-nav|header|references/elements/header.md
|
|
112
|
+
hero|hero-section,hero-banner|gap|references/elements/hero.md
|
|
113
|
+
hover-card||hover-card|references/elements/hover-card.md
|
|
114
|
+
image-gallery|gallery,lightbox|gap|references/elements/image-gallery.md
|
|
115
|
+
inline-alert|banner-alert,callout|gap|references/elements/inline-alert.md
|
|
116
|
+
input|text-input|input|references/elements/input.md
|
|
117
|
+
line-chart|sparkline|line-chart|references/elements/line-chart.md
|
|
118
|
+
logo-wall|logo-cloud,customer-logos|gap|references/elements/logo-wall.md
|
|
119
|
+
modal|dialog|modal|references/elements/modal.md
|
|
120
|
+
number-field|number-input|number-field|references/elements/number-field.md
|
|
121
|
+
otp-input|pin-input|otp-input|references/elements/otp-input.md
|
|
122
|
+
pagination||pagination|references/elements/pagination.md
|
|
123
|
+
password-input|show-hide-password|gap|references/elements/password-input.md
|
|
124
|
+
popup|popover|popup|references/elements/popup.md
|
|
125
|
+
pricing-table|pricing,plan-cards,pricing-plans|gap|references/elements/pricing-table.md
|
|
126
|
+
progress-bar|progress,linear-progress|gap|references/elements/progress-bar.md
|
|
127
|
+
radio-group|radio|radio-group|references/elements/radio-group.md
|
|
128
|
+
rating|star-rating|rating|references/elements/rating.md
|
|
129
|
+
search-input|search-box|gap|references/elements/search-input.md
|
|
130
|
+
segmented-control||segmented-control|references/elements/segmented-control.md
|
|
131
|
+
select|native-select|select|references/elements/select.md
|
|
132
|
+
sidebar|sidebar-nav,side-nav|gap|references/elements/sidebar.md
|
|
133
|
+
skeleton|skeleton-loader|skeleton|references/elements/skeleton.md
|
|
134
|
+
slider|range-slider|slider|references/elements/slider.md
|
|
135
|
+
spinner|loading-indicator|spinner|references/elements/spinner.md
|
|
136
|
+
stats-bar|stat-card,metrics|gap|references/elements/stats-bar.md
|
|
137
|
+
stepper|step-indicator,wizard-steps|gap|references/elements/stepper.md
|
|
138
|
+
switch|toggle-switch|switch|references/elements/switch.md
|
|
139
|
+
table|data-table,comparison-table|table|references/elements/table.md
|
|
140
|
+
table-of-contents|toc,in-page-nav|table-of-contents|references/elements/table-of-contents.md
|
|
141
|
+
tabs|tab-navigation|tabs|references/elements/tabs.md
|
|
142
|
+
tags-input|token-input|tags-input|references/elements/tags-input.md
|
|
143
|
+
testimonial|testimonials,quote-card|gap|references/elements/testimonial.md
|
|
144
|
+
textarea||textarea|references/elements/textarea.md
|
|
145
|
+
timeline||gap|references/elements/timeline.md
|
|
146
|
+
toast|snackbar,toast-notification|toast|references/elements/toast.md
|
|
147
|
+
toggle|toggle-button|toggle|references/elements/toggle.md
|
|
148
|
+
toggle-group|button-group|toggle-group|references/elements/toggle-group.md
|
|
149
|
+
toolbar||toolbar|references/elements/toolbar.md
|
|
150
|
+
tooltip||tooltip|references/elements/tooltip.md
|
|
151
|
+
virtual-scroll|virtualized-list|virtual-scroll|references/elements/virtual-scroll.md
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Composition index
|
|
155
|
+
|
|
156
|
+
One line per accepted relationship: `name|element,element|reference path`.
|
|
96
157
|
|
|
97
158
|
```text
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
card|content-card|gap|
|
|
107
|
-
carousel|testimonial-carousel,image-slider|carousel|
|
|
108
|
-
checkbox||checkbox|
|
|
109
|
-
code-block|code-snippet|gap|
|
|
110
|
-
collapsible|expandable-section|collapsible|
|
|
111
|
-
color-picker||color-picker|
|
|
112
|
-
combobox|autocomplete,typeahead|combobox|
|
|
113
|
-
command-palette|spotlight-search|gap|
|
|
114
|
-
context-menu|right-click-menu|context-menu|
|
|
115
|
-
cookie-banner|cookie-consent|gap|
|
|
116
|
-
date-picker|calendar-picker|gap|
|
|
117
|
-
divider|separator|gap|
|
|
118
|
-
drawer|sheet,off-canvas-menu|drawer|
|
|
119
|
-
dropdown-menu|menu|dropdown-menu|
|
|
120
|
-
empty-state|no-results|gap|
|
|
121
|
-
feature-grid|feature-cards,feature-list|gap|
|
|
122
|
-
field|form-field|field|
|
|
123
|
-
file-upload|file-input,dropzone|file-upload|
|
|
124
|
-
footer|site-footer|gap|
|
|
125
|
-
form||form|
|
|
126
|
-
header|navbar,top-nav|header|
|
|
127
|
-
hero|hero-section,hero-banner|gap|
|
|
128
|
-
hover-card||hover-card|
|
|
129
|
-
image-gallery|gallery,lightbox|gap|
|
|
130
|
-
inline-alert|banner-alert,callout|gap|
|
|
131
|
-
input|text-input|input|
|
|
132
|
-
line-chart|sparkline|line-chart|
|
|
133
|
-
logo-wall|logo-cloud,customer-logos|gap|
|
|
134
|
-
modal|dialog|modal|
|
|
135
|
-
number-field|number-input|number-field|
|
|
136
|
-
otp-input|pin-input|otp-input|
|
|
137
|
-
pagination||pagination|
|
|
138
|
-
password-input|show-hide-password|gap|
|
|
139
|
-
popup|popover|popup|
|
|
140
|
-
pricing-table|pricing,plan-cards,pricing-plans|gap|
|
|
141
|
-
progress-bar|progress,linear-progress|gap|
|
|
142
|
-
radio-group|radio|radio-group|
|
|
143
|
-
rating|star-rating|rating|
|
|
144
|
-
search-input|search-box|gap|
|
|
145
|
-
segmented-control||segmented-control|
|
|
146
|
-
select|native-select|select|
|
|
147
|
-
sidebar|sidebar-nav,side-nav|gap|
|
|
148
|
-
skeleton|skeleton-loader|skeleton|
|
|
149
|
-
slider|range-slider|slider|
|
|
150
|
-
spinner|loading-indicator|spinner|
|
|
151
|
-
stats-bar|stat-card,metrics|gap|
|
|
152
|
-
stepper|step-indicator,wizard-steps|gap|
|
|
153
|
-
switch|toggle-switch|switch|
|
|
154
|
-
table|data-table,comparison-table|table|
|
|
155
|
-
table-of-contents|toc,in-page-nav|table-of-contents|
|
|
156
|
-
tabs|tab-navigation|tabs|
|
|
157
|
-
tags-input|token-input|tags-input|
|
|
158
|
-
testimonial|testimonials,quote-card|gap|
|
|
159
|
-
textarea||textarea|
|
|
160
|
-
timeline||gap|
|
|
161
|
-
toast|snackbar,toast-notification|toast|
|
|
162
|
-
toggle|toggle-button|toggle|
|
|
163
|
-
toggle-group|button-group|toggle-group|
|
|
164
|
-
toolbar||toolbar|
|
|
165
|
-
tooltip||tooltip|
|
|
166
|
-
virtual-scroll|virtualized-list|virtual-scroll|
|
|
159
|
+
card-rhythm|feature-grid,card|references/compositions/card-rhythm.md
|
|
160
|
+
destructive-confirmation|alert-modal,button|references/compositions/destructive-confirmation.md
|
|
161
|
+
form-grouping|form,field|references/compositions/form-grouping.md
|
|
162
|
+
hero-actions|hero,button|references/compositions/hero-actions.md
|
|
163
|
+
page-frame|header,footer|references/compositions/page-frame.md
|
|
164
|
+
pricing-actions|pricing-table,button|references/compositions/pricing-actions.md
|
|
165
|
+
save-feedback|button,toast|references/compositions/save-feedback.md
|
|
166
|
+
table-controls|table,pagination|references/compositions/table-controls.md
|
|
167
167
|
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# card-rhythm
|
|
2
|
+
|
|
3
|
+
Use when both feature-grid and card are present.
|
|
4
|
+
|
|
5
|
+
Law: references/laws/proximity.md
|
|
6
|
+
|
|
7
|
+
## Rule
|
|
8
|
+
|
|
9
|
+
Keep cards in one group only when the items share a purpose and hierarchy. Preserve readable separation and source order as the layout becomes a single column.
|
|
10
|
+
|
|
11
|
+
## Sources
|
|
12
|
+
|
|
13
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
14
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/visual-presentation.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# destructive-confirmation
|
|
2
|
+
|
|
3
|
+
Use when both alert-modal and button are present.
|
|
4
|
+
|
|
5
|
+
Law: references/laws/error-prevention.md
|
|
6
|
+
|
|
7
|
+
## Rule
|
|
8
|
+
|
|
9
|
+
State the consequence in the dialog title or message. Name both the destructive action and the safe way to cancel. Put initial focus on the safe action; Cancel and Escape preserve the item and return focus. After confirmation removes the item, move focus to a connected element. Identify the dialog and follow the modal-dialog keyboard pattern.
|
|
10
|
+
|
|
11
|
+
## Sources
|
|
12
|
+
|
|
13
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/) (verified 2026-10-16)
|
|
14
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) (verified 2026-10-16)
|
|
15
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# form-grouping
|
|
2
|
+
|
|
3
|
+
Use when both form and field are present.
|
|
4
|
+
|
|
5
|
+
Law: references/laws/proximity.md
|
|
6
|
+
|
|
7
|
+
## Rule
|
|
8
|
+
|
|
9
|
+
Group related controls with a fieldset and legend. Keep each control labelled and present groups in the order people complete them.
|
|
10
|
+
|
|
11
|
+
## Sources
|
|
12
|
+
|
|
13
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/grouping/) (verified 2026-10-16)
|
|
14
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-16)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# hero-actions
|
|
2
|
+
|
|
3
|
+
Use when both hero and button are present.
|
|
4
|
+
|
|
5
|
+
Law: references/laws/von-restorff.md
|
|
6
|
+
|
|
7
|
+
## Rule
|
|
8
|
+
|
|
9
|
+
Place the main action beside the hero message it advances, give it the clearest emphasis and an outcome-specific label, then place any secondary action after it with quieter treatment. Preserve that reading order when actions stack.
|
|
10
|
+
|
|
11
|
+
## Sources
|
|
12
|
+
|
|
13
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-17)
|
|
14
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# page-frame
|
|
2
|
+
|
|
3
|
+
Use when both header and footer are present.
|
|
4
|
+
|
|
5
|
+
Law: references/laws/readability.md
|
|
6
|
+
|
|
7
|
+
## Rule
|
|
8
|
+
|
|
9
|
+
Use consistent page landmarks and repeated navigation order. Align header, main content and footer to one responsive content measure without clipping narrow screens.
|
|
10
|
+
|
|
11
|
+
## Sources
|
|
12
|
+
|
|
13
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/consistent-navigation.html) (verified 2026-10-16)
|
|
14
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# pricing-actions
|
|
2
|
+
|
|
3
|
+
Use when both pricing-table and button are present.
|
|
4
|
+
|
|
5
|
+
Law: references/laws/proximity.md
|
|
6
|
+
|
|
7
|
+
## Rule
|
|
8
|
+
|
|
9
|
+
Keep each plan action associated with the plan name, price and included features. Let the page stack plans at narrow widths without changing their reading order.
|
|
10
|
+
|
|
11
|
+
## Sources
|
|
12
|
+
|
|
13
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# save-feedback
|
|
2
|
+
|
|
3
|
+
Use when both button and toast are present.
|
|
4
|
+
|
|
5
|
+
Law: references/laws/feedback.md
|
|
6
|
+
|
|
7
|
+
## Rule
|
|
8
|
+
|
|
9
|
+
Place save feedback near the action it describes and announce the update as a status message. Preserve valid field values when validation fails; allow correction and a successful save. Keep the message understandable without color or motion.
|
|
10
|
+
|
|
11
|
+
## Sources
|
|
12
|
+
|
|
13
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# table-controls
|
|
2
|
+
|
|
3
|
+
Use when both table and pagination are present.
|
|
4
|
+
|
|
5
|
+
Law: references/laws/proximity.md
|
|
6
|
+
|
|
7
|
+
## Rule
|
|
8
|
+
|
|
9
|
+
Keep labeled search and filters associated with the table they change. Applying a filter returns to a valid page with matching rows; Reset restores the original result set and first page. Identify the current page and preserve a clear sequence from controls to rows to pagination.
|
|
10
|
+
|
|
11
|
+
## Sources
|
|
12
|
+
|
|
13
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-16)
|
|
14
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# accordion
|
|
2
|
+
|
|
3
|
+
Binding: accordion
|
|
4
|
+
|
|
5
|
+
Reveal optional sections without hiding content most visitors need.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Use for FAQs or optional details when visitors need only a small subset. Keep content visible when most visitors need it; use `stepper` for sequential tasks.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not hide the page's main explanation or an action that is the only way to continue inside a closed section.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
`Accordion` takes an `id`, `items` with a `value`, `label`, and `panel`, and `type="single"` or `"multiple"`. The visible summary is the question or section title; make it describe the revealed content. Single mode uses native `<details name>` grouping, so opening one section closes the other.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Let long summaries wrap and preserve a clear open/closed cue. Keep summaries and their focus indicators visible at narrow widths.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Items start closed unless selected by `defaultValue`. Native `<details>` supports keyboard activation; its `name` group permits only one open section at a time. Search behavior for text inside closed sections can vary, so verify it in target browsers when page search matters.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Use Tab to reach each summary, Enter or Space to toggle it, and confirm the focus indicator remains visible. Check long labels, single and multiple modes, and whether browser find-in-page reveals matching closed content in supported target browsers.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Hiding the only primary action in a section that starts closed makes the page's next step easy to miss.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) (verified 2026-10-17)
|
|
38
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/) (verified 2026-10-17)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# alert-modal
|
|
2
|
+
|
|
3
|
+
Binding: alert-modal
|
|
4
|
+
|
|
5
|
+
A short, important message requires an immediate response, especially confirmation before a consequential action
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A short, important message requires an immediate response, especially confirmation before a consequential action. Use a regular modal for a task or optional information, and inline validation for recoverable form errors.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use alert dialogs for routine notices or long, structured content. Do not make a destructive choice the default or leave consequences implicit.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
The convenience `AlertModal` provides a trigger, visible title, optional short description, Cancel, and Action. State the consequence in the description and make both choices explicit; the action uses the destructive variant.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the message concise so it remains understandable in the modal at narrow widths and zoom. Allow the text to wrap; do not rely on color or icon alone to explain the consequence.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Tier 0 uses a native modal [dialog role=alertdialog] opened by native invokers. Cancel and Action request close. Use the client entry only when application-controlled state is required.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check the accessible name and description, opening and closing by keyboard, focus containment and return, both explicit choices, and the narrow/zoomed layout. Confirm initial focus lands on Cancel, the safe choice: `AlertModal` renders Cancel before Action, so keep focusable content out of the dialog body above them.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
A red Delete button is not enough: name what will be deleted and what happens after each choice.
|
|
34
|
+
Example: `references/examples/alert-confirmation.md`.
|
|
35
|
+
|
|
36
|
+
Related laws: references/laws/error-prevention.md, references/laws/accessibility.md
|
|
37
|
+
|
|
38
|
+
## Sources
|
|
39
|
+
|
|
40
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/) (verified 2026-10-17)
|
|
41
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) (verified 2026-10-17)
|
|
42
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-17)
|