@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.
Files changed (91) hide show
  1. package/package.json +1 -1
  2. package/skills/uiify/SKILL.md +55 -33
  3. package/skills/uiify/references/compositions/card-rhythm.md +0 -2
  4. package/skills/uiify/references/compositions/destructive-confirmation.md +1 -3
  5. package/skills/uiify/references/compositions/form-grouping.md +0 -2
  6. package/skills/uiify/references/compositions/hero-actions.md +3 -5
  7. package/skills/uiify/references/compositions/page-frame.md +0 -2
  8. package/skills/uiify/references/compositions/pricing-actions.md +0 -2
  9. package/skills/uiify/references/compositions/save-feedback.md +1 -3
  10. package/skills/uiify/references/compositions/table-controls.md +1 -3
  11. package/skills/uiify/references/elements/accordion.md +38 -0
  12. package/skills/uiify/references/elements/alert-modal.md +32 -5
  13. package/skills/uiify/references/elements/avatar.md +31 -2
  14. package/skills/uiify/references/elements/badge.md +32 -3
  15. package/skills/uiify/references/elements/bar-chart.md +39 -7
  16. package/skills/uiify/references/elements/breadcrumb.md +38 -0
  17. package/skills/uiify/references/elements/button.md +38 -3
  18. package/skills/uiify/references/elements/candle-chart.md +38 -0
  19. package/skills/uiify/references/elements/card.md +38 -1
  20. package/skills/uiify/references/elements/carousel.md +38 -0
  21. package/skills/uiify/references/elements/checkbox.md +39 -0
  22. package/skills/uiify/references/elements/code-block.md +31 -2
  23. package/skills/uiify/references/elements/collapsible.md +38 -0
  24. package/skills/uiify/references/elements/color-picker.md +39 -0
  25. package/skills/uiify/references/elements/combobox.md +37 -0
  26. package/skills/uiify/references/elements/command-palette.md +33 -12
  27. package/skills/uiify/references/elements/context-menu.md +38 -0
  28. package/skills/uiify/references/elements/cookie-banner.md +30 -2
  29. package/skills/uiify/references/elements/date-picker.md +33 -9
  30. package/skills/uiify/references/elements/divider.md +30 -2
  31. package/skills/uiify/references/elements/drawer.md +38 -0
  32. package/skills/uiify/references/elements/dropdown-menu.md +38 -0
  33. package/skills/uiify/references/elements/empty-state.md +30 -2
  34. package/skills/uiify/references/elements/feature-grid.md +41 -1
  35. package/skills/uiify/references/elements/field.md +33 -3
  36. package/skills/uiify/references/elements/file-upload.md +40 -0
  37. package/skills/uiify/references/elements/footer.md +35 -4
  38. package/skills/uiify/references/elements/form.md +31 -4
  39. package/skills/uiify/references/elements/header.md +31 -3
  40. package/skills/uiify/references/elements/hero.md +43 -3
  41. package/skills/uiify/references/elements/hover-card.md +38 -0
  42. package/skills/uiify/references/elements/image-gallery.md +36 -4
  43. package/skills/uiify/references/elements/inline-alert.md +30 -2
  44. package/skills/uiify/references/elements/input.md +31 -4
  45. package/skills/uiify/references/elements/line-chart.md +38 -0
  46. package/skills/uiify/references/elements/logo-wall.md +31 -2
  47. package/skills/uiify/references/elements/modal.md +38 -0
  48. package/skills/uiify/references/elements/number-field.md +39 -0
  49. package/skills/uiify/references/elements/otp-input.md +39 -0
  50. package/skills/uiify/references/elements/pagination.md +31 -4
  51. package/skills/uiify/references/elements/password-input.md +33 -9
  52. package/skills/uiify/references/elements/popup.md +38 -0
  53. package/skills/uiify/references/elements/pricing-table.md +55 -2
  54. package/skills/uiify/references/elements/progress-bar.md +32 -4
  55. package/skills/uiify/references/elements/radio-group.md +39 -0
  56. package/skills/uiify/references/elements/rating.md +39 -0
  57. package/skills/uiify/references/elements/search-input.md +35 -4
  58. package/skills/uiify/references/elements/segmented-control.md +39 -0
  59. package/skills/uiify/references/elements/select.md +29 -1
  60. package/skills/uiify/references/elements/sidebar.md +33 -10
  61. package/skills/uiify/references/elements/skeleton.md +38 -0
  62. package/skills/uiify/references/elements/slider.md +39 -0
  63. package/skills/uiify/references/elements/spinner.md +38 -0
  64. package/skills/uiify/references/elements/stats-bar.md +30 -2
  65. package/skills/uiify/references/elements/stepper.md +32 -9
  66. package/skills/uiify/references/elements/switch.md +31 -4
  67. package/skills/uiify/references/elements/table-of-contents.md +39 -0
  68. package/skills/uiify/references/elements/table.md +32 -3
  69. package/skills/uiify/references/elements/tabs.md +38 -0
  70. package/skills/uiify/references/elements/tags-input.md +39 -0
  71. package/skills/uiify/references/elements/testimonial.md +35 -4
  72. package/skills/uiify/references/elements/textarea.md +30 -3
  73. package/skills/uiify/references/elements/timeline.md +31 -3
  74. package/skills/uiify/references/elements/toast.md +27 -1
  75. package/skills/uiify/references/elements/toggle-group.md +39 -0
  76. package/skills/uiify/references/elements/toggle.md +39 -0
  77. package/skills/uiify/references/elements/toolbar.md +39 -0
  78. package/skills/uiify/references/elements/tooltip.md +38 -0
  79. package/skills/uiify/references/elements/virtual-scroll.md +39 -0
  80. package/skills/uiify/references/examples/alert-confirmation.md +34 -0
  81. package/skills/uiify/references/examples/field-validation.md +37 -0
  82. package/skills/uiify/references/examples/select-basic.md +35 -0
  83. package/skills/uiify/references/examples/table-controls.md +40 -0
  84. package/skills/uiify/references/guides/assets.md +14 -0
  85. package/skills/uiify/references/guides/content.md +11 -0
  86. package/skills/uiify/references/guides/hierarchy.md +14 -0
  87. package/skills/uiify/references/guides/reference.md +9 -0
  88. package/skills/uiify/references/guides/states.md +12 -0
  89. package/skills/uiify/references/guides/surface.md +27 -0
  90. package/skills/uiify/scripts/lint.mjs +1 -1
  91. package/skills/uiify/scripts/static.mjs +71 -14
@@ -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)
@@ -2,13 +2,40 @@
2
2
 
3
3
  Binding: pagination
4
4
 
5
- Navigate the pages of a result set.
5
+ Navigate between pages of a result set.
6
6
 
7
- Make the current page clear in text and expose it as the current page. Keep previous and next actions named and disable them at the ends.
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.
8
34
 
9
35
  Related laws: references/laws/proximity.md, references/laws/accessibility.md
10
36
 
11
37
  ## Sources
12
38
 
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)
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)
@@ -2,18 +2,42 @@
2
2
 
3
3
  Binding: gap
4
4
 
5
- Collect a secret string while the browser masks entered characters.
5
+ Collect a password while allowing password managers to help users enter it.
6
6
 
7
- Use a visible label, the appropriate autocomplete value, and nearby password requirements. Keep entered values when showing validation errors.
7
+ ## Use when
8
8
 
9
- ```html
10
- <label for="account-password">Password</label>
11
- <input id="account-password" name="password" type="password" autocomplete="current-password" />
12
- ```
9
+ Collect a current or new account password.
13
10
 
14
- This is an app-level composition recipe; it does not add a component to UIify.
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.
15
38
 
16
39
  ## Sources
17
40
 
18
- - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password) (verified 2026-10-16)
19
- - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
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)
@@ -4,10 +4,63 @@ Binding: gap
4
4
 
5
5
  Let visitors compare plan features and choose a plan.
6
6
 
7
- Compare plans using the same feature order and clearly associate each action with its plan. Explain meaningful differences without making color the only signal.
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
+ ```
8
59
 
9
60
  Related laws: references/laws/proximity.md
10
61
 
11
62
  ## Sources
12
63
 
13
- - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
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)
@@ -4,16 +4,44 @@ Binding: gap
4
4
 
5
5
  Show determinate completion of a task.
6
6
 
7
- Give the progress value a visible label and range. Include text that explains completion when the visual meter is unavailable.
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
8
36
 
9
37
  ```html
10
38
  <label for="upload-progress">Upload</label>
11
- <progress id="upload-progress" value="3" max="5">3 of 5</progress>
39
+ <progress id="upload-progress" value="3" max="5"></progress>
12
40
  ```
13
41
 
14
- This is an app-level composition recipe; it does not add a component to UIify.
42
+ This is an app-level composition; UIify does not currently ship this component.
15
43
 
16
44
  ## Sources
17
45
 
18
- - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress) (verified 2026-10-16)
46
+ - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/progress) (verified 2026-10-16)
19
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)
@@ -2,13 +2,44 @@
2
2
 
3
3
  Binding: gap
4
4
 
5
- Find records within the current table.
5
+ Find records in a collection or page.
6
6
 
7
- Give search a visible label and identify the collection it searches. Keep filters and pagination near the result list and announce result changes when they update.
7
+ ## Use when
8
+
9
+ Help people find a record or content within a defined collection.
10
+
11
+ ## Avoid when
12
+
13
+ Do not use a search field when the collection is small and browsing its links is clearer.
14
+
15
+ ## Structure
16
+
17
+ Use a labelled search form and a native search input. Identify the collection being searched and keep filters, results, and pagination in a clear reading order.
18
+
19
+ ## Responsive
20
+
21
+ Allow the field and result controls to wrap without clipping. Keep result content usable at narrow widths and zoom.
22
+
23
+ ## States
24
+
25
+ Explain empty and no-match results separately. When results update without a page navigation, announce a concise result status.
26
+
27
+ ## Verify
28
+
29
+ Check the visible label, submitted query behavior, empty/no-match states, keyboard access, and result announcement when updates are dynamic.
30
+
31
+ ## Common mistake
32
+
33
+ Showing a magnifying-glass icon without an accessible name for the search field.
34
+
35
+ ## Custom implementation
36
+
37
+ Use a search form with an associated label and an input of type search. This app-level recipe does not add a UIify search-input component.
8
38
 
9
39
  Related laws: references/laws/proximity.md, references/laws/accessibility.md
10
40
 
11
41
  ## Sources
12
42
 
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)
43
+ - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/search) (verified 2026-10-17)
44
+ - [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-17)
45
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (verified 2026-10-17)
@@ -0,0 +1,39 @@
1
+ # segmented-control
2
+
3
+ Binding: segmented-control
4
+
5
+ Choose one value from a short set of mutually exclusive options.
6
+
7
+ ## Use when
8
+
9
+ Let people switch among a few short, mutually exclusive values, such as a billing period or view mode.
10
+
11
+ ## Avoid when
12
+
13
+ Use ordinary links for navigation and Tabs only when each choice opens a corresponding panel. Prefer a select for many options or long labels.
14
+
15
+ ## Structure
16
+
17
+ Use SegmentedControl with a stable id and items that each have a value and label. Give the group an accessible name, and show the selected option with the component's native radio semantics.
18
+
19
+ ## Responsive
20
+
21
+ Allow the group to fit or stack at narrow widths without truncating labels or shrinking the targets.
22
+
23
+ ## States
24
+
25
+ Keep one value selected and update the associated content or setting when the selection changes. Use the documented client entry only when controlled state is required.
26
+
27
+ ## Verify
28
+
29
+ Test arrow-key selection, keyboard focus, group name, visible selected state, narrow-width layout, and that dependent content reflects the chosen value.
30
+
31
+ ## Common mistake
32
+
33
+ Styling unrelated navigation links as segmented options and hiding their link behavior.
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/WCAG22/Understanding/reflow.html) (verified 2026-10-17)
@@ -4,7 +4,35 @@ Binding: select
4
4
 
5
5
  Choose one value from a fixed list.
6
6
 
7
- Use a visible label and choose a native select for a finite list of options unless the task needs a different interaction. Preserve the selected value when validation fails.
7
+ ## Use when
8
+
9
+ Choose one value from a finite list, especially when the form benefits from a native control.
10
+
11
+ ## Avoid when
12
+
13
+ Avoid a select when users must compare several options at once or when the task needs a richer search or selection interaction.
14
+
15
+ ## Structure
16
+
17
+ Associate a visible label with the select. Group related options with `optgroup` and provide an empty prompt only when the value is genuinely optional.
18
+
19
+ ## Responsive
20
+
21
+ Keep the native control usable at narrow widths and browser zoom; do not depend on a fixed-width option label.
22
+
23
+ ## States
24
+
25
+ Preserve the selected value after validation errors. Use native disabled, required, and invalid form semantics.
26
+
27
+ ## Verify
28
+
29
+ Confirm the label is announced, options can be selected by keyboard, and the chosen value survives an invalid submission.
30
+
31
+ ## Common mistake
32
+
33
+ Replacing a native select with a custom popup without a clear interaction need.
34
+
35
+ Example: `references/examples/select-basic.md`.
8
36
 
9
37
  Related laws: references/laws/proximity.md, references/laws/accessibility.md
10
38
 
@@ -2,19 +2,42 @@
2
2
 
3
3
  Binding: gap
4
4
 
5
- Provide a secondary set of links for a site or application section.
5
+ Provide secondary navigation for a site or application section.
6
6
 
7
- Use a named navigation landmark with a list of destinations. Mark the current destination and keep the link order consistent across pages.
7
+ ## Use when
8
8
 
9
- ```html
10
- <nav aria-label="Workspace">
11
- <ul><li><a href="/projects" aria-current="page">Projects</a></li></ul>
12
- </nav>
13
- ```
9
+ Provide a stable set of destinations within a larger site or application section.
14
10
 
15
- This is an app-level composition recipe; it does not add a component to UIify.
11
+ ## Avoid when
12
+
13
+ Do not use a sidebar for a short set of links that fits naturally in the page header or content.
14
+
15
+ ## Structure
16
+
17
+ Use a nav landmark with a concise accessible name and a list of links. Group links under headings only when the groups help people find destinations. Mark the current destination with aria-current="page".
18
+
19
+ ## Responsive
20
+
21
+ At narrow widths, place navigation in the document flow or expose it through a clearly named disclosure control. Keep DOM and keyboard order aligned with the page.
22
+
23
+ ## States
24
+
25
+ Show the current location in text or semantics, and preserve it when the navigation collapses or expands.
26
+
27
+ ## Verify
28
+
29
+ Check the landmark name when the page has multiple navigation regions, the current link state, keyboard access, and narrow-screen reflow.
30
+
31
+ ## Common mistake
32
+
33
+ Using a second navigation landmark with the same name for a different set of destinations.
34
+
35
+ ## Custom implementation
36
+
37
+ Use a named nav containing grouped lists of ordinary links. This app-level pattern does not add a UIify component.
16
38
 
17
39
  ## Sources
18
40
 
19
- - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav) (verified 2026-10-16)
20
- - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
41
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/navigation.html) (verified 2026-10-17)
42
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/consistent-navigation.html) (verified 2026-10-17)
43
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-17)
@@ -0,0 +1,38 @@
1
+ # skeleton
2
+
3
+ Binding: skeleton
4
+
5
+ A known content layout is temporarily loading and a close shape preview can reduce the perception of a blank page
6
+
7
+ ## Use when
8
+
9
+ A known content layout is temporarily loading and a close shape preview can reduce the perception of a blank page.
10
+
11
+ ## Avoid when
12
+
13
+ Do not use skeletons for unknown layout, short waits, or as a substitute for an announced loading state. Do not present a false preview that suggests content is already available.
14
+
15
+ ## Structure
16
+
17
+ Use `Skeleton` only around content that will occupy the same space. Match the approximate width, height, and shape; keep a separate status message when the loading state needs announcement.
18
+
19
+ ## Responsive
20
+
21
+ Match the real content's responsive geometry and reserve its space so the page does not shift when it arrives.
22
+
23
+ ## States
24
+
25
+ While loading, Skeleton is aria-hidden and does not render children. When loading becomes false, it renders the actual children. Pulse/shimmer/none variants are available; motion is reduced by shipped styles.
26
+
27
+ ## Verify
28
+
29
+ Check loading and loaded transitions, no duplicate announcements, geometry at narrow widths, reduced motion, and that the final content replaces the placeholder.
30
+
31
+ ## Common mistake
32
+
33
+ Do not expose placeholder blocks as meaningful content or rely on their movement to announce progress.
34
+
35
+ ## Sources
36
+
37
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (verified 2026-10-17)
38
+ - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion) (verified 2026-10-17)