@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.
Files changed (98) hide show
  1. package/README.md +34 -9
  2. package/package.json +1 -1
  3. package/skills/uiify/SKILL.md +125 -125
  4. package/skills/uiify/references/compositions/card-rhythm.md +14 -0
  5. package/skills/uiify/references/compositions/destructive-confirmation.md +15 -0
  6. package/skills/uiify/references/compositions/form-grouping.md +14 -0
  7. package/skills/uiify/references/compositions/hero-actions.md +14 -0
  8. package/skills/uiify/references/compositions/page-frame.md +14 -0
  9. package/skills/uiify/references/compositions/pricing-actions.md +13 -0
  10. package/skills/uiify/references/compositions/save-feedback.md +13 -0
  11. package/skills/uiify/references/compositions/table-controls.md +14 -0
  12. package/skills/uiify/references/elements/accordion.md +38 -0
  13. package/skills/uiify/references/elements/alert-modal.md +42 -0
  14. package/skills/uiify/references/elements/avatar.md +47 -0
  15. package/skills/uiify/references/elements/badge.md +47 -0
  16. package/skills/uiify/references/elements/bar-chart.md +61 -0
  17. package/skills/uiify/references/elements/breadcrumb.md +38 -0
  18. package/skills/uiify/references/elements/button.md +49 -0
  19. package/skills/uiify/references/elements/candle-chart.md +38 -0
  20. package/skills/uiify/references/elements/card.md +51 -0
  21. package/skills/uiify/references/elements/carousel.md +38 -0
  22. package/skills/uiify/references/elements/checkbox.md +39 -0
  23. package/skills/uiify/references/elements/code-block.md +50 -0
  24. package/skills/uiify/references/elements/collapsible.md +38 -0
  25. package/skills/uiify/references/elements/color-picker.md +39 -0
  26. package/skills/uiify/references/elements/combobox.md +37 -0
  27. package/skills/uiify/references/elements/command-palette.md +43 -0
  28. package/skills/uiify/references/elements/context-menu.md +38 -0
  29. package/skills/uiify/references/elements/cookie-banner.md +51 -0
  30. package/skills/uiify/references/elements/date-picker.md +43 -0
  31. package/skills/uiify/references/elements/divider.md +46 -0
  32. package/skills/uiify/references/elements/drawer.md +38 -0
  33. package/skills/uiify/references/elements/dropdown-menu.md +38 -0
  34. package/skills/uiify/references/elements/empty-state.md +50 -0
  35. package/skills/uiify/references/elements/feature-grid.md +54 -0
  36. package/skills/uiify/references/elements/field.md +44 -0
  37. package/skills/uiify/references/elements/file-upload.md +40 -0
  38. package/skills/uiify/references/elements/footer.md +45 -0
  39. package/skills/uiify/references/elements/form.md +41 -0
  40. package/skills/uiify/references/elements/header.md +42 -0
  41. package/skills/uiify/references/elements/hero.md +54 -0
  42. package/skills/uiify/references/elements/hover-card.md +38 -0
  43. package/skills/uiify/references/elements/image-gallery.md +52 -0
  44. package/skills/uiify/references/elements/inline-alert.md +46 -0
  45. package/skills/uiify/references/elements/input.md +41 -0
  46. package/skills/uiify/references/elements/line-chart.md +38 -0
  47. package/skills/uiify/references/elements/logo-wall.md +49 -0
  48. package/skills/uiify/references/elements/modal.md +38 -0
  49. package/skills/uiify/references/elements/number-field.md +39 -0
  50. package/skills/uiify/references/elements/otp-input.md +39 -0
  51. package/skills/uiify/references/elements/pagination.md +41 -0
  52. package/skills/uiify/references/elements/password-input.md +43 -0
  53. package/skills/uiify/references/elements/popup.md +38 -0
  54. package/skills/uiify/references/elements/pricing-table.md +66 -0
  55. package/skills/uiify/references/elements/progress-bar.md +47 -0
  56. package/skills/uiify/references/elements/radio-group.md +39 -0
  57. package/skills/uiify/references/elements/rating.md +39 -0
  58. package/skills/uiify/references/elements/search-input.md +45 -0
  59. package/skills/uiify/references/elements/segmented-control.md +39 -0
  60. package/skills/uiify/references/elements/select.md +42 -0
  61. package/skills/uiify/references/elements/sidebar.md +43 -0
  62. package/skills/uiify/references/elements/skeleton.md +38 -0
  63. package/skills/uiify/references/elements/slider.md +39 -0
  64. package/skills/uiify/references/elements/spinner.md +38 -0
  65. package/skills/uiify/references/elements/stats-bar.md +49 -0
  66. package/skills/uiify/references/elements/stepper.md +43 -0
  67. package/skills/uiify/references/elements/switch.md +41 -0
  68. package/skills/uiify/references/elements/table-of-contents.md +39 -0
  69. package/skills/uiify/references/elements/table.md +43 -0
  70. package/skills/uiify/references/elements/tabs.md +38 -0
  71. package/skills/uiify/references/elements/tags-input.md +39 -0
  72. package/skills/uiify/references/elements/testimonial.md +52 -0
  73. package/skills/uiify/references/elements/textarea.md +41 -0
  74. package/skills/uiify/references/elements/timeline.md +48 -0
  75. package/skills/uiify/references/elements/toast.md +39 -0
  76. package/skills/uiify/references/elements/toggle-group.md +39 -0
  77. package/skills/uiify/references/elements/toggle.md +39 -0
  78. package/skills/uiify/references/elements/toolbar.md +39 -0
  79. package/skills/uiify/references/elements/tooltip.md +38 -0
  80. package/skills/uiify/references/elements/virtual-scroll.md +39 -0
  81. package/skills/uiify/references/examples/alert-confirmation.md +34 -0
  82. package/skills/uiify/references/examples/field-validation.md +37 -0
  83. package/skills/uiify/references/examples/select-basic.md +35 -0
  84. package/skills/uiify/references/examples/table-controls.md +40 -0
  85. package/skills/uiify/references/guides/assets.md +14 -0
  86. package/skills/uiify/references/guides/content.md +11 -0
  87. package/skills/uiify/references/guides/hierarchy.md +14 -0
  88. package/skills/uiify/references/guides/reference.md +9 -0
  89. package/skills/uiify/references/guides/states.md +12 -0
  90. package/skills/uiify/references/guides/surface.md +27 -0
  91. package/skills/uiify/references/laws/accessibility.md +11 -0
  92. package/skills/uiify/references/laws/error-prevention.md +12 -0
  93. package/skills/uiify/references/laws/feedback.md +9 -0
  94. package/skills/uiify/references/laws/proximity.md +10 -0
  95. package/skills/uiify/references/laws/readability.md +9 -0
  96. package/skills/uiify/references/laws/von-restorff.md +9 -0
  97. package/skills/uiify/scripts/lint.mjs +1 -1
  98. package/skills/uiify/scripts/static.mjs +71 -14
@@ -0,0 +1,47 @@
1
+ # avatar
2
+
3
+ Binding: gap
4
+
5
+ Identify a person or account with a compact image and fallback.
6
+
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
36
+
37
+ ```html
38
+ <img src="/people/ada.webp" width="40" height="40" alt="" />
39
+ <span>Ada Lovelace</span>
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/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)
@@ -0,0 +1,47 @@
1
+ # badge
2
+
3
+ Binding: gap
4
+
5
+ Mark a short status or category beside related content.
6
+
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
36
+
37
+ ```html
38
+ <p>Deployment <span>Pending review</span></p>
39
+ ```
40
+
41
+ This is an app-level composition; UIify does not currently ship this component.
42
+
43
+ ## Sources
44
+
45
+ - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span) (verified 2026-10-16)
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)
@@ -0,0 +1,61 @@
1
+ # bar-chart
2
+
3
+ Binding: gap
4
+
5
+ Compare values across a small set of named categories.
6
+
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
36
+
37
+ ```html
38
+ <figure>
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>
43
+ <table>
44
+ <caption>Signups by month (number of accounts)</caption>
45
+ <thead><tr><th scope="col">Month</th><th scope="col">Signups</th></tr></thead>
46
+ <tbody>
47
+ <tr><th scope="row">January</th><td>12</td></tr>
48
+ <tr><th scope="row">February</th><td>19</td></tr>
49
+ <tr><th scope="row">March</th><td>24</td></tr>
50
+ </tbody>
51
+ </table>
52
+ </figure>
53
+ ```
54
+
55
+ This is an app-level composition; UIify does not currently ship this component.
56
+
57
+ ## Sources
58
+
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)
@@ -0,0 +1,49 @@
1
+ # button
2
+
3
+ Binding: button
4
+
5
+ Expose a clear action with its native interaction semantics.
6
+
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.
41
+
42
+ Related laws: references/laws/von-restorff.md, references/laws/accessibility.md
43
+
44
+ ## Sources
45
+
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)
@@ -0,0 +1,51 @@
1
+ # card
2
+
3
+ Binding: gap
4
+
5
+ Group one feature heading and its explanation.
6
+
7
+ ## Use when
8
+
9
+ A small set of related content needs a clear grouping, with a heading and supporting detail.
10
+
11
+ ## Avoid when
12
+
13
+ Do not wrap every paragraph or list item in a card. Avoid card-within-card nesting and whole-surface click behavior when the card contains multiple independent controls.
14
+
15
+ ## Structure
16
+
17
+ This is an app-level composition, not a UIify component. Group one topic under a heading, add a concise description, and use a link for one clear destination. If the card has one destination, make the heading link the primary control; keep other controls separate.
18
+
19
+ ## Responsive
20
+
21
+ Keep cards in reading order when the grid stacks. Let content determine height and align repeated actions without truncating essential labels.
22
+
23
+ ## States
24
+
25
+ Use links for navigation and buttons for in-place actions. Add selected/pressed state only when the card itself represents a selectable item.
26
+
27
+ ## Verify
28
+
29
+ Check heading hierarchy, reading order, single versus multiple actions, keyboard reachability, focus visibility, and one-column reflow.
30
+
31
+ ## Common mistake
32
+
33
+ Making an entire card clickable while also placing buttons or links inside it creates nested, ambiguous controls.
34
+
35
+ ## Custom implementation
36
+
37
+ ```html
38
+ <article aria-labelledby="plan-title">
39
+ <h2 id="plan-title"><a href="/plans/pro">Pro plan</a></h2>
40
+ <p>For teams that need shared workspaces.</p>
41
+ </article>
42
+ ```
43
+
44
+ This is an app-level composition; UIify does not currently ship this component.
45
+
46
+ Related laws: references/laws/proximity.md, references/laws/readability.md
47
+
48
+ ## Sources
49
+
50
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
51
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/visual-presentation.html) (verified 2026-10-16)
@@ -0,0 +1,38 @@
1
+ # carousel
2
+
3
+ Binding: carousel
4
+
5
+ Present a labeled sequence of related slides with native scrolling and optional controls.
6
+
7
+ ## Use when
8
+
9
+ A short sequence of related slides saves space and users benefit from viewing one or a subset at a time. Prefer direct scrolling when all items should remain discoverable together.
10
+
11
+ ## Avoid when
12
+
13
+ Do not hide essential information in offscreen slides or auto-rotate content without a clear user need and an operable stop/restart control.
14
+
15
+ ## Structure
16
+
17
+ Use `Carousel` with a stable id, descriptive aria-label, and items with unique ids and labels. The base entry is a native scroll-snap region with fragment links; navigation controls and synchronized state are in /client.
18
+
19
+ ## Responsive
20
+
21
+ Use inline axis for horizontal slides and preserve native scrolling/scroll snap. Ensure neighboring content does not make the current slide ambiguous and controls remain reachable.
22
+
23
+ ## States
24
+
25
+ Prefer manual operation. The client API supports autoplay with a rotation control and stops on keyboard focus, but it does not currently pause on pointer hover. Leave autoplay disabled unless the app adds hover pausing. The base entry works without JavaScript.
26
+
27
+ ## Verify
28
+
29
+ Check accessible carousel label, slide labels, previous/next and pagination names, fragment navigation without JavaScript, keyboard control, focus behavior, and mobile scrolling. If autoplay is used, verify pause/restart and that rotation does not obscure slide reading.
30
+
31
+ ## Common mistake
32
+
33
+ Dot-only controls with no meaningful accessible names do not tell users which slide they will select.
34
+
35
+ ## Sources
36
+
37
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/carousel/) (verified 2026-10-17)
38
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) (verified 2026-10-17)
@@ -0,0 +1,39 @@
1
+ # checkbox
2
+
3
+ Binding: checkbox
4
+
5
+ Select one or more independent options.
6
+
7
+ ## Use when
8
+
9
+ Let people independently select any number of options, including none.
10
+
11
+ ## Avoid when
12
+
13
+ Use a radio group when exactly one option can be selected. Use a switch for a single immediate on/off setting.
14
+
15
+ ## Structure
16
+
17
+ Use the documented Checkbox with a stable id and a visible, descriptive label. Group related choices in a fieldset with a legend; use the indeterminate state only for an aggregate that represents mixed child selections.
18
+
19
+ ## Responsive
20
+
21
+ Let each label wrap without reducing the control's usable hit area. Stack choices when inline labels no longer fit.
22
+
23
+ ## States
24
+
25
+ Make checked, unchecked, disabled, and any mixed aggregate state clear. Preserve selections when validation or another field fails.
26
+
27
+ ## Verify
28
+
29
+ Click both the control and its label, use Space from the keyboard, and test independent selection, group naming, disabled and indeterminate states.
30
+
31
+ ## Common mistake
32
+
33
+ Using checkboxes for mutually exclusive options or showing mixed state without an aggregate relationship.
34
+
35
+ ## Sources
36
+
37
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/) (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/tutorials/forms/grouping/) (verified 2026-10-17)
@@ -0,0 +1,50 @@
1
+ # code-block
2
+
3
+ Binding: gap
4
+
5
+ Present source text with preserved whitespace.
6
+
7
+ ## Use when
8
+
9
+ People need to read or copy source text while preserving whitespace and line breaks.
10
+
11
+ ## Avoid when
12
+
13
+ Do not put prose in preformatted code or make copying the only way to access the content. Avoid horizontal overflow that hides important lines without an intentional scroll container.
14
+
15
+ ## Structure
16
+
17
+ This is an app-level composition, not a UIify component. Use pre > code for code and a figure/figcaption when a caption identifies the example. Add a clearly named copy button only when copy is implemented; report success in a status region.
18
+
19
+ ## Responsive
20
+
21
+ Allow code to wrap when that preserves readability, or provide a clearly scrollable region with keyboard access. Keep captions and copy controls reachable at narrow widths.
22
+
23
+ ## States
24
+
25
+ Represent copy idle/success/failure in text. Do not announce every code line; preserve code as selectable text.
26
+
27
+ ## Verify
28
+
29
+ Check whitespace, language/description context, keyboard scrolling, copy action name and announcement, zoom, and line wrapping.
30
+
31
+ ## Common mistake
32
+
33
+ An icon-only copy button with no accessible name gives no indication of its action.
34
+
35
+ ## Custom implementation
36
+
37
+ ```html
38
+ <figure>
39
+ <figcaption>Install the package</figcaption>
40
+ <pre><code>npm install uiify</code></pre>
41
+ </figure>
42
+ ```
43
+
44
+ This is an app-level composition; UIify does not currently ship this component.
45
+
46
+ ## Sources
47
+
48
+ - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre) (verified 2026-10-16)
49
+ - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code) (verified 2026-10-16)
50
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
@@ -0,0 +1,38 @@
1
+ # collapsible
2
+
3
+ Binding: collapsible
4
+
5
+ Reveal secondary content with a native details/summary disclosure.
6
+
7
+ ## Use when
8
+
9
+ A section is secondary to the main flow and people benefit from choosing when to reveal it.
10
+
11
+ ## Avoid when
12
+
13
+ Do not hide information people need to complete the primary task or expect users to open several sections to compare content. Use headings and visible content for essential information.
14
+
15
+ ## Structure
16
+
17
+ Use `Collapsible` with a specific visible label and content. It uses native details/summary; give the root a stable id. Keep the disclosure label concise and informative.
18
+
19
+ ## Responsive
20
+
21
+ Let revealed content reflow naturally and avoid fixed-height panels. Keep the summary hit area comfortably operable on touch.
22
+
23
+ ## States
24
+
25
+ The native details element supports open/closed state without JavaScript. Enter/Space toggles the summary. 'defaultOpen' sets initial state; 'disabled' removes the summary from focus and marks it aria-disabled.
26
+
27
+ ## Verify
28
+
29
+ Test keyboard and pointer toggle, open/closed announcement, initial open state, disabled state, multiple independent disclosures, and narrow content reflow.
30
+
31
+ ## Common mistake
32
+
33
+ Do not use the disclosure label as a vague “More” when it can name the hidden content.
34
+
35
+ ## Sources
36
+
37
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/) (verified 2026-10-17)
38
+ - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) (verified 2026-10-17)
@@ -0,0 +1,39 @@
1
+ # color-picker
2
+
3
+ Binding: color-picker
4
+
5
+ Let people choose a color value for a specific purpose.
6
+
7
+ ## Use when
8
+
9
+ Let people set a color such as a theme accent or drawing color.
10
+
11
+ ## Avoid when
12
+
13
+ Do not use color as the only way to choose or identify a required category. Use a finite labelled choice set when only a few named colors are allowed.
14
+
15
+ ## Structure
16
+
17
+ Use the documented ColorPicker with its required visible label. Choose the documented colorSpace and alpha options to match the stored value; show the current color value as text as well as a swatch.
18
+
19
+ ## Responsive
20
+
21
+ Keep the label, picker control, and current value visible within narrow layouts.
22
+
23
+ ## States
24
+
25
+ Preserve the selected color and communicate any invalid or disabled state. The native picker UI may vary by browser and operating system.
26
+
27
+ ## Verify
28
+
29
+ Test the accessible name, keyboard use, color value serialization, alpha and color-space requirements, and the browser’s picker behavior. Check that meaning is not conveyed by color alone.
30
+
31
+ ## Common mistake
32
+
33
+ Showing a swatch without text that lets people inspect or identify its value.
34
+
35
+ ## Sources
36
+
37
+ - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/color) (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/use-of-color.html) (verified 2026-10-17)
@@ -0,0 +1,37 @@
1
+ # combobox
2
+
3
+ Binding: combobox
4
+
5
+ Search and choose from a long set of known options.
6
+
7
+ ## Use when
8
+
9
+ Let the person filter and choose from a long list of known options. Use a native `select` or radio group for a short list; use a text input for unrestricted text.
10
+
11
+ ## Avoid when
12
+
13
+ Do not use a combobox when people need to compare all options at once or when typing is not a useful way to find an option.
14
+
15
+ ## Structure
16
+
17
+ `Combobox.Root` receives `items` with `label` and `value`. Give `Combobox.Input` a visible associated label or accessible name. Render filtered items with `Combobox.Content` and `Combobox.Item`; render `Combobox.Empty` only when the filtered list is empty. The multi-value mode uses `multiple` and supports tags.
18
+
19
+ ## Responsive
20
+
21
+ Keep the input and selected value visible when the option popup opens. Let the popup scroll when the filtered list is long and keep the current option in view.
22
+
23
+ ## States
24
+
25
+ Typing filters options. Arrow keys move the active option while DOM focus stays on the input; Enter selects the active option and Escape closes the popup. Skip disabled options; provide loading feedback in the page. In Tier 2, filtering and selection require JavaScript hydration; before hydration only server-rendered markup is present.
26
+
27
+ ## Verify
28
+
29
+ Type a partial match, use ArrowDown and ArrowUp to move through results, press Enter to select, and Escape to close without selecting. Check no matches, disabled options, loading, selected value, narrow viewport, and the accessible input name.
30
+
31
+ ## Common mistake
32
+
33
+ A combobox for four choices adds typing and keyboard behavior without helping people find an option.
34
+
35
+ ## Sources
36
+
37
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) (verified 2026-10-17)
@@ -0,0 +1,43 @@
1
+ # command-palette
2
+
3
+ Binding: gap
4
+
5
+ Let users search for and invoke a small set of named commands.
6
+
7
+ ## Use when
8
+
9
+ Provide a keyboard-accessible way to find and invoke named commands across an application.
10
+
11
+ ## Avoid when
12
+
13
+ Do not call a static search form a command palette. Avoid menu/listbox semantics unless the complete keyboard and selection pattern is implemented.
14
+
15
+ ## Structure
16
+
17
+ Give the search field a visible or programmatic label. A full palette must define how focus enters and leaves, how results are navigated and selected, and how the surface is dismissed; follow the applicable combobox and dialog pattern.
18
+
19
+ ## Responsive
20
+
21
+ Keep the search field and results within the viewport, with a scrollable results region that does not trap page zoom.
22
+
23
+ ## States
24
+
25
+ Provide clear no-results, loading, and execution feedback where applicable. Keep the query and focus behavior predictable when the palette closes.
26
+
27
+ ## Verify
28
+
29
+ Test keyboard navigation, selection, Escape dismissal, focus restoration, screen-reader names, and narrow viewport behavior. A labeled search form alone does not pass this check.
30
+
31
+ ## Common mistake
32
+
33
+ Adding arrow-key handlers to a list of buttons without implementing a coherent focus and selection model.
34
+
35
+ ## Custom implementation
36
+
37
+ For a basic non-interactive list, use a labelled search form with ordinary links or buttons. Add command-palette behavior only with a complete, tested interaction model; UIify has no dedicated command-palette component.
38
+
39
+ ## Sources
40
+
41
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) (verified 2026-10-17)
42
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) (verified 2026-10-17)
43
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/) (verified 2026-10-17)
@@ -0,0 +1,38 @@
1
+ # context-menu
2
+
3
+ Binding: context-menu
4
+
5
+ A specific object has a short set of actions that are useful at the point where the user invokes its context menu
6
+
7
+ ## Use when
8
+
9
+ A specific object has a short set of actions that are useful at the point where the user invokes its context menu. Every action must also be available through a discoverable visible control or another accessible route.
10
+
11
+ ## Avoid when
12
+
13
+ Do not make right-click the only way to reach an action, or use this for general navigation. On touch devices, users need a visible alternative.
14
+
15
+ ## Structure
16
+
17
+ Wrap the object with `ContextMenu` Root, Trigger, Content, and concise action items. Use checkbox/radio items only for state choices and provide clear labels that make sense without pointer coordinates.
18
+
19
+ ## Responsive
20
+
21
+ Context menus are supplementary on touch: expose the same actions through a visible button or menu. Check that pointer-anchored placement stays on screen.
22
+
23
+ ## States
24
+
25
+ The trigger opens on the context-menu event and the menu focuses an item. Arrow keys move through items, Enter/Space selects, and Escape closes and returns focus.
26
+
27
+ ## Verify
28
+
29
+ Test context-menu key/pointer opening, keyboard navigation and selection, Escape/focus return, outside dismissal, disabled items, and viewport-edge placement. Verify the same actions are reachable without a right-click.
30
+
31
+ ## Common mistake
32
+
33
+ Do not hide the only route to an important action behind a context menu.
34
+
35
+ ## Sources
36
+
37
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/) (verified 2026-10-17)
38
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) (verified 2026-10-17)