@gunkin/uiify 0.0.17-alpha → 0.0.19-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/uiify/SKILL.md +55 -33
- package/skills/uiify/references/compositions/card-rhythm.md +0 -2
- package/skills/uiify/references/compositions/destructive-confirmation.md +1 -3
- package/skills/uiify/references/compositions/form-grouping.md +0 -2
- package/skills/uiify/references/compositions/hero-actions.md +3 -5
- package/skills/uiify/references/compositions/page-frame.md +0 -2
- package/skills/uiify/references/compositions/pricing-actions.md +0 -2
- package/skills/uiify/references/compositions/save-feedback.md +1 -3
- package/skills/uiify/references/compositions/table-controls.md +1 -3
- package/skills/uiify/references/elements/accordion.md +38 -0
- package/skills/uiify/references/elements/alert-modal.md +32 -5
- package/skills/uiify/references/elements/avatar.md +31 -2
- package/skills/uiify/references/elements/badge.md +32 -3
- package/skills/uiify/references/elements/bar-chart.md +39 -7
- package/skills/uiify/references/elements/breadcrumb.md +38 -0
- package/skills/uiify/references/elements/button.md +38 -3
- package/skills/uiify/references/elements/candle-chart.md +38 -0
- package/skills/uiify/references/elements/card.md +38 -1
- package/skills/uiify/references/elements/carousel.md +38 -0
- package/skills/uiify/references/elements/checkbox.md +39 -0
- package/skills/uiify/references/elements/code-block.md +31 -2
- package/skills/uiify/references/elements/collapsible.md +38 -0
- package/skills/uiify/references/elements/color-picker.md +39 -0
- package/skills/uiify/references/elements/combobox.md +37 -0
- package/skills/uiify/references/elements/command-palette.md +33 -12
- package/skills/uiify/references/elements/context-menu.md +38 -0
- package/skills/uiify/references/elements/cookie-banner.md +30 -2
- package/skills/uiify/references/elements/date-picker.md +33 -9
- package/skills/uiify/references/elements/divider.md +30 -2
- package/skills/uiify/references/elements/drawer.md +38 -0
- package/skills/uiify/references/elements/dropdown-menu.md +38 -0
- package/skills/uiify/references/elements/empty-state.md +30 -2
- package/skills/uiify/references/elements/feature-grid.md +41 -1
- package/skills/uiify/references/elements/field.md +33 -3
- package/skills/uiify/references/elements/file-upload.md +40 -0
- package/skills/uiify/references/elements/footer.md +35 -4
- package/skills/uiify/references/elements/form.md +31 -4
- package/skills/uiify/references/elements/header.md +31 -3
- package/skills/uiify/references/elements/hero.md +43 -3
- package/skills/uiify/references/elements/hover-card.md +38 -0
- package/skills/uiify/references/elements/image-gallery.md +36 -4
- package/skills/uiify/references/elements/inline-alert.md +30 -2
- package/skills/uiify/references/elements/input.md +31 -4
- package/skills/uiify/references/elements/line-chart.md +38 -0
- package/skills/uiify/references/elements/logo-wall.md +31 -2
- package/skills/uiify/references/elements/modal.md +38 -0
- package/skills/uiify/references/elements/number-field.md +39 -0
- package/skills/uiify/references/elements/otp-input.md +39 -0
- package/skills/uiify/references/elements/pagination.md +31 -4
- package/skills/uiify/references/elements/password-input.md +33 -9
- package/skills/uiify/references/elements/popup.md +38 -0
- package/skills/uiify/references/elements/pricing-table.md +55 -2
- package/skills/uiify/references/elements/progress-bar.md +32 -4
- package/skills/uiify/references/elements/radio-group.md +39 -0
- package/skills/uiify/references/elements/rating.md +39 -0
- package/skills/uiify/references/elements/search-input.md +35 -4
- package/skills/uiify/references/elements/segmented-control.md +39 -0
- package/skills/uiify/references/elements/select.md +29 -1
- package/skills/uiify/references/elements/sidebar.md +33 -10
- package/skills/uiify/references/elements/skeleton.md +38 -0
- package/skills/uiify/references/elements/slider.md +39 -0
- package/skills/uiify/references/elements/spinner.md +38 -0
- package/skills/uiify/references/elements/stats-bar.md +30 -2
- package/skills/uiify/references/elements/stepper.md +32 -9
- package/skills/uiify/references/elements/switch.md +31 -4
- package/skills/uiify/references/elements/table-of-contents.md +39 -0
- package/skills/uiify/references/elements/table.md +32 -3
- package/skills/uiify/references/elements/tabs.md +38 -0
- package/skills/uiify/references/elements/tags-input.md +39 -0
- package/skills/uiify/references/elements/testimonial.md +35 -4
- package/skills/uiify/references/elements/textarea.md +30 -3
- package/skills/uiify/references/elements/timeline.md +31 -3
- package/skills/uiify/references/elements/toast.md +27 -1
- package/skills/uiify/references/elements/toggle-group.md +39 -0
- package/skills/uiify/references/elements/toggle.md +39 -0
- package/skills/uiify/references/elements/toolbar.md +39 -0
- package/skills/uiify/references/elements/tooltip.md +38 -0
- package/skills/uiify/references/elements/virtual-scroll.md +39 -0
- package/skills/uiify/references/examples/alert-confirmation.md +34 -0
- package/skills/uiify/references/examples/field-validation.md +37 -0
- package/skills/uiify/references/examples/select-basic.md +35 -0
- package/skills/uiify/references/examples/table-controls.md +40 -0
- package/skills/uiify/references/guides/assets.md +14 -0
- package/skills/uiify/references/guides/content.md +11 -0
- package/skills/uiify/references/guides/hierarchy.md +14 -0
- package/skills/uiify/references/guides/reference.md +9 -0
- package/skills/uiify/references/guides/states.md +12 -0
- package/skills/uiify/references/guides/surface.md +27 -0
- package/skills/uiify/scripts/lint.mjs +1 -1
- package/skills/uiify/scripts/static.mjs +71 -14
|
@@ -4,7 +4,44 @@ Binding: gap
|
|
|
4
4
|
|
|
5
5
|
Group one feature heading and its explanation.
|
|
6
6
|
|
|
7
|
-
|
|
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.
|
|
8
45
|
|
|
9
46
|
Related laws: references/laws/proximity.md, references/laws/readability.md
|
|
10
47
|
|
|
@@ -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)
|
|
@@ -4,7 +4,35 @@ Binding: gap
|
|
|
4
4
|
|
|
5
5
|
Present source text with preserved whitespace.
|
|
6
6
|
|
|
7
|
-
Use
|
|
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
|
|
8
36
|
|
|
9
37
|
```html
|
|
10
38
|
<figure>
|
|
@@ -13,9 +41,10 @@ Use preformatted code with a concise caption. Preserve whitespace and provide a
|
|
|
13
41
|
</figure>
|
|
14
42
|
```
|
|
15
43
|
|
|
16
|
-
This is an app-level composition
|
|
44
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
17
45
|
|
|
18
46
|
## Sources
|
|
19
47
|
|
|
20
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)
|
|
21
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)
|
|
@@ -2,21 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
Binding: gap
|
|
4
4
|
|
|
5
|
-
Let users
|
|
5
|
+
Let users search for and invoke a small set of named commands.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Use when
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
<form role="search">
|
|
11
|
-
<label for="commands">Search commands</label>
|
|
12
|
-
<input id="commands" type="search" />
|
|
13
|
-
<ul><li><a href="/settings">Open settings</a></li></ul>
|
|
14
|
-
</form>
|
|
15
|
-
```
|
|
9
|
+
Provide a keyboard-accessible way to find and invoke named commands across an application.
|
|
16
10
|
|
|
17
|
-
|
|
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.
|
|
18
38
|
|
|
19
39
|
## Sources
|
|
20
40
|
|
|
21
|
-
- [
|
|
22
|
-
- [www.w3.org](https://www.w3.org/WAI/
|
|
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)
|
|
@@ -4,7 +4,35 @@ Binding: gap
|
|
|
4
4
|
|
|
5
5
|
Explain cookie choices and provide consent actions.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A product needs to explain its cookie/storage choices and provide a clear route to the detailed policy and preference controls.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not obscure the primary task with a full-screen interruption when a compact notice works. Do not imply that a button choice is legally sufficient in every jurisdiction; match the product's actual consent policy.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. State what optional storage is used for, link to the policy, and present distinct choices with similarly clear labels.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the notice readable at mobile widths and zoom; allow the page to remain usable and make every choice reachable without horizontal scrolling.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Represent the actual consent state: undecided, accepted/rejected as supported by policy, and preference editing. Persist only the choice the person made, and provide a way to revisit preferences.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check keyboard operation, policy link, clear action labels, focus order, narrow layout, persistence behavior, and that the choices match the implementation and applicable policy.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Do not hide rejection behind multiple steps while acceptance is a single prominent button.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
8
36
|
|
|
9
37
|
```html
|
|
10
38
|
<aside aria-labelledby="cookie-title">
|
|
@@ -15,7 +43,7 @@ State which optional storage choices are available and link to the detailed poli
|
|
|
15
43
|
</aside>
|
|
16
44
|
```
|
|
17
45
|
|
|
18
|
-
This is an app-level composition
|
|
46
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
19
47
|
|
|
20
48
|
## Sources
|
|
21
49
|
|
|
@@ -2,18 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
Binding: gap
|
|
4
4
|
|
|
5
|
-
Collect one calendar date using the native date control.
|
|
5
|
+
Collect one calendar date using the browser’s native date control.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Use when
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
<label for="start-date">Start date</label>
|
|
11
|
-
<input id="start-date" name="start-date" type="date" />
|
|
12
|
-
```
|
|
9
|
+
Collect one calendar date without a time, such as a start or due date.
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Use a date-time control when time matters. Avoid replacing the native picker with a custom calendar unless the task requires behavior that has been tested for keyboard and assistive technology.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use a visible label with a native input of type date. Add min and max only when the constraints are real, explain them before entry, and associate error feedback with the field.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Allow the browser’s date UI to use the platform layout; keep the field within the available width and do not assume every browser displays the same picker.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Distinguish an empty value, a valid date, and a date outside the allowed range. The submitted date value is a calendar date normalized as yyyy-mm-dd.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Test keyboard entry and picker operation in target browsers, date bounds, visible format guidance, validation text, and narrow-screen behavior.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Treating a date-only value as a timestamp with a time zone.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
36
|
+
|
|
37
|
+
Use a labelled native input with type date. This app-level pattern does not add a UIify date-picker component.
|
|
15
38
|
|
|
16
39
|
## Sources
|
|
17
40
|
|
|
18
|
-
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/
|
|
19
|
-
- [www.w3.org](https://www.w3.org/WAI/
|
|
41
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/date) (verified 2026-10-17)
|
|
42
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-17)
|
|
43
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/instructions/) (verified 2026-10-17)
|
|
@@ -4,13 +4,41 @@ Binding: gap
|
|
|
4
4
|
|
|
5
5
|
Separate adjacent thematic sections when a heading is not appropriate.
|
|
6
6
|
|
|
7
|
-
Use
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Adjacent sections change topic and a thematic break helps people understand the transition.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not add a divider between every repeated item or use it in place of spacing. Decorative lines that convey no grouping should remain outside the accessibility tree.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. Use the native hr element for a thematic break; use CSS border for a purely decorative rule.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Use logical sizing and preserve separation as content wraps or stacks. Avoid rules that become ambiguous in vertical writing or dense layouts.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
A thematic break is static. If a separator labels a widget such as a menu, use that widget's separator semantics instead of hr.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check whether the line marks a real topic change, reading flow around it, and narrow layout.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
A visual border between every card is not automatically a thematic break.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
8
36
|
|
|
9
37
|
```html
|
|
10
38
|
<hr />
|
|
11
39
|
```
|
|
12
40
|
|
|
13
|
-
This is an app-level composition
|
|
41
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
14
42
|
|
|
15
43
|
## Sources
|
|
16
44
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# drawer
|
|
2
|
+
|
|
3
|
+
Binding: drawer
|
|
4
|
+
|
|
5
|
+
A focused secondary task or navigation surface should enter from an edge and temporarily cover or accompany the page
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A focused secondary task or navigation surface should enter from an edge and temporarily cover or accompany the page. Choose it when the task benefits from a sheet-like spatial relationship.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use a drawer for content that should remain visible beside the page, or for a compact anchored choice list. Avoid turning primary navigation into a blocking task without a clear need.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use `Drawer` with a specific title, optional description, focused content, visible close control, and optional footer. Select side and size to fit the task; use snap points only when the client interaction is needed.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Use a bottom sheet on narrow screens when the task reads naturally as a sheet; keep its content scrollable and close action reachable. Respect safe areas and test the selected side at mobile widths.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
The native Tier 0 shell opens a dialog. Choose 'dismiss' deliberately: 'any' permits backdrop/Escape, 'closerequest' allows close requests, and 'none' requires an explicit close. The compound client API adds controlled state and optional snap-point dragging.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check visible title, focus entry/containment/return, close control, configured dismissal, scrolling, and narrow viewport. If using drag, test the handle with touch and pointer and ensure an explicit close remains available.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Do not rely on dragging as the only way to close or resize the drawer.
|
|
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,38 @@
|
|
|
1
|
+
# dropdown-menu
|
|
2
|
+
|
|
3
|
+
Binding: dropdown-menu
|
|
4
|
+
|
|
5
|
+
A button reveals a compact set of actions or settings for that button
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A button reveals a compact set of actions or settings for that button. Use menu items for commands, checkbox items for independent toggles, and radio items for one choice within a group.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use a menu for site navigation; use ordinary links and navigation landmarks. Do not use menu roles for a form or a list of links that should remain in the page's normal Tab sequence.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Compose `DropdownMenu` Root, Trigger, Content, and named items. Give the trigger an action-oriented accessible name; group related actions with labels and separators, and use checkbox/radio items only for their matching state model.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the menu within the viewport and ensure labels remain readable at zoom. Provide a touch-sized trigger and avoid making hover the only way to open it.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
The trigger opens the menu; keyboard interaction moves focus among items and Escape closes and returns focus. Selection closes by default. 'openOnHover' is optional enhancement; preserve the normal click and keyboard route.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Test trigger by keyboard and pointer, arrow-key item navigation, Home/End where supported, Escape and focus return, disabled items, selection, and checked/radio state announcements. Check placement near viewport edges.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
A row of destination links is navigation, even if it visually resembles a dropdown 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/ARIA/apg/patterns/menu-button/) (verified 2026-10-17)
|
|
@@ -4,7 +4,35 @@ Binding: gap
|
|
|
4
4
|
|
|
5
5
|
Explain why a collection has no items and offer a relevant next step.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A collection has no items and the person needs to understand what is empty and what useful step is available next.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not show an empty state for loading, filtered no-results, access denial, and a genuinely new collection as though they were the same cause. Name the actual state.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. Give the section a heading that names the collection and one relevant next step; use a link for navigation or a button for an in-place action.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the message and action close in reading order, use a concise line length, and do not center long explanatory copy in an unnecessarily narrow area.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Distinguish first-use empty, filtered no-results, unavailable/error, and loading states. Explain a recovery action for filters and avoid suggesting creation when the person lacks permission.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check the heading and action name, real destination/behavior, keyboard access, state-specific copy, and narrow/zoom layout.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
“No results” should offer a way to clear or change filters, not a create action unrelated to the search.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
8
36
|
|
|
9
37
|
```html
|
|
10
38
|
<section aria-labelledby="empty-title">
|
|
@@ -14,7 +42,7 @@ Explain what is empty and why it matters, then offer one next action that addres
|
|
|
14
42
|
</section>
|
|
15
43
|
```
|
|
16
44
|
|
|
17
|
-
This is an app-level composition
|
|
45
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
18
46
|
|
|
19
47
|
## Sources
|
|
20
48
|
|