@gunkin/uiify 0.0.16-alpha → 0.0.19-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -9
- package/package.json +1 -1
- package/skills/uiify/SKILL.md +125 -125
- package/skills/uiify/references/compositions/card-rhythm.md +14 -0
- package/skills/uiify/references/compositions/destructive-confirmation.md +15 -0
- package/skills/uiify/references/compositions/form-grouping.md +14 -0
- package/skills/uiify/references/compositions/hero-actions.md +14 -0
- package/skills/uiify/references/compositions/page-frame.md +14 -0
- package/skills/uiify/references/compositions/pricing-actions.md +13 -0
- package/skills/uiify/references/compositions/save-feedback.md +13 -0
- package/skills/uiify/references/compositions/table-controls.md +14 -0
- package/skills/uiify/references/elements/accordion.md +38 -0
- package/skills/uiify/references/elements/alert-modal.md +42 -0
- package/skills/uiify/references/elements/avatar.md +47 -0
- package/skills/uiify/references/elements/badge.md +47 -0
- package/skills/uiify/references/elements/bar-chart.md +61 -0
- package/skills/uiify/references/elements/breadcrumb.md +38 -0
- package/skills/uiify/references/elements/button.md +49 -0
- package/skills/uiify/references/elements/candle-chart.md +38 -0
- package/skills/uiify/references/elements/card.md +51 -0
- package/skills/uiify/references/elements/carousel.md +38 -0
- package/skills/uiify/references/elements/checkbox.md +39 -0
- package/skills/uiify/references/elements/code-block.md +50 -0
- package/skills/uiify/references/elements/collapsible.md +38 -0
- package/skills/uiify/references/elements/color-picker.md +39 -0
- package/skills/uiify/references/elements/combobox.md +37 -0
- package/skills/uiify/references/elements/command-palette.md +43 -0
- package/skills/uiify/references/elements/context-menu.md +38 -0
- package/skills/uiify/references/elements/cookie-banner.md +51 -0
- package/skills/uiify/references/elements/date-picker.md +43 -0
- package/skills/uiify/references/elements/divider.md +46 -0
- package/skills/uiify/references/elements/drawer.md +38 -0
- package/skills/uiify/references/elements/dropdown-menu.md +38 -0
- package/skills/uiify/references/elements/empty-state.md +50 -0
- package/skills/uiify/references/elements/feature-grid.md +54 -0
- package/skills/uiify/references/elements/field.md +44 -0
- package/skills/uiify/references/elements/file-upload.md +40 -0
- package/skills/uiify/references/elements/footer.md +45 -0
- package/skills/uiify/references/elements/form.md +41 -0
- package/skills/uiify/references/elements/header.md +42 -0
- package/skills/uiify/references/elements/hero.md +54 -0
- package/skills/uiify/references/elements/hover-card.md +38 -0
- package/skills/uiify/references/elements/image-gallery.md +52 -0
- package/skills/uiify/references/elements/inline-alert.md +46 -0
- package/skills/uiify/references/elements/input.md +41 -0
- package/skills/uiify/references/elements/line-chart.md +38 -0
- package/skills/uiify/references/elements/logo-wall.md +49 -0
- package/skills/uiify/references/elements/modal.md +38 -0
- package/skills/uiify/references/elements/number-field.md +39 -0
- package/skills/uiify/references/elements/otp-input.md +39 -0
- package/skills/uiify/references/elements/pagination.md +41 -0
- package/skills/uiify/references/elements/password-input.md +43 -0
- package/skills/uiify/references/elements/popup.md +38 -0
- package/skills/uiify/references/elements/pricing-table.md +66 -0
- package/skills/uiify/references/elements/progress-bar.md +47 -0
- package/skills/uiify/references/elements/radio-group.md +39 -0
- package/skills/uiify/references/elements/rating.md +39 -0
- package/skills/uiify/references/elements/search-input.md +45 -0
- package/skills/uiify/references/elements/segmented-control.md +39 -0
- package/skills/uiify/references/elements/select.md +42 -0
- package/skills/uiify/references/elements/sidebar.md +43 -0
- package/skills/uiify/references/elements/skeleton.md +38 -0
- package/skills/uiify/references/elements/slider.md +39 -0
- package/skills/uiify/references/elements/spinner.md +38 -0
- package/skills/uiify/references/elements/stats-bar.md +49 -0
- package/skills/uiify/references/elements/stepper.md +43 -0
- package/skills/uiify/references/elements/switch.md +41 -0
- package/skills/uiify/references/elements/table-of-contents.md +39 -0
- package/skills/uiify/references/elements/table.md +43 -0
- package/skills/uiify/references/elements/tabs.md +38 -0
- package/skills/uiify/references/elements/tags-input.md +39 -0
- package/skills/uiify/references/elements/testimonial.md +52 -0
- package/skills/uiify/references/elements/textarea.md +41 -0
- package/skills/uiify/references/elements/timeline.md +48 -0
- package/skills/uiify/references/elements/toast.md +39 -0
- package/skills/uiify/references/elements/toggle-group.md +39 -0
- package/skills/uiify/references/elements/toggle.md +39 -0
- package/skills/uiify/references/elements/toolbar.md +39 -0
- package/skills/uiify/references/elements/tooltip.md +38 -0
- package/skills/uiify/references/elements/virtual-scroll.md +39 -0
- package/skills/uiify/references/examples/alert-confirmation.md +34 -0
- package/skills/uiify/references/examples/field-validation.md +37 -0
- package/skills/uiify/references/examples/select-basic.md +35 -0
- package/skills/uiify/references/examples/table-controls.md +40 -0
- package/skills/uiify/references/guides/assets.md +14 -0
- package/skills/uiify/references/guides/content.md +11 -0
- package/skills/uiify/references/guides/hierarchy.md +14 -0
- package/skills/uiify/references/guides/reference.md +9 -0
- package/skills/uiify/references/guides/states.md +12 -0
- package/skills/uiify/references/guides/surface.md +27 -0
- package/skills/uiify/references/laws/accessibility.md +11 -0
- package/skills/uiify/references/laws/error-prevention.md +12 -0
- package/skills/uiify/references/laws/feedback.md +9 -0
- package/skills/uiify/references/laws/proximity.md +10 -0
- package/skills/uiify/references/laws/readability.md +9 -0
- package/skills/uiify/references/laws/von-restorff.md +9 -0
- package/skills/uiify/scripts/lint.mjs +1 -1
- package/skills/uiify/scripts/static.mjs +71 -14
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# textarea
|
|
2
|
+
|
|
3
|
+
Binding: textarea
|
|
4
|
+
|
|
5
|
+
Accept a longer free-text value.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Collect a response that may span multiple lines, such as a message or description.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Use a single-line input for short values and avoid imposing a character limit that the task does not require.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Associate the documented Textarea with a visible label. State length or format limits before entry and place validation feedback next to the control.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Let the field grow to the available inline size and allow entered text to wrap. Use the documented autoSize option when content-driven height is appropriate.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Preserve text after an error and identify invalid content in text; do not rely on a color change alone.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check the visible label, instructions, keyboard editing, error association, long content, and narrow-width reflow.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Using placeholder text as a substitute for the label or hiding the only copy of a length limit.
|
|
34
|
+
|
|
35
|
+
Related laws: references/laws/proximity.md, references/laws/accessibility.md
|
|
36
|
+
|
|
37
|
+
## Sources
|
|
38
|
+
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-17)
|
|
40
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/instructions/) (verified 2026-10-17)
|
|
41
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# timeline
|
|
2
|
+
|
|
3
|
+
Binding: gap
|
|
4
|
+
|
|
5
|
+
Show dated events in chronological order.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Events have a meaningful chronological sequence and each date needs to stay attached to its description.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use a timeline to decorate unrelated facts or imply chronology when events are unordered. Use a table when people need to compare attributes across events.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
This is an app-level composition, not a UIify component. Use an ordered list when sequence matters, and a time element with machine-readable datetime for each date. Keep event title and details in the same list item.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Preserve chronological reading order as a vertical list on narrow screens. Do not rely on left/right placement or connecting lines to communicate sequence.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Distinguish past, current, and upcoming events in text when those states matter; color and position alone are insufficient.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check ordering, machine-readable dates, date format, current/upcoming meaning, list semantics, and narrow layout.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
A reverse chronological visual layout can conflict with DOM reading order if the markup is not ordered intentionally.
|
|
34
|
+
|
|
35
|
+
## Custom implementation
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<ol>
|
|
39
|
+
<li><time datetime="2026-10-17">October 17, 2026</time><p>Release published</p></li>
|
|
40
|
+
</ol>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This is an app-level composition; UIify does not currently ship this component.
|
|
44
|
+
|
|
45
|
+
## Sources
|
|
46
|
+
|
|
47
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time) (verified 2026-10-16)
|
|
48
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# toast
|
|
2
|
+
|
|
3
|
+
Binding: toast
|
|
4
|
+
|
|
5
|
+
Confirm the result of a completed save.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A brief, non-blocking update confirms a completed action or reports a change while the person continues working. Use assertive priority only when the message is urgent.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use a timed toast for errors that require correction, critical information, or a decision. Put actionable errors in the relevant form or page and keep them visible.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Place a live `ToastViewport` beside the client provider and enqueue a concise title/description. Include an explicit close control; add one short action only when undo or a direct follow-up is useful.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep notifications clear of controls and safe areas, allow text to wrap, and limit simultaneous messages so the queue stays readable.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Toasts default to polite announcements and a 4-second duration. Hover and focus pause the timer; set duration to 0 for persistent feedback. The client island is required for the queue; the exported shell alone does not enqueue messages.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check that a save message is announced without moving focus, pause on pointer/focus, close control, queue behavior, persistent duration, and a narrow viewport. Confirm assertive announcements are reserved for urgent messages.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Do not auto-dismiss an error before the person can read and act on it.
|
|
34
|
+
|
|
35
|
+
Related laws: references/laws/feedback.md
|
|
36
|
+
|
|
37
|
+
## Sources
|
|
38
|
+
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# toggle-group
|
|
2
|
+
|
|
3
|
+
Binding: toggle-group
|
|
4
|
+
|
|
5
|
+
Select one or several related options as a group of toggles.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Present a compact set of related options whose selected values affect the same view or object.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Use ordinary links for navigation, Tabs for switching associated panels, and checkboxes for a form list that benefits from visible labels and descriptions.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use ToggleGroup with a stable id, a group name, and items with values and labels. Set type to single for one choice or multiple for independent choices.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Let labels wrap or stack without changing the option order or hiding selected values. Keep targets usable at narrow widths.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Show selected and unselected values clearly. In single mode, keep a valid selection when one is required; in multiple mode, allow the documented independent selection behavior.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Test arrow-key operation, group name, single/multiple selection, disabled items, selected-state announcement, and keyboard focus.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Using a toggle group for navigation or tabs when options do not represent selection on the same content.
|
|
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/ARIA/apg/patterns/checkbox/) (verified 2026-10-17)
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# toggle
|
|
2
|
+
|
|
3
|
+
Binding: toggle
|
|
4
|
+
|
|
5
|
+
Expose a binary value with a toggle-style presentation.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Present one reversible binary value, such as whether a formatting option is active.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Use a switch for a persistent on/off setting and ordinary buttons for one-time actions.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use the documented Toggle with its required id and label. It is backed by a native checkbox; keep the label stable so the checked state conveys the change.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep the label visible or provide an accessible name for an icon-only control. Preserve an adequate target at narrow widths.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
Expose checked and unchecked state and show it visually without relying on color alone. Disabled state should remain distinguishable.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Use Space to toggle, check the announced checkbox state and stable name, and test keyboard focus and disabled behavior.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Styling a checkbox as a toggle button while hiding its checked state from the visual presentation.
|
|
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/ARIA/apg/patterns/switch/) (verified 2026-10-17)
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# toolbar
|
|
2
|
+
|
|
3
|
+
Binding: toolbar
|
|
4
|
+
|
|
5
|
+
Group three or more related controls with a compact keyboard navigation model.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Group at least three related controls that act on the same object or task.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not use toolbar semantics for a small set of unrelated actions or when controls need their own ordinary Tab stops.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use the documented Toolbar.Root with an accessible name and a consistent orientation. Use buttons for actions, links for navigation, and selected state only for toggle buttons.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Let controls wrap only if arrow-key movement still follows a predictable order; otherwise provide a scrollable group or switch to ordinary controls with Tab navigation.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
The toolbar uses one Tab stop with arrow-key movement among enabled controls. Disabled controls are skipped; expose toggle state with the documented selected button behavior.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Test Tab entry/exit, arrow movement, orientation, disabled items, toggle announcements, and operation with a keyboard.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Adding role="toolbar" without implementing its expected arrow-key focus management.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/) (verified 2026-10-17)
|
|
38
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) (verified 2026-10-17)
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/focus-order.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# tooltip
|
|
2
|
+
|
|
3
|
+
Binding: tooltip
|
|
4
|
+
|
|
5
|
+
Add a brief supplemental label to a control without replacing its name.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
Add a short, supplemental explanation to an icon-only control or unfamiliar action. Keep the control's accessible name on the trigger; tooltip text does not replace it.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not put essential instructions or interactive content in a tooltip. Keep field labels visible; use `popup` or `hover-card` for content that needs interaction.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Nest `Tooltip.Root`, `Tooltip.Trigger`, and `Tooltip.Content` inside `Tooltip.Provider`. Content is a non-focusable tooltip associated with its trigger. For touch users, make the same information available without hover.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Keep tooltip text brief and ensure it remains within the viewport. Touch has no hover, so essential information must remain available through visible text or another deliberate interaction.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
UIify opens on mouse hover after the provider delay and immediately on keyboard focus; Escape closes it. Focus stays on the trigger. The WAI-ARIA APG tooltip pattern is still work in progress, so treat it as guidance rather than a settled standard.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Focus the trigger with the keyboard and confirm the tooltip appears and is referenced by the trigger. Confirm Escape dismisses it, pointer movement between trigger and content does not close it prematurely, and the content is not clipped at viewport edges. Check the equivalent touch interaction.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
Using a tooltip as the only label for a field leaves the field unnamed when the tooltip is unavailable.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/) (verified 2026-10-17)
|
|
38
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/content-on-hover-or-focus.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# virtual-scroll
|
|
2
|
+
|
|
3
|
+
Binding: virtual-scroll
|
|
4
|
+
|
|
5
|
+
A genuinely large list or grid needs to render only the visible range and nearby rows to keep scrolling responsive
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
A genuinely large list or grid needs to render only the visible range and nearby rows to keep scrolling responsive.
|
|
10
|
+
|
|
11
|
+
## Avoid when
|
|
12
|
+
|
|
13
|
+
Do not virtualize short lists. Avoid it when users need browser find-in-page, a complete static/print view, or reliable access to all rows without JavaScript unless you provide an alternative.
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
Use `VirtualScroll` with stable unique item ids and a renderRow function. Keep the default list role for lists; use grid only when each row supplies the correct grid structure and keyboard model. Name the scroll region and provide a useful height/size estimate.
|
|
18
|
+
|
|
19
|
+
## Responsive
|
|
20
|
+
|
|
21
|
+
Choose vertical or horizontal orientation deliberately, set rowHeight or estimateRowHeight to match actual content, and test at narrow widths and zoom.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
This is a Tier 2 client component. It exposes visible rows with aria-posinset/aria-setsize; rows outside the rendered window are absent from the DOM. For high-value data, provide a non-virtualized route or export.
|
|
26
|
+
|
|
27
|
+
## Verify
|
|
28
|
+
|
|
29
|
+
Check keyboard scrolling/focus, screen-reader item positions and total size, first/last rows, dynamic row measurement, list updates with stable ids, anchor/follow behavior if used, and no-JS/print alternatives.
|
|
30
|
+
|
|
31
|
+
## Common mistake
|
|
32
|
+
|
|
33
|
+
A scroll container that exposes only visible rows can make the rest of the collection unreachable to find-in-page and some assistive workflows.
|
|
34
|
+
|
|
35
|
+
## Sources
|
|
36
|
+
|
|
37
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-posinset) (verified 2026-10-17)
|
|
38
|
+
- [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-setsize) (verified 2026-10-17)
|
|
39
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) (verified 2026-10-17)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Example: alert-confirmation
|
|
2
|
+
|
|
3
|
+
Element: references/elements/alert-modal.md
|
|
4
|
+
|
|
5
|
+
Export: `AlertConfirmation`
|
|
6
|
+
|
|
7
|
+
## Source
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { AlertModal } from "@gunkin/uiify";
|
|
11
|
+
|
|
12
|
+
export function AlertConfirmation() {
|
|
13
|
+
return (
|
|
14
|
+
<AlertModal
|
|
15
|
+
id="delete-draft"
|
|
16
|
+
title="Delete draft?"
|
|
17
|
+
description="This permanently removes the draft."
|
|
18
|
+
trigger="Delete draft"
|
|
19
|
+
cancelLabel="Keep draft"
|
|
20
|
+
actionLabel="Delete"
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## CSS
|
|
27
|
+
|
|
28
|
+
```css
|
|
29
|
+
[data-uiify-field] { display: grid; gap: 0.5rem; }
|
|
30
|
+
[data-uiify-field] input,
|
|
31
|
+
[data-uiify-select] { min-block-size: 2.75rem; padding-inline: 0.75rem; }
|
|
32
|
+
table { border-collapse: collapse; inline-size: 100%; }
|
|
33
|
+
th, td { padding: 0.5rem; text-align: start; }
|
|
34
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Example: field-validation
|
|
2
|
+
|
|
3
|
+
Element: references/elements/field.md
|
|
4
|
+
|
|
5
|
+
Export: `FieldValidation`
|
|
6
|
+
|
|
7
|
+
## Source
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
"use client";
|
|
11
|
+
|
|
12
|
+
import { useState } from "react";
|
|
13
|
+
import { Field } from "@gunkin/uiify";
|
|
14
|
+
|
|
15
|
+
export function FieldValidation() {
|
|
16
|
+
const [email, setEmail] = useState("");
|
|
17
|
+
const invalid = email.length > 0 && !email.includes("@");
|
|
18
|
+
return (
|
|
19
|
+
<Field.Root id="email" invalid={invalid}>
|
|
20
|
+
<Field.Label fieldId="email">Email</Field.Label>
|
|
21
|
+
<Field.Control fieldId="email" as="input" type="email" invalid={invalid} value={email} onChange={(event) => setEmail(event.currentTarget.value)} />
|
|
22
|
+
<Field.Description fieldId="email">We will send your receipt here.</Field.Description>
|
|
23
|
+
{invalid ? <Field.Error fieldId="email" invalid>Enter a valid email address.</Field.Error> : null}
|
|
24
|
+
</Field.Root>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## CSS
|
|
30
|
+
|
|
31
|
+
```css
|
|
32
|
+
[data-uiify-field] { display: grid; gap: 0.5rem; }
|
|
33
|
+
[data-uiify-field] input,
|
|
34
|
+
[data-uiify-select] { min-block-size: 2.75rem; padding-inline: 0.75rem; }
|
|
35
|
+
table { border-collapse: collapse; inline-size: 100%; }
|
|
36
|
+
th, td { padding: 0.5rem; text-align: start; }
|
|
37
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Example: select-basic
|
|
2
|
+
|
|
3
|
+
Element: references/elements/select.md
|
|
4
|
+
|
|
5
|
+
Export: `SelectBasic`
|
|
6
|
+
|
|
7
|
+
## Source
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Select } from "@gunkin/uiify";
|
|
11
|
+
|
|
12
|
+
export function SelectBasic() {
|
|
13
|
+
return (
|
|
14
|
+
<label>
|
|
15
|
+
Plan
|
|
16
|
+
<Select.Root name="plan" defaultValue="monthly">
|
|
17
|
+
<Select.Content>
|
|
18
|
+
<Select.Item value="monthly">Monthly</Select.Item>
|
|
19
|
+
<Select.Item value="annual">Annual</Select.Item>
|
|
20
|
+
</Select.Content>
|
|
21
|
+
</Select.Root>
|
|
22
|
+
</label>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## CSS
|
|
28
|
+
|
|
29
|
+
```css
|
|
30
|
+
[data-uiify-field] { display: grid; gap: 0.5rem; }
|
|
31
|
+
[data-uiify-field] input,
|
|
32
|
+
[data-uiify-select] { min-block-size: 2.75rem; padding-inline: 0.75rem; }
|
|
33
|
+
table { border-collapse: collapse; inline-size: 100%; }
|
|
34
|
+
th, td { padding: 0.5rem; text-align: start; }
|
|
35
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Example: table-controls
|
|
2
|
+
|
|
3
|
+
Element: references/elements/table.md
|
|
4
|
+
|
|
5
|
+
Export: `TableControls`
|
|
6
|
+
|
|
7
|
+
## Source
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
"use client";
|
|
11
|
+
|
|
12
|
+
import { useState } from "react";
|
|
13
|
+
import { Table } from "@gunkin/uiify";
|
|
14
|
+
|
|
15
|
+
const people = ["Ada Lovelace", "Grace Hopper", "Katherine Johnson"];
|
|
16
|
+
|
|
17
|
+
export function TableControls() {
|
|
18
|
+
const [query, setQuery] = useState("");
|
|
19
|
+
const visible = people.filter((person) => person.toLowerCase().includes(query.toLowerCase()));
|
|
20
|
+
return (
|
|
21
|
+
<section>
|
|
22
|
+
<label>Filter people <input value={query} onChange={(event) => setQuery(event.currentTarget.value)} /></label>
|
|
23
|
+
<Table.Root>
|
|
24
|
+
<Table.Header><Table.Row id="header"><Table.ColumnHeader id="name-heading">Name</Table.ColumnHeader></Table.Row></Table.Header>
|
|
25
|
+
<Table.Body>{visible.map((person) => <Table.Row id={person} key={person}><Table.Cell>{person}</Table.Cell></Table.Row>)}</Table.Body>
|
|
26
|
+
</Table.Root>
|
|
27
|
+
</section>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## CSS
|
|
33
|
+
|
|
34
|
+
```css
|
|
35
|
+
[data-uiify-field] { display: grid; gap: 0.5rem; }
|
|
36
|
+
[data-uiify-field] input,
|
|
37
|
+
[data-uiify-select] { min-block-size: 2.75rem; padding-inline: 0.75rem; }
|
|
38
|
+
table { border-collapse: collapse; inline-size: 100%; }
|
|
39
|
+
th, td { padding: 0.5rem; text-align: start; }
|
|
40
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Choose image and type material
|
|
2
|
+
|
|
3
|
+
Read this guide only when images or typography carry the page's composition. Start with project assets and the requested brand; do not require image generation, network access or new font downloads.
|
|
4
|
+
|
|
5
|
+
| Material | Use when | Composition and responsive check |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Photography | A real person, place or physical subject is evidence for the message. | Preserve the subject's focal point in each crop; use a ratio that suits the section and stack or reframe at narrow widths. |
|
|
8
|
+
| Product screenshot | The actual interface explains the product or task. | Keep essential UI legible and intact; do not replace a product screenshot with decorative imagery. At mobile widths, stack it or crop only if the important controls remain visible. |
|
|
9
|
+
| Illustration | An abstract idea benefits from a simple visual explanation. | Keep style and color consistent with the product; avoid inventing interface details, customer logos or testimonials. |
|
|
10
|
+
| Typographic composition | The words themselves are the main visual material. | Preserve supplied brand fonts and established roles. Check line breaks, long strings and fallback metrics at narrow widths; never rewrite factual copy just to fit. |
|
|
11
|
+
|
|
12
|
+
When assets are missing, do not invent reviews, testimonials, customer logos or product screens. Use existing fonts first and preserve supplied brand fonts. A font fallback should remain close enough in width and weight to avoid a layout jump while the chosen font loads. Test long headings and labels; use tabular numerals when aligned values benefit from equal-width digits, not as a universal setting.
|
|
13
|
+
|
|
14
|
+
Motion should explain a state change or guide attention. Keep it brief and honor `prefers-reduced-motion`; decorative movement should not compete with reading or controls.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Does the copy say what this page and each action actually do?
|
|
2
|
+
|
|
3
|
+
Read the page at its default viewport and in its relevant form or overlay states. Check that:
|
|
4
|
+
|
|
5
|
+
- Headings identify the subject or decision on this page, not a generic slogan. A settings page should name the setting group; a pricing page should name the offer.
|
|
6
|
+
- Action labels name the result. “Save changes” tells the user more than “Submit”; verify the label still fits at 390×844.
|
|
7
|
+
- An automatically detected input error identifies what happened and, when known, how to correct it. This follows [WCAG 2.2 Success Criterion 3.3.3](https://www.w3.org/WAI/WCAG22/Understanding/error-suggestion.html); do not invent a correction when the cause is unknown.
|
|
8
|
+
- Example content is plausible for the page and its audience. Replace lorem ipsum and repeated placeholder values, then inspect the populated state for wrapping and density.
|
|
9
|
+
- One term names one concept throughout the page. Compare navigation, headings, controls, confirmation, and errors for competing labels.
|
|
10
|
+
|
|
11
|
+
Use a real task sentence and realistic values to test the copy. If the same label could describe several different outcomes, make the result explicit.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# What leads the eye, and do the parts read in the right order?
|
|
2
|
+
|
|
3
|
+
At 1440×900 and 390×844, inspect the initial viewport and one scrolled section. Check these visible relationships:
|
|
4
|
+
|
|
5
|
+
- One item leads each screen. Squint at the screenshot or blur it; the primary heading or task should remain the first clear anchor.
|
|
6
|
+
- Neighboring text roles differ by size or weight, not color alone. Compare computed font size and weight in the heading, body, label, and helper text.
|
|
7
|
+
- A supplied brand font and existing type roles remain intact. Test long headings and labels at narrow widths; use tabular numerals only when aligned values need them.
|
|
8
|
+
- Main text lines average 45–75 characters as a readability heuristic and do not exceed 80 characters as a ceiling. [WCAG 1.4.8](https://www.w3.org/WAI/WCAG22/Understanding/visual-presentation.html) describes 80 characters as one available text-presentation requirement; it does not make 45–75 a rule.
|
|
9
|
+
- Related items sit closer together than unrelated groups. Check the grouping against the `proximity` law in the relevant page design.
|
|
10
|
+
- Space above a heading exceeds the space below it; treat this as a grouping heuristic and compare computed margins.
|
|
11
|
+
- Density matches the page surface in `surface.md`; a work screen can be denser than a reading page without losing clear groups.
|
|
12
|
+
- Heading levels follow the visible and document order without skipped levels. Inspect the heading outline as well as the screenshot.
|
|
13
|
+
|
|
14
|
+
If one relation fails, name the viewport and state, then make one correction and inspect both viewports again.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Compare against a visual reference
|
|
2
|
+
|
|
3
|
+
Use this guide only when matching a supplied screenshot or comparing an existing page. Keep the requested scope: a reference is evidence for the requested work, not permission to redesign unrelated parts.
|
|
4
|
+
|
|
5
|
+
Compare the same route at the same viewport, the same state and the same scale. Note the page's grid and proportions, text roles, spacing rhythm, color roles, section order, image role and crop. Separate observed differences from assumptions; keep the notes concise and actionable.
|
|
6
|
+
|
|
7
|
+
Inspect project assets before choosing replacements. Use local assets such as images and fonts when available, and preserve recognizable content and crop where the reference calls for it. Do not invent an asset, brand detail or unavailable content. A mobile adaptation inferred from a desktop screenshot is not verified until checked at a real narrow viewport.
|
|
8
|
+
|
|
9
|
+
If the reference cannot be opened, continue with the accessible request and existing project. Say that visual fidelity could not be checked; do not claim to have inspected an unavailable image.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Does the page still work outside the happy path?
|
|
2
|
+
|
|
3
|
+
Use the browser to create these test inputs and states, then record which you checked:
|
|
4
|
+
|
|
5
|
+
- Double the content length in headings, button labels, and primary text. Add a long unbroken value such as a URL or identifier and inspect wrapping at 390×844.
|
|
6
|
+
- Set `dir="rtl"` on `html`; inspect alignment, order, icons, and navigation at 1440×900 and 390×844.
|
|
7
|
+
- Check a 320 CSS pixel viewport and browser zoom at 200%. Confirm content and actions remain available without unintended horizontal scrolling. [WCAG 2.2 Success Criterion 1.4.10](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html) requires reflow at a 320 CSS pixel width for vertically scrolling content, except content that needs two-dimensional layout.
|
|
8
|
+
- Use only the keyboard: follow Tab order, activate with Enter or Space, dismiss overlays with Escape where supported, and confirm focus returns to the opener.
|
|
9
|
+
- Exercise loading, empty, error, and disabled states where they exist. Submit an invalid form and check the message, focus location, and preservation of valid values.
|
|
10
|
+
- If motion communicates a state or transition, verify its reduced-motion behavior; do not make essential information depend on animation.
|
|
11
|
+
|
|
12
|
+
Record the viewport, input, and state for each check. A screenshot shows appearance only; it does not prove keyboard operation, focus return, or touch and pointer behavior.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# What kind of page is this, and how expressive should it be?
|
|
2
|
+
|
|
3
|
+
Treat this classification as a heuristic about the requested page, not the product. Choose the surface that best describes the page being built; a product may contain several kinds.
|
|
4
|
+
|
|
5
|
+
Follow the request's scope: a reference sets a visual target, a narrow fix stays narrow, and a new page within an existing product follows that project's design decisions. Use surface guidance for the part being created or changed; an audit reports evidence without expanding into a redesign.
|
|
6
|
+
|
|
7
|
+
## Decide
|
|
8
|
+
|
|
9
|
+
For a landing, pricing, or campaign page, prioritize one clear next step per screen and make the evidence supporting its claim easy to find. Avoid competing primary actions and decorative imagery that does not support the message. Typical catalog choices include `hero`, `hero-actions`, `pricing-table`, `testimonial`, `feature-grid`, and `logo-wall`.
|
|
10
|
+
|
|
11
|
+
## Work
|
|
12
|
+
|
|
13
|
+
For settings, dashboards, admin tools, and tables, prioritize scanning, predictable controls, and information density. Avoid turning navigation or controls into decoration. Use typography, semantic color roles, density, and one distinctive detail for character. Typical choices include `header`, `sidebar`, `table`, `form`, `field`, `tabs`, `toolbar`, and `pagination`.
|
|
14
|
+
|
|
15
|
+
## Read
|
|
16
|
+
|
|
17
|
+
For documentation, articles, and changelogs, prioritize a readable line length, clear heading structure, and navigation within the page. Avoid narrow columns that make code or data unusable and headings that skip levels. Typical choices include `table-of-contents`, `code-block`, `accordion`, `breadcrumb`, and `pagination`.
|
|
18
|
+
|
|
19
|
+
## View
|
|
20
|
+
|
|
21
|
+
For galleries and portfolios, let the work lead and keep surrounding chrome quiet. Avoid controls or labels that compete with the work, while keeping meaningful descriptions and navigation available. Typical choices include `image-gallery`, `carousel`, `card`, `badge`, and `divider`.
|
|
22
|
+
|
|
23
|
+
## Review with evidence
|
|
24
|
+
|
|
25
|
+
At 320 CSS pixels wide, confirm that content and functionality reflow without two-dimensional scrolling except where the content genuinely requires it. This reflects [WCAG 2.2 Success Criterion 1.4.10](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html); it does not prescribe a visual style.
|
|
26
|
+
|
|
27
|
+
After inspecting a rendered page, change a detail only when you can name the visible problem, the state and viewport where it appears, and one correction. If you cannot point to all three, keep the design as it is.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# accessibility
|
|
2
|
+
|
|
3
|
+
Preserve semantic relationships and keyboard operation in either visual alternative.
|
|
4
|
+
|
|
5
|
+
- Keep focus order consistent with the meaningful document order; avoid positive tabindex.
|
|
6
|
+
|
|
7
|
+
## Sources
|
|
8
|
+
|
|
9
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
10
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) (verified 2026-10-16)
|
|
11
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/focus-order.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# error-prevention
|
|
2
|
+
|
|
3
|
+
Make destructive confirmation explicit and reversible until confirmed.
|
|
4
|
+
|
|
5
|
+
- Give intrinsic buttons an explicit type to avoid unintended submission.
|
|
6
|
+
- State the consequence, offer cancellation and focus the least destructive action.
|
|
7
|
+
|
|
8
|
+
## Sources
|
|
9
|
+
|
|
10
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/) (verified 2026-10-16)
|
|
11
|
+
- [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) (verified 2026-10-16)
|
|
12
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/instructions/) (verified 2026-10-16)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# feedback
|
|
2
|
+
|
|
3
|
+
Make save results available without taking focus.
|
|
4
|
+
|
|
5
|
+
- Expose the save confirmation as a status message; choose its visual proximity through the pair.
|
|
6
|
+
|
|
7
|
+
## Sources
|
|
8
|
+
|
|
9
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# proximity
|
|
2
|
+
|
|
3
|
+
Keep related controls and content visually associated.
|
|
4
|
+
|
|
5
|
+
- Keep semantic grouping and visual grouping consistent; exact spacing is an owner choice.
|
|
6
|
+
|
|
7
|
+
## Sources
|
|
8
|
+
|
|
9
|
+
- [www.w3.org](https://www.w3.org/WAI/tutorials/forms/grouping/) (verified 2026-10-16)
|
|
10
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# readability
|
|
2
|
+
|
|
3
|
+
Preserve readable content while comparing spacing and alignment.
|
|
4
|
+
|
|
5
|
+
- Avoid long unbroken lines; the 80-character heuristic is inspired by a Level AAA criterion, not an AA requirement.
|
|
6
|
+
|
|
7
|
+
## Sources
|
|
8
|
+
|
|
9
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/visual-presentation.html) (verified 2026-10-16)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# von-restorff
|
|
2
|
+
|
|
3
|
+
Consider distinct emphasis for the primary action.
|
|
4
|
+
|
|
5
|
+
- Use clear action labels; visual emphasis is a design hypothesis, and color alone must not carry meaning.
|
|
6
|
+
|
|
7
|
+
## Sources
|
|
8
|
+
|
|
9
|
+
- [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-16)
|