@gunkin/uiify 0.0.17-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/package.json +1 -1
- package/skills/uiify/SKILL.md +55 -33
- package/skills/uiify/references/compositions/card-rhythm.md +0 -2
- package/skills/uiify/references/compositions/destructive-confirmation.md +1 -3
- package/skills/uiify/references/compositions/form-grouping.md +0 -2
- package/skills/uiify/references/compositions/hero-actions.md +3 -5
- package/skills/uiify/references/compositions/page-frame.md +0 -2
- package/skills/uiify/references/compositions/pricing-actions.md +0 -2
- package/skills/uiify/references/compositions/save-feedback.md +1 -3
- package/skills/uiify/references/compositions/table-controls.md +1 -3
- package/skills/uiify/references/elements/accordion.md +38 -0
- package/skills/uiify/references/elements/alert-modal.md +32 -5
- package/skills/uiify/references/elements/avatar.md +31 -2
- package/skills/uiify/references/elements/badge.md +32 -3
- package/skills/uiify/references/elements/bar-chart.md +39 -7
- package/skills/uiify/references/elements/breadcrumb.md +38 -0
- package/skills/uiify/references/elements/button.md +38 -3
- package/skills/uiify/references/elements/candle-chart.md +38 -0
- package/skills/uiify/references/elements/card.md +38 -1
- 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 +31 -2
- 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 +33 -12
- package/skills/uiify/references/elements/context-menu.md +38 -0
- package/skills/uiify/references/elements/cookie-banner.md +30 -2
- package/skills/uiify/references/elements/date-picker.md +33 -9
- package/skills/uiify/references/elements/divider.md +30 -2
- 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 +30 -2
- package/skills/uiify/references/elements/feature-grid.md +41 -1
- package/skills/uiify/references/elements/field.md +33 -3
- package/skills/uiify/references/elements/file-upload.md +40 -0
- package/skills/uiify/references/elements/footer.md +35 -4
- package/skills/uiify/references/elements/form.md +31 -4
- package/skills/uiify/references/elements/header.md +31 -3
- package/skills/uiify/references/elements/hero.md +43 -3
- package/skills/uiify/references/elements/hover-card.md +38 -0
- package/skills/uiify/references/elements/image-gallery.md +36 -4
- package/skills/uiify/references/elements/inline-alert.md +30 -2
- package/skills/uiify/references/elements/input.md +31 -4
- package/skills/uiify/references/elements/line-chart.md +38 -0
- package/skills/uiify/references/elements/logo-wall.md +31 -2
- 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 +31 -4
- package/skills/uiify/references/elements/password-input.md +33 -9
- package/skills/uiify/references/elements/popup.md +38 -0
- package/skills/uiify/references/elements/pricing-table.md +55 -2
- package/skills/uiify/references/elements/progress-bar.md +32 -4
- 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 +35 -4
- package/skills/uiify/references/elements/segmented-control.md +39 -0
- package/skills/uiify/references/elements/select.md +29 -1
- package/skills/uiify/references/elements/sidebar.md +33 -10
- 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 +30 -2
- package/skills/uiify/references/elements/stepper.md +32 -9
- package/skills/uiify/references/elements/switch.md +31 -4
- package/skills/uiify/references/elements/table-of-contents.md +39 -0
- package/skills/uiify/references/elements/table.md +32 -3
- 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 +35 -4
- package/skills/uiify/references/elements/textarea.md +30 -3
- package/skills/uiify/references/elements/timeline.md +31 -3
- package/skills/uiify/references/elements/toast.md +27 -1
- 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/scripts/lint.mjs +1 -1
- package/skills/uiify/scripts/static.mjs +71 -14
package/package.json
CHANGED
package/skills/uiify/SKILL.md
CHANGED
|
@@ -18,6 +18,19 @@ Use the explicit request in the conversation if the client does not substitute `
|
|
|
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
|
+
## Choose an approach before composition
|
|
22
|
+
|
|
23
|
+
Use the request to choose an internal approach; do not ask the user to choose a mode:
|
|
24
|
+
|
|
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
|
+
|
|
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
|
+
|
|
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
|
+
|
|
21
34
|
## Select knowledge for the page
|
|
22
35
|
|
|
23
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.
|
|
@@ -30,6 +43,15 @@ For mapped components, read the resolved package's `agents/index.md` once and th
|
|
|
30
43
|
|
|
31
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.
|
|
32
45
|
|
|
46
|
+
After the page renders, review it with a guide only when its question applies:
|
|
47
|
+
|
|
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?
|
|
54
|
+
|
|
33
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.
|
|
34
56
|
|
|
35
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:
|
|
@@ -47,7 +69,7 @@ Do not add an unrelated marketing hero or make every field group an equally prom
|
|
|
47
69
|
|
|
48
70
|
## Verification guidance
|
|
49
71
|
|
|
50
|
-
Use applicable project build, typecheck and test commands when permitted. The optional `node <resolved-skill-directory>/scripts/lint.mjs <project-root>`
|
|
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.
|
|
51
73
|
|
|
52
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.
|
|
53
75
|
|
|
@@ -58,75 +80,75 @@ Repair findings within the task's scope and rerun the affected checks. If comman
|
|
|
58
80
|
One line per element: `element|aliases|uiify component or gap|reference path`. A blank final field means no curated reference.
|
|
59
81
|
|
|
60
82
|
```text
|
|
61
|
-
accordion|faq-accordion,disclosure|accordion|
|
|
83
|
+
accordion|faq-accordion,disclosure|accordion|references/elements/accordion.md
|
|
62
84
|
alert-modal|confirmation-dialog,alert-dialog|alert-modal|references/elements/alert-modal.md
|
|
63
85
|
avatar|profile-picture|gap|references/elements/avatar.md
|
|
64
86
|
badge|chip,tag|gap|references/elements/badge.md
|
|
65
87
|
bar-chart|column-chart|gap|references/elements/bar-chart.md
|
|
66
|
-
breadcrumb|breadcrumbs|breadcrumb|
|
|
88
|
+
breadcrumb|breadcrumbs|breadcrumb|references/elements/breadcrumb.md
|
|
67
89
|
button|cta-button,icon-button,primary-button|button|references/elements/button.md
|
|
68
|
-
candle-chart|candlestick-chart|candle-chart|
|
|
90
|
+
candle-chart|candlestick-chart|candle-chart|references/elements/candle-chart.md
|
|
69
91
|
card|content-card|gap|references/elements/card.md
|
|
70
|
-
carousel|testimonial-carousel,image-slider|carousel|
|
|
71
|
-
checkbox||checkbox|
|
|
92
|
+
carousel|testimonial-carousel,image-slider|carousel|references/elements/carousel.md
|
|
93
|
+
checkbox||checkbox|references/elements/checkbox.md
|
|
72
94
|
code-block|code-snippet|gap|references/elements/code-block.md
|
|
73
|
-
collapsible|expandable-section|collapsible|
|
|
74
|
-
color-picker||color-picker|
|
|
75
|
-
combobox|autocomplete,typeahead|combobox|
|
|
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
|
|
76
98
|
command-palette|spotlight-search|gap|references/elements/command-palette.md
|
|
77
|
-
context-menu|right-click-menu|context-menu|
|
|
99
|
+
context-menu|right-click-menu|context-menu|references/elements/context-menu.md
|
|
78
100
|
cookie-banner|cookie-consent|gap|references/elements/cookie-banner.md
|
|
79
101
|
date-picker|calendar-picker|gap|references/elements/date-picker.md
|
|
80
102
|
divider|separator|gap|references/elements/divider.md
|
|
81
|
-
drawer|sheet,off-canvas-menu|drawer|
|
|
82
|
-
dropdown-menu|menu|dropdown-menu|
|
|
103
|
+
drawer|sheet,off-canvas-menu|drawer|references/elements/drawer.md
|
|
104
|
+
dropdown-menu|menu|dropdown-menu|references/elements/dropdown-menu.md
|
|
83
105
|
empty-state|no-results|gap|references/elements/empty-state.md
|
|
84
106
|
feature-grid|feature-cards,feature-list|gap|references/elements/feature-grid.md
|
|
85
107
|
field|form-field|field|references/elements/field.md
|
|
86
|
-
file-upload|file-input,dropzone|file-upload|
|
|
108
|
+
file-upload|file-input,dropzone|file-upload|references/elements/file-upload.md
|
|
87
109
|
footer|site-footer|gap|references/elements/footer.md
|
|
88
110
|
form||form|references/elements/form.md
|
|
89
111
|
header|navbar,top-nav|header|references/elements/header.md
|
|
90
112
|
hero|hero-section,hero-banner|gap|references/elements/hero.md
|
|
91
|
-
hover-card||hover-card|
|
|
113
|
+
hover-card||hover-card|references/elements/hover-card.md
|
|
92
114
|
image-gallery|gallery,lightbox|gap|references/elements/image-gallery.md
|
|
93
115
|
inline-alert|banner-alert,callout|gap|references/elements/inline-alert.md
|
|
94
116
|
input|text-input|input|references/elements/input.md
|
|
95
|
-
line-chart|sparkline|line-chart|
|
|
117
|
+
line-chart|sparkline|line-chart|references/elements/line-chart.md
|
|
96
118
|
logo-wall|logo-cloud,customer-logos|gap|references/elements/logo-wall.md
|
|
97
|
-
modal|dialog|modal|
|
|
98
|
-
number-field|number-input|number-field|
|
|
99
|
-
otp-input|pin-input|otp-input|
|
|
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
|
|
100
122
|
pagination||pagination|references/elements/pagination.md
|
|
101
123
|
password-input|show-hide-password|gap|references/elements/password-input.md
|
|
102
|
-
popup|popover|popup|
|
|
124
|
+
popup|popover|popup|references/elements/popup.md
|
|
103
125
|
pricing-table|pricing,plan-cards,pricing-plans|gap|references/elements/pricing-table.md
|
|
104
126
|
progress-bar|progress,linear-progress|gap|references/elements/progress-bar.md
|
|
105
|
-
radio-group|radio|radio-group|
|
|
106
|
-
rating|star-rating|rating|
|
|
127
|
+
radio-group|radio|radio-group|references/elements/radio-group.md
|
|
128
|
+
rating|star-rating|rating|references/elements/rating.md
|
|
107
129
|
search-input|search-box|gap|references/elements/search-input.md
|
|
108
|
-
segmented-control||segmented-control|
|
|
130
|
+
segmented-control||segmented-control|references/elements/segmented-control.md
|
|
109
131
|
select|native-select|select|references/elements/select.md
|
|
110
132
|
sidebar|sidebar-nav,side-nav|gap|references/elements/sidebar.md
|
|
111
|
-
skeleton|skeleton-loader|skeleton|
|
|
112
|
-
slider|range-slider|slider|
|
|
113
|
-
spinner|loading-indicator|spinner|
|
|
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
|
|
114
136
|
stats-bar|stat-card,metrics|gap|references/elements/stats-bar.md
|
|
115
137
|
stepper|step-indicator,wizard-steps|gap|references/elements/stepper.md
|
|
116
138
|
switch|toggle-switch|switch|references/elements/switch.md
|
|
117
139
|
table|data-table,comparison-table|table|references/elements/table.md
|
|
118
|
-
table-of-contents|toc,in-page-nav|table-of-contents|
|
|
119
|
-
tabs|tab-navigation|tabs|
|
|
120
|
-
tags-input|token-input|tags-input|
|
|
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
|
|
121
143
|
testimonial|testimonials,quote-card|gap|references/elements/testimonial.md
|
|
122
144
|
textarea||textarea|references/elements/textarea.md
|
|
123
145
|
timeline||gap|references/elements/timeline.md
|
|
124
146
|
toast|snackbar,toast-notification|toast|references/elements/toast.md
|
|
125
|
-
toggle|toggle-button|toggle|
|
|
126
|
-
toggle-group|button-group|toggle-group|
|
|
127
|
-
toolbar||toolbar|
|
|
128
|
-
tooltip||tooltip|
|
|
129
|
-
virtual-scroll|virtualized-list|virtual-scroll|
|
|
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
|
|
130
152
|
```
|
|
131
153
|
|
|
132
154
|
## Composition index
|
|
@@ -6,9 +6,7 @@ Law: references/laws/error-prevention.md
|
|
|
6
6
|
|
|
7
7
|
## Rule
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
State the consequence in the dialog title or message. Name both the destructive action and the safe way to cancel, identify the dialog, and follow the modal-dialog focus and keyboard pattern.
|
|
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.
|
|
12
10
|
|
|
13
11
|
## Sources
|
|
14
12
|
|
|
@@ -6,11 +6,9 @@ Law: references/laws/von-restorff.md
|
|
|
6
6
|
|
|
7
7
|
## Rule
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Make the primary action easy to identify and keep the secondary action visually quieter. Use concrete action labels and retain visible keyboard focus.
|
|
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.
|
|
12
10
|
|
|
13
11
|
## Sources
|
|
14
12
|
|
|
15
|
-
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-
|
|
16
|
-
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-
|
|
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)
|
|
@@ -6,9 +6,7 @@ Law: references/laws/feedback.md
|
|
|
6
6
|
|
|
7
7
|
## Rule
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Place save feedback near the action it describes and announce the update as a status message. Keep the message understandable without color or motion.
|
|
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.
|
|
12
10
|
|
|
13
11
|
## Sources
|
|
14
12
|
|
|
@@ -6,9 +6,7 @@ Law: references/laws/proximity.md
|
|
|
6
6
|
|
|
7
7
|
## Rule
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Keep labeled search and filters associated with the table they change. Identify the current page and preserve a clear sequence from controls to rows to pagination.
|
|
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.
|
|
12
10
|
|
|
13
11
|
## Sources
|
|
14
12
|
|
|
@@ -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)
|
|
@@ -2,14 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
Binding: alert-modal
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A short, important message requires an immediate response, especially confirmation before a consequential action
|
|
6
6
|
|
|
7
|
-
|
|
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`.
|
|
8
35
|
|
|
9
36
|
Related laws: references/laws/error-prevention.md, references/laws/accessibility.md
|
|
10
37
|
|
|
11
38
|
## Sources
|
|
12
39
|
|
|
13
|
-
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/) (verified 2026-10-
|
|
14
|
-
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) (verified 2026-10-
|
|
15
|
-
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-
|
|
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)
|
|
@@ -4,15 +4,44 @@ Binding: gap
|
|
|
4
4
|
|
|
5
5
|
Identify a person or account with a compact image and fallback.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A person's identity helps distinguish nearby content, such as a participant list or comment author.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not add a portrait when the name already provides all needed context and the image adds no information. Do not use an avatar as the only way to identify a person.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. Use an img with concise alt text when the portrait adds identity; use alt="" when visible adjacent text already names the person. Keep the name as text.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Set intrinsic dimensions to reserve space, preserve a consistent crop, and avoid shrinking the image below its useful size.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Provide a stable initials or generic fallback when no usable image exists. If the image fails, keep the person's visible name.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check image alternative against nearby text, loading/failure fallback, intrinsic dimensions, and list reading order.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Repeating the adjacent name in alt text makes assistive technology announce the same identity twice.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
8
36
|
|
|
9
37
|
```html
|
|
10
38
|
<img src="/people/ada.webp" width="40" height="40" alt="" />
|
|
11
39
|
<span>Ada Lovelace</span>
|
|
12
40
|
```
|
|
13
41
|
|
|
14
|
-
|
|
42
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
15
43
|
|
|
16
44
|
## Sources
|
|
17
45
|
|
|
18
46
|
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img) (verified 2026-10-16)
|
|
47
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html) (verified 2026-10-16)
|
|
@@ -4,15 +4,44 @@ Binding: gap
|
|
|
4
4
|
|
|
5
5
|
Mark a short status or category beside related content.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A short status or category qualifies nearby content and helps people scan it.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use a badge for a control, long explanation, or decoration that repeats an adjacent heading without adding meaning.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. Use non-interactive text beside the item it qualifies. Include the status in words; color and shape are supplementary.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Allow text to wrap or choose a concise label that remains readable at zoom. Keep the badge attached to its related heading or value in reading order.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
For status changes, update the text and announce meaningful dynamic changes in an appropriate status region. Do not use badge styling alone to indicate selection.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check text contrast, status conveyed without color, association with the item, zoom, and dynamic announcement only when needed.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
A green dot without a textual status does not explain what “active” means.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
8
36
|
|
|
9
37
|
```html
|
|
10
|
-
<span>Pending review</span>
|
|
38
|
+
<p>Deployment <span>Pending review</span></p>
|
|
11
39
|
```
|
|
12
40
|
|
|
13
|
-
This is an app-level composition
|
|
41
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
14
42
|
|
|
15
43
|
## Sources
|
|
16
44
|
|
|
17
45
|
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span) (verified 2026-10-16)
|
|
18
46
|
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
47
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-16)
|
|
@@ -4,26 +4,58 @@ Binding: gap
|
|
|
4
4
|
|
|
5
5
|
Compare values across a small set of named categories.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Values are best compared across a modest set of named categories.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use a chart when a labeled table communicates the values more clearly, or when the category count makes bars and labels unreadable.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. Give the chart a concise title and text summary, label units and the compared period, and provide the same data in a readable table. Use SVG as a visual summary with a short accessible name.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep category names and values available when the graphic scales down. If the plot becomes cramped, allow a scrollable plot while leaving its data table readable.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
If values update, identify the period/version and expose the updated data in the table. Do not use color alone to distinguish series.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Compare every plotted value with the table, check chart title/summary, units, axis labels, color contrast, and narrow viewport access.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
An SVG label such as “Sales chart” names the image but does not provide its values or trend.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
8
36
|
|
|
9
37
|
```html
|
|
10
38
|
<figure>
|
|
11
|
-
<figcaption>Signups by month</figcaption>
|
|
12
|
-
<svg role="img" aria-label="
|
|
39
|
+
<figcaption>Signups by month, Q1 2026</figcaption>
|
|
40
|
+
<svg role="img" aria-label="Signups rise from 12 in January to 19 in February and 24 in March">
|
|
41
|
+
<!-- Render bars with category/value labels or a clear axis. -->
|
|
42
|
+
</svg>
|
|
13
43
|
<table>
|
|
14
|
-
<caption>Signups by month</caption>
|
|
44
|
+
<caption>Signups by month (number of accounts)</caption>
|
|
15
45
|
<thead><tr><th scope="col">Month</th><th scope="col">Signups</th></tr></thead>
|
|
16
46
|
<tbody>
|
|
17
47
|
<tr><th scope="row">January</th><td>12</td></tr>
|
|
18
48
|
<tr><th scope="row">February</th><td>19</td></tr>
|
|
49
|
+
<tr><th scope="row">March</th><td>24</td></tr>
|
|
19
50
|
</tbody>
|
|
20
51
|
</table>
|
|
21
52
|
</figure>
|
|
22
53
|
```
|
|
23
54
|
|
|
24
|
-
This is an app-level composition
|
|
55
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
25
56
|
|
|
26
57
|
## Sources
|
|
27
58
|
|
|
28
|
-
- [
|
|
29
|
-
- [www.w3.org](https://www.w3.org/WAI/
|
|
59
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html) (verified 2026-10-16)
|
|
60
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/images/complex/) (verified 2026-10-16)
|
|
61
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/img_role) (verified 2026-10-16)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# breadcrumb
|
|
2
|
+
|
|
3
|
+
Binding: breadcrumb
|
|
4
|
+
|
|
5
|
+
Show the current page within a hierarchy of parent pages.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Show where the current page sits in a hierarchy and provide links to parent pages.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use breadcrumbs as the only way to navigate or show unrelated destinations.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use BreadcrumbRoot, BreadcrumbList, BreadcrumbItem, and BreadcrumbLink inside a labelled navigation landmark. Keep items in ancestor order, use current to identify the current page, and use links for ancestors.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Let long labels wrap or collapse middle ancestors with the documented items and maxItems props. Keep the current page visible.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
For a short trail, render each item. For a collapsed trail, make the omitted ancestors available through the documented native disclosure.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check that the navigation landmark has a name, ancestors are links, and the current page is announced as current. Test a long trail with keyboard and at a narrow viewport.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Making the current page look like a link when it does not navigate.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/) (verified 2026-10-17)
|
|
38
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-17)
|
|
@@ -4,11 +4,46 @@ Binding: button
|
|
|
4
4
|
|
|
5
5
|
Expose a clear action with its native interaction semantics.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
The person triggers an action on this page: submit a form, save, confirm, open a dialog or start a flow. `as="a"` gives a link the Button skin; the element stays a link.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
The control moves to another page: use a link (`<a href>` or `Button as="a"`). A choice between options is a `segmented-control` or `toggle-group`, not several buttons.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
One visible label names the result with a verb: "Save changes", "Invite member". An icon-only button (`size="icon"`) needs an accessible name through `aria-label`.
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
<Button type="submit">Save changes</Button>
|
|
21
|
+
<Button variant="ghost">Cancel</Button>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`Button` renders a native `<button>` with `type="button"` unless `type` is given; pass `type="submit"` inside a form.
|
|
25
|
+
|
|
26
|
+
## Responsive
|
|
27
|
+
|
|
28
|
+
Labels fit at 320 CSS px without truncation; shorten the copy rather than the target. In a narrow action row keep the primary action first in reading order and let the buttons wrap or stack instead of hiding one.
|
|
29
|
+
|
|
30
|
+
## States
|
|
31
|
+
|
|
32
|
+
Disabled: say nearby why the action is unavailable, or keep it enabled and validate on submit. Busy: keep the label and width, show progress text such as "Saving…" and ignore a second press. `selected` only for a toggle that stays on.
|
|
33
|
+
|
|
34
|
+
## Verify
|
|
35
|
+
|
|
36
|
+
Tab reaches every button in reading order with a visible focus indicator; Enter and Space activate it. One default (solid) button per decision area. Icon-only buttons have a non-empty name in the accessibility tree.
|
|
37
|
+
|
|
38
|
+
## Common mistake
|
|
39
|
+
|
|
40
|
+
Two solid buttons side by side, such as "Save" and "Delete", make people compare colors instead of labels. Keep one solid action, use `variant="outline"` or `"ghost"` for the alternative and `variant="destructive"` only where data is removed.
|
|
8
41
|
|
|
9
42
|
Related laws: references/laws/von-restorff.md, references/laws/accessibility.md
|
|
10
43
|
|
|
11
44
|
## Sources
|
|
12
45
|
|
|
13
|
-
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-
|
|
14
|
-
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-
|
|
46
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-17)
|
|
47
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-17)
|
|
48
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/button/) (verified 2026-10-17)
|
|
49
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# candle-chart
|
|
2
|
+
|
|
3
|
+
Binding: candle-chart
|
|
4
|
+
|
|
5
|
+
Ordered market-style observations need open, high, low, and close values in each time interval
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Ordered market-style observations need open, high, low, and close values in each time interval.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use candlesticks for generic category comparisons or hide exact values in a visual glyph. This component visualizes data; it does not provide financial recommendations.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use `CandleChart` with ordered time/open/high/low/close data, a descriptive label, and axis labels. UIify includes a data table fallback. Use /client for interactive crosshair/readout or live virtualized history.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep exact OHLC values available when candles become narrow. In live mode, the table follows the visible candles; provide another way to reach full history if needed.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
The static chart works without JavaScript. Interactive candles support pointer selection and an announced readout; suppress high-frequency readout announcements for streaming data.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check each candle's values against the table, chronological ordering, axis/time labels, keyboard access to interactive controls, update behavior, and mobile viewport.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Coloring rising and falling candles without a table and explicit value labels makes the chart's information unavailable to many users.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html) (verified 2026-10-17)
|
|
38
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/images/complex/) (verified 2026-10-17)
|