@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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# image-gallery
|
|
2
|
+
|
|
3
|
+
Binding: gap
|
|
4
|
+
|
|
5
|
+
Show related images with useful captions or alternatives.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A related set of images benefits from being browsed together with captions or contextual text.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not build a gallery if one image answers the need. Do not hide the only useful visual information behind a lightbox with no inline alternative.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. Use a list of figures. Write alt text for the image's purpose; use figcaption for additional context, avoiding redundant repetition.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Prefer existing project assets. Keep images within their container, preserve intrinsic ratio and important content in responsive crops, and allow the list to stack. Provide intrinsic width and height to reduce layout shift.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
If images open a larger view, use a real link or button with an accessible name and a way back. Do not imply gallery navigation when items are static.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check informative/decorative alternatives, captions, loading and intrinsic dimensions, keyboard access for interactive images, and narrow reflow.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Using the same sentence as both alt text and caption can produce repetitive announcements when both convey identical information.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<ul>
|
|
39
|
+
<li><figure>
|
|
40
|
+
<img src="/bridge.webp" width="640" height="400" alt="Stone bridge over a river" />
|
|
41
|
+
<figcaption>Old town bridge at dusk</figcaption>
|
|
42
|
+
</figure></li>
|
|
43
|
+
</ul>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
47
|
+
|
|
48
|
+
## Sources
|
|
49
|
+
|
|
50
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure) (verified 2026-10-16)
|
|
51
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img) (verified 2026-10-16)
|
|
52
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# inline-alert
|
|
2
|
+
|
|
3
|
+
Binding: gap
|
|
4
|
+
|
|
5
|
+
Give a short message context beside the content it affects.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A message belongs beside the content or control it explains. Use status for a non-urgent update and alert only when the information requires immediate attention.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use assertive announcements for routine success, or a toast for an error that must remain visible while the person fixes it.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. Place concise text in a semantic status/alert element next to the affected content; include a heading when it helps identify the issue.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the message in reading order beside the affected field or section. Let text wrap and do not communicate severity by color alone.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Use role=status for dynamic, non-urgent updates; use role=alert for urgent messages that should be announced immediately. Keep the message visible until the related issue can be addressed.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check announcement timing and role, reading order, message visibility, color contrast, and the relationship to its field/section. Avoid repeating the same announcement through multiple live regions.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Do not move focus to routine status text; the live region should announce the update while focus stays on the user's task.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<p role="status">Changes saved.</p>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
42
|
+
|
|
43
|
+
## Sources
|
|
44
|
+
|
|
45
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (verified 2026-10-16)
|
|
46
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# input
|
|
2
|
+
|
|
3
|
+
Binding: input
|
|
4
|
+
|
|
5
|
+
Accept a short, single-line value.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Collect one short value such as a name, email address, or search query.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Use a textarea for longer free text and a purpose-specific control when it provides a more suitable native input mode.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use the documented Input component with an associated visible label. Put format instructions before entry and connect them to the field; keep validation feedback beside the control.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Let the field and label reflow within the available width. Keep the label visible and avoid horizontal page scrolling.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Preserve entered values when validation fails. Distinguish disabled, read-only, and invalid states, and explain the correction in text.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check the label association, input purpose and autocomplete where relevant, keyboard access, error description, and narrow-screen reflow.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Using a placeholder as the only label or instruction.
|
|
34
|
+
|
|
35
|
+
Related laws: references/laws/proximity.md, references/laws/accessibility.md
|
|
36
|
+
|
|
37
|
+
## Sources
|
|
38
|
+
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-17)
|
|
40
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/instructions/) (verified 2026-10-17)
|
|
41
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# line-chart
|
|
2
|
+
|
|
3
|
+
Binding: line-chart
|
|
4
|
+
|
|
5
|
+
A measured value changes over an ordered time or numeric axis and the trend is useful
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A measured value changes over an ordered time or numeric axis and the trend is useful.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not connect unrelated categories with a line or imply precision/time continuity the data does not have. For a few independent categories, use a table or bar chart.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use `LineChart` with ordered time/value data, a descriptive accessible label, and axis labels that include units/context. UIify renders a data table fallback. Import the component entry for static rendering; use /client only for interactive points or live history.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the data table available as the plot narrows. For live history, 'visibleCount' virtualizes older points and the table follows the visible window; provide another route to full history when users need it.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
The static component needs no JavaScript. Interactive points use labeled buttons; the client entry adds live readout behavior. Disable announcements for high-frequency streaming updates when repeated speech would overwhelm.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check exact values in the table, time/unit labels, trend description, keyboard point controls if enabled, data updates, and narrow viewport.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
A default “Line chart” name does not explain which measure, unit, or period the chart shows.
|
|
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)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# logo-wall
|
|
2
|
+
|
|
3
|
+
Binding: gap
|
|
4
|
+
|
|
5
|
+
Show organizations associated with a product or event.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A small collection of customer, partner, or member organizations provides relevant context.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not present logos as proof of endorsement without permission, or include a large wall of brands that does not help the current decision.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. Use a list. Give each informative logo an alt text with the organization's name; use empty alt only when adjacent text already names it.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Preserve recognizable proportions and allow the list to wrap. Avoid raster logos that become blurry or require horizontal scrolling.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
If a logo links somewhere, give the link a meaningful accessible name and a real destination. If not interactive, do not make it look like a control.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check each image alternative, adjacent duplicate text, logo proportions, list reading order, link purpose, and mobile wrapping.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
An empty alt on an informative logo hides the organization name from screen readers.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<ul aria-label="Organizations using the product">
|
|
39
|
+
<li><img src="/logos/acme.svg" width="120" height="40" alt="Acme" /></li>
|
|
40
|
+
</ul>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
44
|
+
|
|
45
|
+
## Sources
|
|
46
|
+
|
|
47
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img) (verified 2026-10-16)
|
|
48
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
49
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# modal
|
|
2
|
+
|
|
3
|
+
Binding: modal
|
|
4
|
+
|
|
5
|
+
Hold attention on a task that must be completed before returning to the page.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
The person must finish or dismiss a focused task before returning to the page. Use inline content when they need to compare it with the page; use `toast` for brief feedback and `alert-modal` for an irreversible decision.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not open a modal automatically on page load or use one for content most visitors need to read.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
`Modal` provides a trigger, named dialog, title, optional description and body, close control, and optional footer. Give it a specific title, concise body, and clearly labeled actions. A modal dialog contains its Tab sequence; include a visible way to close it.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
On narrow screens the default modal becomes a full-width bottom sheet. Its body scrolls while the header and footer remain visible. Keep the task short enough to understand and complete in this space.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
The native `show-modal` dialog blocks interaction with the page. Its default dismissal allows Escape; `dismiss="none"` requires an explicit close action. Controlled or initially open state requires `ModalClientContent` from `@gunkin/uiify/components/modal/client`.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Open from the keyboard. Confirm focus enters the dialog, stays within its Tab sequence, Escape closes it when dismissal is enabled, focus returns to the trigger, and the dialog has its visible title as its accessible name. Check long content and footer actions at a narrow viewport.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
A generic title such as “Notice” does not explain the task. Name the decision or activity instead.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) (verified 2026-10-17)
|
|
38
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) (verified 2026-10-17)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# number-field
|
|
2
|
+
|
|
3
|
+
Binding: number-field
|
|
4
|
+
|
|
5
|
+
Enter a numeric quantity with optional bounds and step controls.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Enter a quantity for which numeric stepping and bounds are meaningful.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use a number field for identifiers, postal codes, card numbers, or values where spinbutton behavior is not useful; use a text input instead.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use NumberField.Root with NumberField.Input and the documented increment/decrement buttons when those actions help. Give the input an a clear visible label and explain units, min/max, and step before entry. Give icon-only increment/decrement buttons accessible names.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the input and controls operable at narrow widths; do not make the input so small that the value is hard to inspect or edit.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Show the current value and bounds clearly. Validate the same constraints on the server; browser-side constraints alone do not protect submitted data.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Test typing, increment/decrement, keyboard operation, min/max/step boundaries, invalid values, and the accessible name of each icon-only control.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Using number input for a numeric-looking identifier that must retain leading zeroes.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/number) (verified 2026-10-17)
|
|
38
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-17)
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/error-identification.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# otp-input
|
|
2
|
+
|
|
3
|
+
Binding: otp-input
|
|
4
|
+
|
|
5
|
+
Collect a one-time verification code as one value.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Collect a short one-time code as one verification value.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not split a code into independently labelled fields that require users to move between separate controls. Do not rely on SMS codes as the only factor for account security.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use OtpInput.Root, one OtpInput.Slot per position, and OtpInput.HiddenInput. UIify HiddenInput exposes the accessible name “One-time code” and uses autocomplete one-time-code. Keep visible instructions beside the slots that explain where the code comes from.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep every slot visible and large enough to inspect at narrow widths and zoom. Do not force horizontal page scrolling.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Distinguish incomplete, complete, disabled, and invalid submission feedback. Keep the single code value available for paste and autofill.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Test typing, paste, one-time-code autofill, keyboard navigation, accessible naming, invalid attempts, and the complete value reaching the form.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Making each visual digit a separate text field that interrupts autofill and paste.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/Security/Authentication/OTP) (verified 2026-10-17)
|
|
38
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete) (verified 2026-10-17)
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-17)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# pagination
|
|
2
|
+
|
|
3
|
+
Binding: pagination
|
|
4
|
+
|
|
5
|
+
Navigate between pages of a result set.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Let people move through a result set split into discrete pages.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not paginate a small result set that is easier to scan as one list, or imply that ellipses are links.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use Pagination.Root with a specific navigation label and the documented count. Provide descriptive names for previous/next controls, expose the current page with selected, and use getPageHref when pages are navigable URLs.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the current page and adjacent navigation available; reduce distant page links before shrinking targets or labels.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Disable controls at the ends of the range and preserve the current page when results update. If the result set changes, announce the updated result context.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check the navigation name, current-page semantics, end states, keyboard focus order, and that each URL or action reaches the stated page.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Showing a selected page only by color or leaving a previous/next control active at a boundary.
|
|
34
|
+
|
|
35
|
+
Related laws: references/laws/proximity.md, references/laws/accessibility.md
|
|
36
|
+
|
|
37
|
+
## Sources
|
|
38
|
+
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/navigation.html) (verified 2026-10-17)
|
|
40
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-17)
|
|
41
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/focus-order.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# password-input
|
|
2
|
+
|
|
3
|
+
Binding: gap
|
|
4
|
+
|
|
5
|
+
Collect a password while allowing password managers to help users enter it.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Collect a current or new account password.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not disable password managers or hide password requirements until after submission.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use a labelled native password input. Set autocomplete to current-password for sign-in or new-password when creating or changing a password. Present requirements before entry.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the label, requirements, reveal control, and error text visible at narrow widths and zoom.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
If a show/hide control is provided, make it a keyboard-operable button with an action-specific accessible name and preserve the entered value when toggling. Keep errors next to the field.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Test label association, password-manager autofill, keyboard operation of any reveal button, preservation of the value, and clear validation feedback.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Setting autocomplete to off or clearing a valid password when another field fails.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
36
|
+
|
|
37
|
+
Use a label and native input with type password; choose current-password or new-password to match the form. This app-level recipe does not add a UIify password-input component.
|
|
38
|
+
|
|
39
|
+
## Sources
|
|
40
|
+
|
|
41
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/password) (verified 2026-10-17)
|
|
42
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete) (verified 2026-10-17)
|
|
43
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-17)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# popup
|
|
2
|
+
|
|
3
|
+
Binding: popup
|
|
4
|
+
|
|
5
|
+
A small, optional piece of contextual content belongs beside its trigger and can be opened without blocking the page
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A small, optional piece of contextual content belongs beside its trigger and can be opened without blocking the page. Use it for a short explanation, compact detail, or lightweight choice.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use a popup for an urgent alert, a task requiring modal focus containment, or essential information available only on hover. Use a menu for a set of commands.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use `PopupTrigger` with a stable target id and matching PopupContent; add PopupClose when users need an explicit close action. Keep content concise and label interactive controls.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Let content wrap and keep it within the viewport at narrow widths and zoom. Check the chosen side and alignment around viewport edges.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Tier 0 native popover parts work without client JavaScript. 'mode="auto"' supports light dismissal; 'manual' requires explicit dismissal. The parts do not set 'aria-expanded'; cross-engine exposure is not yet established.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Test invoker by pointer and keyboard, close behavior for the chosen mode, focus order, target id wiring, and placement at narrow widths. Inspect the accessibility tree in each supported browser; do not assume expanded state is exposed identically.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Do not put essential instructions only in content that appears on hover.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/popover) (verified 2026-10-17)
|
|
38
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/content-on-hover-or-focus.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# pricing-table
|
|
2
|
+
|
|
3
|
+
Binding: gap
|
|
4
|
+
|
|
5
|
+
Let visitors compare plan features and choose a plan.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Help people compare two to four plans and choose one. Show the same categories in the same order so meaningful differences are easy to find.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not present plans as cards if the contents cannot be compared, or use color alone to identify a recommended option.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
For each plan, show its name, price and billing period, who it suits, key feature differences, and one action. Give each action a name that identifies its plan, such as “Choose Pro.” Mark a recommended plan with visible text as well as any styling.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Stack plans on narrow screens in the same reading order. Keep plan names, prices, differences, and actions together; allow long names and feature descriptions to wrap.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
If people can switch billing periods, use the documented `segmented-control` and update both the price and its period label. Check long plan names and feature lists without clipping.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Compare all plans at desktop and narrow widths. Confirm that each price has a period, each action's accessible name identifies its plan, and any recommended plan is identified in text.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Giving every plan an identical “Get started” action makes it unclear which option the action will select.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
36
|
+
|
|
37
|
+
Use a named section with one article per plan, a comparable list of features, and a documented Button with a plan-specific label.
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
<section aria-labelledby="plans-heading">
|
|
41
|
+
<h2 id="plans-heading">Choose a plan</h2>
|
|
42
|
+
<div className="plans">
|
|
43
|
+
<article aria-labelledby="starter-name">
|
|
44
|
+
<h3 id="starter-name">Starter</h3>
|
|
45
|
+
<p>$12 per month</p>
|
|
46
|
+
<ul><li>Three projects</li><li>Email support</li></ul>
|
|
47
|
+
<Button>Choose Starter</Button>
|
|
48
|
+
</article>
|
|
49
|
+
<article aria-labelledby="pro-name">
|
|
50
|
+
<h3 id="pro-name">Pro</h3>
|
|
51
|
+
<p>$24 per month</p>
|
|
52
|
+
<p>Recommended</p>
|
|
53
|
+
<ul><li>Unlimited projects</li><li>Priority support</li></ul>
|
|
54
|
+
<Button>Choose Pro</Button>
|
|
55
|
+
</article>
|
|
56
|
+
</div>
|
|
57
|
+
</section>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Related laws: references/laws/proximity.md
|
|
61
|
+
|
|
62
|
+
## Sources
|
|
63
|
+
|
|
64
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-17)
|
|
65
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-17)
|
|
66
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# progress-bar
|
|
2
|
+
|
|
3
|
+
Binding: gap
|
|
4
|
+
|
|
5
|
+
Show determinate completion of a task.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A task has measurable completion with a known range. Use native <progress> and provide a programmatic label.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use it for a quantity like disk space or a score; use <meter>. For unknown duration, omit value for indeterminate progress or use a labeled spinner.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. Associate a visible <label> with <progress>, set max and the current value, and add a text status if the exact progress matters to the task.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the label and progress indicator together in reading order; allow the label and textual status to wrap on narrow screens.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
A present value is determinate; omit value when the amount completed is not known. Use a positive max and keep value within 0..max. Mark the described region busy while it is updating when appropriate.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check accessible name, min/max/current values, determinate and indeterminate states, changing value, completion message, and responsive layout.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Fallback text inside <progress> is not its accessible label; associate an actual label or aria-label.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<label for="upload-progress">Upload</label>
|
|
39
|
+
<progress id="upload-progress" value="3" max="5"></progress>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
43
|
+
|
|
44
|
+
## Sources
|
|
45
|
+
|
|
46
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/progress) (verified 2026-10-16)
|
|
47
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# radio-group
|
|
2
|
+
|
|
3
|
+
Binding: radio-group
|
|
4
|
+
|
|
5
|
+
Choose exactly one option from a related set.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Ask people to select one value from a small, mutually exclusive set.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Use checkboxes for independent options and a select when the choice set is too long to scan inline.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use RadioGroup with a stable id, a name, and items that each have a value and descriptive label. Give the group a visible legend or an accessible name that describes the question.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Use the documented orientation that matches the layout, and let long labels wrap without changing the option order.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Keep exactly one selected value when a selection is required; if the form requires a choice, state that before entry. Preserve selection when validation fails.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Test arrow-key movement, Tab entry/exit, label activation, disabled options, group naming, and submitted value.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Presenting visually grouped radios without a programmatic group name.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/radio/) (verified 2026-10-17)
|
|
38
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/grouping/) (verified 2026-10-17)
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-17)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# rating
|
|
2
|
+
|
|
3
|
+
Binding: rating
|
|
4
|
+
|
|
5
|
+
Collect a numeric rating on a short ordered scale.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Collect one value on a short ordered rating scale, such as a one-to-five star rating.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use stars for a binary choice or as the only way to report a detailed evaluation.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use the documented Rating with a stable id, a group name in aria-label, and an appropriate max. Each radio option exposes its star count as text; pair the scale with visible instructions that explain what low and high values mean.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep every rating option visible and large enough to select at narrow widths.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Distinguish an unanswered rating from a selected value. Use readOnly for display-only ratings; use the client entry only when controlled updates are required.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Test arrow-key selection, group and option names, value submission, read-only and disabled states, and whether users can tell what each end of the scale means.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Showing decorative stars without a text name for the group or the value of each option.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/radio/) (verified 2026-10-17)
|
|
38
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-17)
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-17)
|