@viraui/react 2026.3.10 → 2026.4.0
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/dist/catalog.json +50 -50
- package/dist/components/dialog/dialog-sheet.js +2 -1
- package/dist/components/separator/separator.d.ts +2 -2
- package/dist/components/separator/separator.js +2 -2
- package/dist/components/surface/surface.css +1 -1
- package/dist/components/surface/surface.js +2 -0
- package/dist/components/textarea/textarea.js +2 -2
- package/dist/components/textfield/textfield.js +2 -2
- package/dist/specs/PROTOCOL.md +48 -0
- package/dist/specs/activity-hints.xml +42 -0
- package/dist/specs/components/accordion/a11y.xml +6 -0
- package/dist/specs/components/accordion/meta.xml +20 -0
- package/dist/specs/components/accordion/patterns.xml +9 -0
- package/dist/specs/components/accordion/props.xml +48 -0
- package/dist/specs/components/accordion/usage.xml +8 -0
- package/dist/specs/components/annotate/a11y.xml +6 -0
- package/dist/specs/components/annotate/meta.xml +19 -0
- package/dist/specs/components/annotate/patterns.xml +7 -0
- package/dist/specs/components/annotate/props.xml +88 -0
- package/dist/specs/components/annotate/usage.xml +10 -0
- package/dist/specs/components/autocomplete/a11y.xml +6 -0
- package/dist/specs/components/autocomplete/meta.xml +22 -0
- package/dist/specs/components/autocomplete/patterns.xml +14 -0
- package/dist/specs/components/autocomplete/props.xml +81 -0
- package/dist/specs/components/autocomplete/usage.xml +11 -0
- package/dist/specs/components/avatar/a11y.xml +5 -0
- package/dist/specs/components/avatar/meta.xml +17 -0
- package/dist/specs/components/avatar/patterns.xml +7 -0
- package/dist/specs/components/avatar/props.xml +38 -0
- package/dist/specs/components/avatar/usage.xml +7 -0
- package/dist/specs/components/avatar-group/a11y.xml +6 -0
- package/dist/specs/components/avatar-group/meta.xml +16 -0
- package/dist/specs/components/avatar-group/patterns.xml +7 -0
- package/dist/specs/components/avatar-group/props.xml +39 -0
- package/dist/specs/components/avatar-group/usage.xml +10 -0
- package/dist/specs/components/badge/a11y.xml +7 -0
- package/dist/specs/components/badge/meta.xml +19 -0
- package/dist/specs/components/badge/patterns.xml +7 -0
- package/dist/specs/components/badge/props.xml +37 -0
- package/dist/specs/components/badge/usage.xml +9 -0
- package/dist/specs/components/beam/a11y.xml +7 -0
- package/dist/specs/components/beam/meta.xml +18 -0
- package/dist/specs/components/beam/patterns.xml +7 -0
- package/dist/specs/components/beam/props.xml +90 -0
- package/dist/specs/components/beam/usage.xml +11 -0
- package/dist/specs/components/bleed/a11y.xml +7 -0
- package/dist/specs/components/bleed/meta.xml +18 -0
- package/dist/specs/components/bleed/patterns.xml +7 -0
- package/dist/specs/components/bleed/props.xml +22 -0
- package/dist/specs/components/bleed/usage.xml +10 -0
- package/dist/specs/components/breakpoints/a11y.xml +5 -0
- package/dist/specs/components/breakpoints/meta.xml +17 -0
- package/dist/specs/components/breakpoints/patterns.xml +9 -0
- package/dist/specs/components/breakpoints/props.xml +20 -0
- package/dist/specs/components/breakpoints/usage.xml +9 -0
- package/dist/specs/components/button/a11y.xml +9 -0
- package/dist/specs/components/button/meta.xml +20 -0
- package/dist/specs/components/button/patterns.xml +11 -0
- package/dist/specs/components/button/props.xml +101 -0
- package/dist/specs/components/button/usage.xml +18 -0
- package/dist/specs/components/checkbox/a11y.xml +6 -0
- package/dist/specs/components/checkbox/meta.xml +21 -0
- package/dist/specs/components/checkbox/patterns.xml +7 -0
- package/dist/specs/components/checkbox/props.xml +48 -0
- package/dist/specs/components/checkbox/usage.xml +10 -0
- package/dist/specs/components/chip/a11y.xml +6 -0
- package/dist/specs/components/chip/meta.xml +19 -0
- package/dist/specs/components/chip/patterns.xml +7 -0
- package/dist/specs/components/chip/props.xml +49 -0
- package/dist/specs/components/chip/usage.xml +11 -0
- package/dist/specs/components/clamp-text/a11y.xml +6 -0
- package/dist/specs/components/clamp-text/meta.xml +17 -0
- package/dist/specs/components/clamp-text/patterns.xml +7 -0
- package/dist/specs/components/clamp-text/props.xml +27 -0
- package/dist/specs/components/clamp-text/usage.xml +8 -0
- package/dist/specs/components/dialog/a11y.xml +7 -0
- package/dist/specs/components/dialog/meta.xml +21 -0
- package/dist/specs/components/dialog/patterns.xml +19 -0
- package/dist/specs/components/dialog/props.xml +49 -0
- package/dist/specs/components/dialog/usage.xml +12 -0
- package/dist/specs/components/elevator/a11y.xml +6 -0
- package/dist/specs/components/elevator/meta.xml +16 -0
- package/dist/specs/components/elevator/patterns.xml +7 -0
- package/dist/specs/components/elevator/props.xml +31 -0
- package/dist/specs/components/elevator/usage.xml +8 -0
- package/dist/specs/components/fieldset/a11y.xml +6 -0
- package/dist/specs/components/fieldset/meta.xml +22 -0
- package/dist/specs/components/fieldset/patterns.xml +7 -0
- package/dist/specs/components/fieldset/props.xml +26 -0
- package/dist/specs/components/fieldset/usage.xml +11 -0
- package/dist/specs/components/fit-text/a11y.xml +6 -0
- package/dist/specs/components/fit-text/meta.xml +18 -0
- package/dist/specs/components/fit-text/patterns.xml +7 -0
- package/dist/specs/components/fit-text/props.xml +19 -0
- package/dist/specs/components/fit-text/usage.xml +9 -0
- package/dist/specs/components/glow/a11y.xml +6 -0
- package/dist/specs/components/glow/meta.xml +19 -0
- package/dist/specs/components/glow/patterns.xml +7 -0
- package/dist/specs/components/glow/props.xml +74 -0
- package/dist/specs/components/glow/usage.xml +12 -0
- package/dist/specs/components/grid/a11y.xml +6 -0
- package/dist/specs/components/grid/meta.xml +18 -0
- package/dist/specs/components/grid/patterns.xml +9 -0
- package/dist/specs/components/grid/props.xml +101 -0
- package/dist/specs/components/grid/usage.xml +10 -0
- package/dist/specs/components/icon-button/a11y.xml +9 -0
- package/dist/specs/components/icon-button/meta.xml +18 -0
- package/dist/specs/components/icon-button/patterns.xml +11 -0
- package/dist/specs/components/icon-button/props.xml +95 -0
- package/dist/specs/components/icon-button/usage.xml +14 -0
- package/dist/specs/components/linear-progress/a11y.xml +6 -0
- package/dist/specs/components/linear-progress/meta.xml +21 -0
- package/dist/specs/components/linear-progress/patterns.xml +7 -0
- package/dist/specs/components/linear-progress/props.xml +31 -0
- package/dist/specs/components/linear-progress/usage.xml +11 -0
- package/dist/specs/components/masonry/a11y.xml +6 -0
- package/dist/specs/components/masonry/meta.xml +18 -0
- package/dist/specs/components/masonry/patterns.xml +9 -0
- package/dist/specs/components/masonry/props.xml +32 -0
- package/dist/specs/components/masonry/usage.xml +9 -0
- package/dist/specs/components/menu/a11y.xml +7 -0
- package/dist/specs/components/menu/meta.xml +25 -0
- package/dist/specs/components/menu/patterns.xml +25 -0
- package/dist/specs/components/menu/props.xml +73 -0
- package/dist/specs/components/menu/usage.xml +15 -0
- package/dist/specs/components/meter/a11y.xml +6 -0
- package/dist/specs/components/meter/meta.xml +19 -0
- package/dist/specs/components/meter/patterns.xml +7 -0
- package/dist/specs/components/meter/props.xml +31 -0
- package/dist/specs/components/meter/usage.xml +10 -0
- package/dist/specs/components/popover/a11y.xml +7 -0
- package/dist/specs/components/popover/meta.xml +22 -0
- package/dist/specs/components/popover/patterns.xml +15 -0
- package/dist/specs/components/popover/props.xml +37 -0
- package/dist/specs/components/popover/usage.xml +12 -0
- package/dist/specs/components/progressive-blur/a11y.xml +6 -0
- package/dist/specs/components/progressive-blur/meta.xml +17 -0
- package/dist/specs/components/progressive-blur/patterns.xml +7 -0
- package/dist/specs/components/progressive-blur/props.xml +28 -0
- package/dist/specs/components/progressive-blur/usage.xml +10 -0
- package/dist/specs/components/radio/a11y.xml +6 -0
- package/dist/specs/components/radio/meta.xml +20 -0
- package/dist/specs/components/radio/patterns.xml +9 -0
- package/dist/specs/components/radio/props.xml +44 -0
- package/dist/specs/components/radio/usage.xml +12 -0
- package/dist/specs/components/select/a11y.xml +6 -0
- package/dist/specs/components/select/meta.xml +21 -0
- package/dist/specs/components/select/patterns.xml +13 -0
- package/dist/specs/components/select/props.xml +83 -0
- package/dist/specs/components/select/usage.xml +14 -0
- package/dist/specs/components/separator/a11y.xml +6 -0
- package/dist/specs/components/separator/meta.xml +18 -0
- package/dist/specs/components/separator/patterns.xml +7 -0
- package/dist/specs/components/separator/props.xml +39 -0
- package/dist/specs/components/separator/usage.xml +8 -0
- package/dist/specs/components/shimmer/a11y.xml +6 -0
- package/dist/specs/components/shimmer/meta.xml +18 -0
- package/dist/specs/components/shimmer/patterns.xml +7 -0
- package/dist/specs/components/shimmer/props.xml +40 -0
- package/dist/specs/components/shimmer/usage.xml +9 -0
- package/dist/specs/components/skeleton/a11y.xml +8 -0
- package/dist/specs/components/skeleton/meta.xml +17 -0
- package/dist/specs/components/skeleton/patterns.xml +8 -0
- package/dist/specs/components/skeleton/props.xml +73 -0
- package/dist/specs/components/skeleton/usage.xml +10 -0
- package/dist/specs/components/slider/a11y.xml +6 -0
- package/dist/specs/components/slider/meta.xml +19 -0
- package/dist/specs/components/slider/patterns.xml +7 -0
- package/dist/specs/components/slider/props.xml +45 -0
- package/dist/specs/components/slider/usage.xml +8 -0
- package/dist/specs/components/spinner/a11y.xml +7 -0
- package/dist/specs/components/spinner/meta.xml +17 -0
- package/dist/specs/components/spinner/patterns.xml +7 -0
- package/dist/specs/components/spinner/props.xml +24 -0
- package/dist/specs/components/spinner/usage.xml +8 -0
- package/dist/specs/components/stack/a11y.xml +6 -0
- package/dist/specs/components/stack/meta.xml +19 -0
- package/dist/specs/components/stack/patterns.xml +7 -0
- package/dist/specs/components/stack/props.xml +94 -0
- package/dist/specs/components/stack/usage.xml +14 -0
- package/dist/specs/components/static-noise/a11y.xml +6 -0
- package/dist/specs/components/static-noise/meta.xml +17 -0
- package/dist/specs/components/static-noise/patterns.xml +7 -0
- package/dist/specs/components/static-noise/props.xml +27 -0
- package/dist/specs/components/static-noise/usage.xml +10 -0
- package/dist/specs/components/surface/a11y.xml +6 -0
- package/dist/specs/components/surface/meta.xml +17 -0
- package/dist/specs/components/surface/patterns.xml +7 -0
- package/dist/specs/components/surface/props.xml +92 -0
- package/dist/specs/components/surface/usage.xml +16 -0
- package/dist/specs/components/switch/a11y.xml +6 -0
- package/dist/specs/components/switch/meta.xml +19 -0
- package/dist/specs/components/switch/patterns.xml +7 -0
- package/dist/specs/components/switch/props.xml +48 -0
- package/dist/specs/components/switch/usage.xml +8 -0
- package/dist/specs/components/tabs/a11y.xml +6 -0
- package/dist/specs/components/tabs/meta.xml +19 -0
- package/dist/specs/components/tabs/patterns.xml +14 -0
- package/dist/specs/components/tabs/props.xml +24 -0
- package/dist/specs/components/tabs/usage.xml +8 -0
- package/dist/specs/components/text/a11y.xml +6 -0
- package/dist/specs/components/text/meta.xml +17 -0
- package/dist/specs/components/text/patterns.xml +7 -0
- package/dist/specs/components/text/props.xml +129 -0
- package/dist/specs/components/text/usage.xml +7 -0
- package/dist/specs/components/textarea/a11y.xml +6 -0
- package/dist/specs/components/textarea/meta.xml +19 -0
- package/dist/specs/components/textarea/patterns.xml +7 -0
- package/dist/specs/components/textarea/props.xml +39 -0
- package/dist/specs/components/textarea/usage.xml +10 -0
- package/dist/specs/components/textfield/a11y.xml +6 -0
- package/dist/specs/components/textfield/meta.xml +21 -0
- package/dist/specs/components/textfield/patterns.xml +7 -0
- package/dist/specs/components/textfield/props.xml +51 -0
- package/dist/specs/components/textfield/usage.xml +9 -0
- package/dist/specs/components/title/a11y.xml +7 -0
- package/dist/specs/components/title/meta.xml +17 -0
- package/dist/specs/components/title/patterns.xml +7 -0
- package/dist/specs/components/title/props.xml +124 -0
- package/dist/specs/components/title/usage.xml +10 -0
- package/dist/specs/components/toast/a11y.xml +7 -0
- package/dist/specs/components/toast/meta.xml +20 -0
- package/dist/specs/components/toast/patterns.xml +15 -0
- package/dist/specs/components/toast/props.xml +42 -0
- package/dist/specs/components/toast/usage.xml +10 -0
- package/dist/specs/components/toggle-button/a11y.xml +6 -0
- package/dist/specs/components/toggle-button/meta.xml +20 -0
- package/dist/specs/components/toggle-button/patterns.xml +7 -0
- package/dist/specs/components/toggle-button/props.xml +61 -0
- package/dist/specs/components/toggle-button/usage.xml +10 -0
- package/dist/specs/components/toggle-group/a11y.xml +6 -0
- package/dist/specs/components/toggle-group/meta.xml +19 -0
- package/dist/specs/components/toggle-group/patterns.xml +9 -0
- package/dist/specs/components/toggle-group/props.xml +15 -0
- package/dist/specs/components/toggle-group/usage.xml +9 -0
- package/dist/specs/components/tooltip/a11y.xml +6 -0
- package/dist/specs/components/tooltip/meta.xml +21 -0
- package/dist/specs/components/tooltip/patterns.xml +12 -0
- package/dist/specs/components/tooltip/props.xml +20 -0
- package/dist/specs/components/tooltip/usage.xml +10 -0
- package/dist/specs/components/typewriter/a11y.xml +7 -0
- package/dist/specs/components/typewriter/meta.xml +18 -0
- package/dist/specs/components/typewriter/patterns.xml +7 -0
- package/dist/specs/components/typewriter/props.xml +43 -0
- package/dist/specs/components/typewriter/usage.xml +11 -0
- package/dist/specs/foundation/attributes.xml +127 -0
- package/dist/specs/foundation/bootstrap.xml +62 -0
- package/dist/specs/foundation/elevation.xml +21 -0
- package/dist/specs/foundation/meta.xml +20 -0
- package/dist/specs/foundation/modules.xml +62 -0
- package/dist/specs/foundation/theme-topics.xml +60 -0
- package/dist/specs/foundation/toggles.xml +25 -0
- package/dist/specs/index.xml +538 -0
- package/dist/specs/patterns/settings-row.xml +19 -0
- package/package.json +12 -11
- package/dist/components/accordion/accordion.guide.json +0 -69
- package/dist/components/annotate/annotate.guide.json +0 -110
- package/dist/components/autocomplete/autocomplete.guide.json +0 -103
- package/dist/components/avatar/avatar.guide.json +0 -53
- package/dist/components/avatar-group/avatar-group.guide.json +0 -56
- package/dist/components/badge/badge.guide.json +0 -59
- package/dist/components/beam/beam.guide.json +0 -123
- package/dist/components/bleed/bleed.guide.json +0 -43
- package/dist/components/breakpoints/breakpoints.guide.json +0 -40
- package/dist/components/button/button-link.guide.json +0 -69
- package/dist/components/button/button.guide.json +0 -78
- package/dist/components/checkbox/checkbox.guide.json +0 -68
- package/dist/components/chip/chip.guide.json +0 -69
- package/dist/components/clamp-text/clamp-text.guide.json +0 -47
- package/dist/components/dialog/dialog.guide.json +0 -72
- package/dist/components/elevator/elevator.guide.json +0 -46
- package/dist/components/fieldset/fieldset.guide.json +0 -43
- package/dist/components/fit-text/fit-text.guide.json +0 -38
- package/dist/components/glow/glow.guide.json +0 -108
- package/dist/components/grid/grid.guide.json +0 -120
- package/dist/components/icon-button/icon-button-link.guide.json +0 -73
- package/dist/components/icon-button/icon-button.guide.json +0 -72
- package/dist/components/linear-progress/linear-progress.guide.json +0 -53
- package/dist/components/masonry/masonry.guide.json +0 -50
- package/dist/components/menu/menu.guide.json +0 -94
- package/dist/components/meter/meter.guide.json +0 -52
- package/dist/components/popover/popover.guide.json +0 -58
- package/dist/components/progressive-blur/progressive-blur.guide.json +0 -50
- package/dist/components/radio/radio.guide.json +0 -65
- package/dist/components/select/select.guide.json +0 -105
- package/dist/components/separator/separator.guide.json +0 -58
- package/dist/components/shimmer/shimmer.guide.json +0 -67
- package/dist/components/skeleton/skeleton.guide.json +0 -98
- package/dist/components/slider/slider.guide.json +0 -64
- package/dist/components/spinner/spinner.guide.json +0 -43
- package/dist/components/stack/stack.guide.json +0 -116
- package/dist/components/static-noise/static-noise.guide.json +0 -44
- package/dist/components/surface/surface.guide.json +0 -114
- package/dist/components/switch/switch.guide.json +0 -71
- package/dist/components/tabs/tabs.guide.json +0 -43
- package/dist/components/text/text.guide.json +0 -152
- package/dist/components/textarea/textarea.guide.json +0 -55
- package/dist/components/textfield/textfield.guide.json +0 -70
- package/dist/components/title/title.guide.json +0 -149
- package/dist/components/toast/toast.guide.json +0 -60
- package/dist/components/toggle-button/toggle-button.guide.json +0 -81
- package/dist/components/toggle-group/toggle-group.guide.json +0 -27
- package/dist/components/tooltip/tooltip.guide.json +0 -40
- package/dist/components/typewriter/typewriter.guide.json +0 -65
- package/dist/consumption.json +0 -84
- package/dist/preflight-surface.json +0 -233
- package/dist/theme-surface.json +0 -71
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Radio",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/radio#api-reference",
|
|
4
|
-
"structure": "<RadioGroup>\n <Radio value=\"…\" label=\"…\" />\n</RadioGroup>",
|
|
5
|
-
"summary": "Mutually exclusive choice within a RadioGroup, with optional per-option label and helper text.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Single selection from a small set of related options inside RadioGroup",
|
|
8
|
-
"RadioGroup alone inside Field.Root when each Radio has its own label and no shared group legend is needed",
|
|
9
|
-
"Field.Root > Fieldset render={<RadioGroup<Value> />} when the group needs a shared legend, description, or error",
|
|
10
|
-
"Card-style or custom layouts where each option is wrapped in Surface or consumer markup",
|
|
11
|
-
"Typed option unions with RadioGroup<'ssd' | 'hdd'> for value, defaultValue, and onValueChange safety"
|
|
12
|
-
],
|
|
13
|
-
"whenNotToUse": [
|
|
14
|
-
"Independent boolean toggles (use Checkbox or Switch)",
|
|
15
|
-
"Multi-select sets (use CheckboxGroup)",
|
|
16
|
-
"Options rendered outside a RadioGroup wrapper",
|
|
17
|
-
"Assuming Fieldset is mandatory for every RadioGroup — add Fieldset only for shared legend or group copy",
|
|
18
|
-
"Group legend, description, or validation on RadioGroup props — use Field.Root and Fieldset instead"
|
|
19
|
-
],
|
|
20
|
-
"accessibility": [
|
|
21
|
-
"Wrap options in RadioGroup so the group exposes a shared name",
|
|
22
|
-
"Provide visible label or aria-label on each option so radios have accessible names",
|
|
23
|
-
"Surface group invalid state and error copy through Field.Root and Fieldset, not individual Radio options"
|
|
24
|
-
],
|
|
25
|
-
"antiPatterns": [
|
|
26
|
-
"Rendering Radio outside RadioGroup",
|
|
27
|
-
"Putting invalid or error on a single Radio instead of the enclosing Field.Root and Fieldset",
|
|
28
|
-
"Omitting the RadioGroup generic when option value props form a restricted union",
|
|
29
|
-
"Importing @viraui/react/radio/radio.css or other component CSS subpaths in consumer bootstrap"
|
|
30
|
-
],
|
|
31
|
-
"related": ["Fieldset", "Checkbox", "Surface", "Stack"],
|
|
32
|
-
"properties": {
|
|
33
|
-
"react": {
|
|
34
|
-
"description": {
|
|
35
|
-
"description": "Helper copy rendered with `Field.Description` and `Text` for this option."
|
|
36
|
-
},
|
|
37
|
-
"hPadding": {
|
|
38
|
-
"description": "Sets inline padding using one token for both sides or a `[start, end]` tuple."
|
|
39
|
-
},
|
|
40
|
-
"label": {
|
|
41
|
-
"description": "Visible label rendered with shared internal `FieldLabel`."
|
|
42
|
-
},
|
|
43
|
-
"size": {
|
|
44
|
-
"description": "Controls the visual radio size."
|
|
45
|
-
},
|
|
46
|
-
"vPadding": {
|
|
47
|
-
"description": "Sets block padding using one token for both sides or a `[start, end]` tuple."
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"css": {
|
|
51
|
-
"background": {
|
|
52
|
-
"description": "Radio control background color."
|
|
53
|
-
},
|
|
54
|
-
"border-color": {
|
|
55
|
-
"description": "Radio control border color; resting default is transparent (same as Checkbox); checked, invalid, and disabled states override."
|
|
56
|
-
},
|
|
57
|
-
"indicator-color": {
|
|
58
|
-
"description": "Radio selected-disk indicator color."
|
|
59
|
-
},
|
|
60
|
-
"size": {
|
|
61
|
-
"description": "Radio control size; size presets adjust footprint."
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Select",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/select#api-reference",
|
|
4
|
-
"structure": "<Select>\n <Select.Option value=\"…\">…</Select.Option>\n <Select.Group label=\"…\">\n <Select.Option value=\"…\">…</Select.Option>\n </Select.Group>\n <Select.Separator />\n</Select>",
|
|
5
|
-
"summary": "Field-wrapped single-select dropdown with grouped options and field copy.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Choose one value from a predefined list with label and helper copy",
|
|
8
|
-
"Grouped or separated option lists",
|
|
9
|
-
"Rich option rows with a leading decorative addon and multi-line label content",
|
|
10
|
-
"Trigger chrome aligned with Textfield control shell",
|
|
11
|
-
"Select fields inside Fieldset when they share a section legend with other inputs",
|
|
12
|
-
"Custom portal host (iframe preview, shadow root, or app overlay root) via `container` on the portal-owning public part"
|
|
13
|
-
],
|
|
14
|
-
"whenNotToUse": [
|
|
15
|
-
"Multiple selection",
|
|
16
|
-
"Free-form filterable suggestions — use Autocomplete",
|
|
17
|
-
"Combobox selection state, or custom anchor positioning",
|
|
18
|
-
"Wrapping a lone Select in Fieldset when its own label is sufficient"
|
|
19
|
-
],
|
|
20
|
-
"accessibility": [
|
|
21
|
-
"Provide label or aria-label on the trigger so the field has an accessible name",
|
|
22
|
-
"Wire description and error copy through the field pattern so assistive tech gets helper text",
|
|
23
|
-
"Keep list options keyboard reachable; do not trap focus outside the popup pattern"
|
|
24
|
-
],
|
|
25
|
-
"antiPatterns": [
|
|
26
|
-
"Expecting multi-select or combobox behavior",
|
|
27
|
-
"Leaving the trigger without label or aria-label",
|
|
28
|
-
"Never set the size prop (if present) of Buttons, IconButtons or other interactive elements passed as addon other than small",
|
|
29
|
-
"Using the Select component as a combobox, use Autocomplete instead.",
|
|
30
|
-
"Leaving alignListWithTrigger enabled when options have a leading addon"
|
|
31
|
-
],
|
|
32
|
-
"related": ["Autocomplete", "Fieldset", "Textfield", "Stack", "Surface", "Icon"],
|
|
33
|
-
"properties": {
|
|
34
|
-
"react": {
|
|
35
|
-
"addon": {
|
|
36
|
-
"description": "Trigger addon rendered inside `Select.Icon`. Pass any React node; use a named icon from `@viraui/icons/react` for content icons."
|
|
37
|
-
},
|
|
38
|
-
"alignListWithTrigger": {
|
|
39
|
-
"description": "When `true`, aligns the list popup width with the trigger via Base UI `alignItemWithTrigger`. Prefer `false` when options use a leading `addon`."
|
|
40
|
-
},
|
|
41
|
-
"container": {
|
|
42
|
-
"description": "Portal mount node (iframe body, shadow root, or app overlay root). Omit for Base UI default (`document.body` from the module window — iframe hosts must pass the iframe document body explicitly)."
|
|
43
|
-
},
|
|
44
|
-
"description": {
|
|
45
|
-
"description": "Helper copy rendered with `Field.Description` and `Text` while the field is valid."
|
|
46
|
-
},
|
|
47
|
-
"error": {
|
|
48
|
-
"description": "Error copy rendered with `Field.Error` and `Text` in the same slot as `description`. Replaces description while the field is invalid and dirty."
|
|
49
|
-
},
|
|
50
|
-
"Group.label": {
|
|
51
|
-
"description": "Accessible group label rendered with `Select.GroupLabel`."
|
|
52
|
-
},
|
|
53
|
-
"label": {
|
|
54
|
-
"description": "Visible label rendered with shared internal `FieldLabel`."
|
|
55
|
-
},
|
|
56
|
-
"modal": {
|
|
57
|
-
"description": "When `true`, open select locks page scroll and blocks outside pointer interaction (Base UI modal). Vira defaults to non-modal so the page stays scrollable."
|
|
58
|
-
},
|
|
59
|
-
"Option.addon": {
|
|
60
|
-
"description": "Decorative leading node rendered before the option label."
|
|
61
|
-
},
|
|
62
|
-
"Option.addonAlign": {
|
|
63
|
-
"description": "Vertical alignment of the addon relative to the option label row."
|
|
64
|
-
},
|
|
65
|
-
"Option.indicator": {
|
|
66
|
-
"description": "Custom indicator node rendered when the option is selected."
|
|
67
|
-
},
|
|
68
|
-
"placeholder": {
|
|
69
|
-
"description": "Placeholder text shown in the trigger when no value is selected."
|
|
70
|
-
},
|
|
71
|
-
"ref": {
|
|
72
|
-
"description": "Ref forwarded to the select trigger button."
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"css": {
|
|
76
|
-
"control-group-background": {
|
|
77
|
-
"description": "Trigger background fill."
|
|
78
|
-
},
|
|
79
|
-
"control-group-border-color": {
|
|
80
|
-
"description": "Trigger border color; invalid state overrides."
|
|
81
|
-
},
|
|
82
|
-
"control-group-border-radius": {
|
|
83
|
-
"description": "Trigger corner radius."
|
|
84
|
-
},
|
|
85
|
-
"control-group-color": {
|
|
86
|
-
"description": "Trigger text and icon color."
|
|
87
|
-
},
|
|
88
|
-
"input-height": {
|
|
89
|
-
"description": "Select trigger block size."
|
|
90
|
-
},
|
|
91
|
-
"list-border-radius": {
|
|
92
|
-
"description": "list border radius custom property on the component root."
|
|
93
|
-
},
|
|
94
|
-
"list-padding": {
|
|
95
|
-
"description": "list padding custom property on the component root."
|
|
96
|
-
},
|
|
97
|
-
"trigger-padding-inline-end": {
|
|
98
|
-
"description": "Trigger inline-end padding."
|
|
99
|
-
},
|
|
100
|
-
"trigger-padding-inline-start": {
|
|
101
|
-
"description": "Trigger inline-start padding."
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Separator",
|
|
3
|
-
"structure": "<Separator />",
|
|
4
|
-
"summary": "Thematic or content divider with horizontal or vertical orientation, token padding, and preset line thickness.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Dividing sections within a page or panel",
|
|
7
|
-
"Vertical dividers in toolbars, menus, or button groups",
|
|
8
|
-
"Separating list items or stacked content blocks"
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": [
|
|
11
|
-
"Select dropdown option dividers — use Select.Separator",
|
|
12
|
-
"Surface borders or card outlines — use Surface border props"
|
|
13
|
-
],
|
|
14
|
-
"accessibility": [
|
|
15
|
-
"Standalone line is a native hr (implicit separator); orientation is visual via data-separator-orientation and Stack direction",
|
|
16
|
-
"Menu.Separator / Select.Separator own a11y through Base UI (Menu: role separator + aria-orientation; Select listbox: role presentation)",
|
|
17
|
-
"Use render to swap the line root element when needed"
|
|
18
|
-
],
|
|
19
|
-
"antiPatterns": [
|
|
20
|
-
"Using Select.Separator for general layout dividers",
|
|
21
|
-
"Replacing Surface borders with Separator for container chrome"
|
|
22
|
-
],
|
|
23
|
-
"related": ["Stack", "Surface", "Select"],
|
|
24
|
-
"properties": {
|
|
25
|
-
"react": {
|
|
26
|
-
"borderStyle": {
|
|
27
|
-
"description": "Sets the separator line border style through `--vui-separator-border-style`.",
|
|
28
|
-
"refCss": "border-style"
|
|
29
|
-
},
|
|
30
|
-
"hPadding": {
|
|
31
|
-
"description": "Sets inline padding on the Stack wrapper using one token for both sides or a `[start, end]` tuple."
|
|
32
|
-
},
|
|
33
|
-
"orientation": {
|
|
34
|
-
"description": "Sets the separator line direction."
|
|
35
|
-
},
|
|
36
|
-
"ref": {
|
|
37
|
-
"description": "Ref forwarded to the rendered line root element."
|
|
38
|
-
},
|
|
39
|
-
"render": {
|
|
40
|
-
"description": "Replaces the default `hr` line root using Base UI render semantics."
|
|
41
|
-
},
|
|
42
|
-
"size": {
|
|
43
|
-
"description": "Sets the line thickness preset."
|
|
44
|
-
},
|
|
45
|
-
"vPadding": {
|
|
46
|
-
"description": "Sets block padding on the Stack wrapper using one token for both sides or a `[start, end]` tuple."
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"css": {
|
|
50
|
-
"border-style": {
|
|
51
|
-
"description": "Separator line border style."
|
|
52
|
-
},
|
|
53
|
-
"size": {
|
|
54
|
-
"description": "Separator line thickness."
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Shimmer",
|
|
3
|
-
"structure": "<Shimmer>…</Shimmer>",
|
|
4
|
-
"summary": "Decorative inline text shimmer that inherits typography and color from a parent text primitive.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Loading placeholder copy inside Text or Title",
|
|
7
|
-
"Animated text shimmer while awaiting async content",
|
|
8
|
-
"Muted loading labels that keep the final text dimensions"
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": [
|
|
11
|
-
"Block or fixed-dimension placeholders without text content",
|
|
12
|
-
"Standalone accessible loading status without a surrounding aria-busy region",
|
|
13
|
-
"Replacing Skeleton for non-text layout placeholders"
|
|
14
|
-
],
|
|
15
|
-
"accessibility": [
|
|
16
|
-
"Shimmer renders real text content — do not mark it aria-hidden",
|
|
17
|
-
"Announce loading on the surrounding region with aria-busy or live text",
|
|
18
|
-
"Reduced motion disables the sweep and restores normal text rendering"
|
|
19
|
-
],
|
|
20
|
-
"antiPatterns": [
|
|
21
|
-
"Putting aria-busy on Shimmer instead of the surrounding loading region",
|
|
22
|
-
"Using Shimmer without children text content",
|
|
23
|
-
"Using Shimmer for block placeholders better served by Skeleton"
|
|
24
|
-
],
|
|
25
|
-
"related": ["Text", "Title", "Skeleton"],
|
|
26
|
-
"properties": {
|
|
27
|
-
"react": {
|
|
28
|
-
"angle": {
|
|
29
|
-
"description": "Sets the shimmer gradient angle offset using any valid CSS angle string.",
|
|
30
|
-
"refCss": "angle"
|
|
31
|
-
},
|
|
32
|
-
"duration": {
|
|
33
|
-
"description": "Sets the shimmer sweep duration using any valid CSS time string.",
|
|
34
|
-
"refCss": "duration"
|
|
35
|
-
},
|
|
36
|
-
"highlightColor": {
|
|
37
|
-
"description": "Overrides the shimmer highlight color when relative base lightness tuning is not used.",
|
|
38
|
-
"refCss": "highlight"
|
|
39
|
-
},
|
|
40
|
-
"ref": {
|
|
41
|
-
"description": "Ref forwarded to the rendered shimmer root element."
|
|
42
|
-
},
|
|
43
|
-
"spread": {
|
|
44
|
-
"description": "Sets the shimmer highlight spread using any valid CSS length string.",
|
|
45
|
-
"refCss": "spread"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"css": {
|
|
49
|
-
"angle": {
|
|
50
|
-
"description": "Shimmer gradient angle offset.",
|
|
51
|
-
"refReact": "angle"
|
|
52
|
-
},
|
|
53
|
-
"duration": {
|
|
54
|
-
"description": "Shimmer animation duration.",
|
|
55
|
-
"refReact": "duration"
|
|
56
|
-
},
|
|
57
|
-
"highlight": {
|
|
58
|
-
"description": "Shimmer highlight color.",
|
|
59
|
-
"refReact": "highlightColor"
|
|
60
|
-
},
|
|
61
|
-
"spread": {
|
|
62
|
-
"description": "Shimmer highlight spread width.",
|
|
63
|
-
"refReact": "spread"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Skeleton",
|
|
3
|
-
"structure": "<Skeleton />\n<Skeleton.Overlay>…</Skeleton.Overlay>",
|
|
4
|
-
"summary": "Decorative opacity pulse block sized by props, or Overlay sized by hidden child content.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Fixed-dimension pulse blocks while content loads",
|
|
7
|
-
"Avatar or media placeholders with explicit width and height",
|
|
8
|
-
"Skeleton.Overlay when placeholder layout should match incoming typography without layout shift",
|
|
9
|
-
"View-transition wipe reveal for `Skeleton.Overlay`, with `viewTransitionName: 'skeleton-overlay'` on the wrapper around skeleton+loaded content (prefer CSS class, not inline style)"
|
|
10
|
-
],
|
|
11
|
-
"whenNotToUse": [
|
|
12
|
-
"Inline text shimmer effects (use Shimmer)",
|
|
13
|
-
"Standalone accessible loading status without a surrounding aria-busy region"
|
|
14
|
-
],
|
|
15
|
-
"accessibility": [
|
|
16
|
-
"Skeleton and Skeleton.Overlay are decorative (aria-hidden) — announce loading on the surrounding region with aria-busy or live text",
|
|
17
|
-
"Overlay children stay aria-hidden; the parent loading region owns busy state",
|
|
18
|
-
"Do not put aria-busy on Skeleton itself",
|
|
19
|
-
"Replace skeleton with real content as soon as data is ready",
|
|
20
|
-
"prefers-reduced-motion disables the pulse animation and keeps a static surface"
|
|
21
|
-
],
|
|
22
|
-
"antiPatterns": [
|
|
23
|
-
"Using Skeleton.Overlay without real content structure to size against",
|
|
24
|
-
"Putting aria-busy on Skeleton instead of the surrounding loading region",
|
|
25
|
-
"Expecting view-transition wipe without wrapper `viewTransitionName: 'skeleton-overlay'` (prefer CSS class, not inline style)"
|
|
26
|
-
],
|
|
27
|
-
"related": ["Avatar", "Shimmer"],
|
|
28
|
-
"properties": {
|
|
29
|
-
"react": {
|
|
30
|
-
"animate": {
|
|
31
|
-
"description": "Enables the opacity pulse animation."
|
|
32
|
-
},
|
|
33
|
-
"radius": {
|
|
34
|
-
"description": "Sets the corner radius from the Vira radius token scale.",
|
|
35
|
-
"refCss": "border-radius"
|
|
36
|
-
},
|
|
37
|
-
"duration": {
|
|
38
|
-
"description": "Sets the pulse duration from the Vira duration token scale.",
|
|
39
|
-
"refCss": "duration"
|
|
40
|
-
},
|
|
41
|
-
"height": {
|
|
42
|
-
"description": "Sets the skeleton block size using any valid CSS size string."
|
|
43
|
-
},
|
|
44
|
-
"minHeight": {
|
|
45
|
-
"description": "Sets the skeleton minimum block size using any valid CSS size string."
|
|
46
|
-
},
|
|
47
|
-
"minWidth": {
|
|
48
|
-
"description": "Sets the skeleton minimum inline size using any valid CSS size string."
|
|
49
|
-
},
|
|
50
|
-
"Overlay.animate": {
|
|
51
|
-
"description": "Enables the opacity pulse animation on the overlay root."
|
|
52
|
-
},
|
|
53
|
-
"Overlay.radius": {
|
|
54
|
-
"description": "Sets the overlay corner radius from the Vira radius token scale.",
|
|
55
|
-
"refCss": "border-radius"
|
|
56
|
-
},
|
|
57
|
-
"Overlay.children": {
|
|
58
|
-
"description": "Content whose layout and dimensions define the overlay bounding box."
|
|
59
|
-
},
|
|
60
|
-
"Overlay.duration": {
|
|
61
|
-
"description": "Sets the pulse duration from the Vira duration token scale.",
|
|
62
|
-
"refCss": "duration"
|
|
63
|
-
},
|
|
64
|
-
"Overlay.ref": {
|
|
65
|
-
"description": "Ref forwarded to the rendered overlay root element."
|
|
66
|
-
},
|
|
67
|
-
"ref": {
|
|
68
|
-
"description": "Ref forwarded to the rendered skeleton root element."
|
|
69
|
-
},
|
|
70
|
-
"width": {
|
|
71
|
-
"description": "Sets the skeleton inline size using any valid CSS size string."
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"css": {
|
|
75
|
-
"background": {
|
|
76
|
-
"description": "Skeleton placeholder background color."
|
|
77
|
-
},
|
|
78
|
-
"block-size": {
|
|
79
|
-
"description": "Skeleton block size."
|
|
80
|
-
},
|
|
81
|
-
"border-radius": {
|
|
82
|
-
"description": "Skeleton corner radius."
|
|
83
|
-
},
|
|
84
|
-
"duration": {
|
|
85
|
-
"description": "Pulse duration."
|
|
86
|
-
},
|
|
87
|
-
"inline-size": {
|
|
88
|
-
"description": "Skeleton inline size."
|
|
89
|
-
},
|
|
90
|
-
"min-block-size": {
|
|
91
|
-
"description": "Skeleton minimum block size."
|
|
92
|
-
},
|
|
93
|
-
"min-inline-size": {
|
|
94
|
-
"description": "Skeleton minimum inline size."
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Slider",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/slider#api-reference",
|
|
4
|
-
"structure": "<Slider />",
|
|
5
|
-
"summary": "Field-wrapped range input supporting single-thumb or two-thumb range selection.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Numeric value selection on a horizontal or vertical axis",
|
|
8
|
-
"Range selection with two thumbs",
|
|
9
|
-
"Field label, description, and error copy like Textfield"
|
|
10
|
-
],
|
|
11
|
-
"whenNotToUse": [
|
|
12
|
-
"Fixed pixel track lengths — Slider fills its container",
|
|
13
|
-
"Custom size or variant props — single medium treatment"
|
|
14
|
-
],
|
|
15
|
-
"accessibility": [
|
|
16
|
-
"Provide label or aria-label; when label is omitted, name thumbs with thumbLabel",
|
|
17
|
-
"Range sliders need distinct accessible names for each thumb",
|
|
18
|
-
"Keep keyboard adjustment and value feedback available through native slider semantics"
|
|
19
|
-
],
|
|
20
|
-
"antiPatterns": [
|
|
21
|
-
"Wrapping Slider.Control and Slider.Value in extra layout inside Slider.Root",
|
|
22
|
-
"Overriding Slider.Indicator position in CSS"
|
|
23
|
-
],
|
|
24
|
-
"related": ["Textfield", "Stack", "Text"],
|
|
25
|
-
"properties": {
|
|
26
|
-
"react": {
|
|
27
|
-
"description": {
|
|
28
|
-
"description": "Helper copy rendered with `Field.Description` and `Text` while the field is valid."
|
|
29
|
-
},
|
|
30
|
-
"error": {
|
|
31
|
-
"description": "Error copy rendered with `Field.Error` and `Text` in the same slot as `description`."
|
|
32
|
-
},
|
|
33
|
-
"label": {
|
|
34
|
-
"description": "Visible label rendered with shared internal `FieldLabel`."
|
|
35
|
-
},
|
|
36
|
-
"required": {
|
|
37
|
-
"description": "Marks the slider as required and shows a required indicator on the label."
|
|
38
|
-
},
|
|
39
|
-
"renderValue": {
|
|
40
|
-
"description": "Shows the current value beside the label. Pass `true` for Base UI default formatting inside styled `Text`, or a function matching `Slider.Value` `children` to own the value slot (no `Text`)."
|
|
41
|
-
},
|
|
42
|
-
"thumbAriaLabel": {
|
|
43
|
-
"description": "Accessible name for the thumb when `label` is omitted. Pass a string to name the first thumb (single-thumb slider, or the minimum thumb on a range). Pass a two-element tuple to name each range thumb in order; on a single-thumb slider only the first tuple value is applied."
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"css": {
|
|
47
|
-
"progress-background": {
|
|
48
|
-
"description": "Slider filled progress color."
|
|
49
|
-
},
|
|
50
|
-
"thumb-background": {
|
|
51
|
-
"description": "Slider thumb fill color."
|
|
52
|
-
},
|
|
53
|
-
"thumb-size": {
|
|
54
|
-
"description": "Slider thumb size."
|
|
55
|
-
},
|
|
56
|
-
"track-background": {
|
|
57
|
-
"description": "Slider track background color."
|
|
58
|
-
},
|
|
59
|
-
"track-size": {
|
|
60
|
-
"description": "Slider track thickness."
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Spinner",
|
|
3
|
-
"structure": "<Spinner aria-hidden />",
|
|
4
|
-
"summary": "Decorative SVG pulsing loading indicator used inside interactive components.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Inline loading overlay inside Button or IconButton",
|
|
7
|
-
"Decorative in-progress indicator explicitly hidden from assistive technology",
|
|
8
|
-
"Loading feedback where the parent exposes the accessible status"
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": [
|
|
11
|
-
"Standalone accessible loading status without explicit labeling on a parent",
|
|
12
|
-
"Page-level loading when a labeled region is not provided"
|
|
13
|
-
],
|
|
14
|
-
"accessibility": [
|
|
15
|
-
"Set aria-hidden on decorative Spinner instances; the component does not hide itself by default",
|
|
16
|
-
"Parent control or region must expose loading with aria-busy or visible status text",
|
|
17
|
-
"Do not use Spinner alone as the only page-level loading announcement",
|
|
18
|
-
"Keep the control label stable while loading overlays appear"
|
|
19
|
-
],
|
|
20
|
-
"antiPatterns": [
|
|
21
|
-
"Using Spinner alone as the only loading announcement for a page",
|
|
22
|
-
"Embedding animation rules outside the component stylesheet"
|
|
23
|
-
],
|
|
24
|
-
"related": ["Button", "IconButton"],
|
|
25
|
-
"properties": {
|
|
26
|
-
"react": {
|
|
27
|
-
"color": {
|
|
28
|
-
"description": "Overrides the spinner fill color."
|
|
29
|
-
},
|
|
30
|
-
"size": {
|
|
31
|
-
"description": "Sets the rendered spinner size."
|
|
32
|
-
},
|
|
33
|
-
"variant": {
|
|
34
|
-
"description": "Visual animation style."
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"css": {
|
|
38
|
-
"size": {
|
|
39
|
-
"description": "Spinner glyph size on the root."
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Stack",
|
|
3
|
-
"structure": "<Stack>…</Stack>",
|
|
4
|
-
"summary": "Flex layout primitive for arranging children with token spacing, alignment, and padding; optionally enables a named CSS container query context (`stack`) via `enableContainer`.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Column or row layouts with token gap and alignment",
|
|
7
|
-
"Composing screens and component internals without custom flex CSS",
|
|
8
|
-
"Custom native root through render while keeping data-stack hooks",
|
|
9
|
-
"Style descendants with `@container stack` queries when layout, gap, or typography should respond to the Stack's own inline-size instead of the viewport (set `enableContainer` on the Stack you're querying)",
|
|
10
|
-
"Centered max-width shells: parent `hAlign=\"center\"` + child `fullWidth` + `maxWidth`"
|
|
11
|
-
],
|
|
12
|
-
"whenNotToUse": [
|
|
13
|
-
"Cases where a single component already owns required flex chrome",
|
|
14
|
-
"Expecting direct children to grow on the main axis without setting `expandChildren`",
|
|
15
|
-
"Expecting this stack to fill parent inline size under non-stretch alignment without `fullWidth` (or an explicit `inlineSize`)",
|
|
16
|
-
"Using `enableContainer` inside complex masonry-like layouts when you don't need container queries (inline-size containment can change nested layout)"
|
|
17
|
-
],
|
|
18
|
-
"accessibility": [
|
|
19
|
-
"Stack is presentational — choose render roots that preserve correct semantics (button, list, heading)",
|
|
20
|
-
"Keep reading order aligned with visual order when using direction and wrap",
|
|
21
|
-
"Do not use Stack alone to imply grouping; use landmarks or headings where needed"
|
|
22
|
-
],
|
|
23
|
-
"antiPatterns": [
|
|
24
|
-
"Assuming Stack expands direct children by default — pass `expandChildren` when children should grow along the flex main axis",
|
|
25
|
-
"Using `expandChildren` to fill parent width under `hAlign=\"center\"` — that is `fullWidth` on the child stack (self `inline-size`), not child flex-grow",
|
|
26
|
-
"Putting `data-grow=\"false\"` on an ancestor to control nested expandChildren — set it on the child that should not grow",
|
|
27
|
-
"Re-declaring primitive flex container rules in app CSS when Stack can own the layout",
|
|
28
|
-
"Using viewport media queries when @container stack queries against the rendered Stack inline-size would match the design intent",
|
|
29
|
-
"Combining `fullWidth` with `inline` — prefer block flex when the root must fill parent inline size"
|
|
30
|
-
],
|
|
31
|
-
"related": ["Surface", "Text", "Button"],
|
|
32
|
-
"properties": {
|
|
33
|
-
"react": {
|
|
34
|
-
"columnGap": {
|
|
35
|
-
"description": "Sets the gap between flex columns using the Vira space token scale."
|
|
36
|
-
},
|
|
37
|
-
"enableContainer": {
|
|
38
|
-
"description": "Opt-in named CSS container query context for this Stack (enables `container: stack / inline-size` on the root via `data-stack-container`). Required for `@container stack (min-width: ...)` rules to react to this Stack inline-size. Warning: inline-size containment can affect nested layout (e.g. cards inside Masonry). Use only when you need container queries against this specific Stack."
|
|
39
|
-
},
|
|
40
|
-
"direction": {
|
|
41
|
-
"description": "Renders children across rows or columns using the chosen flex direction."
|
|
42
|
-
},
|
|
43
|
-
"expandChildren": {
|
|
44
|
-
"description": "Makes direct children grow along the flex main axis (`flex-grow`). Default `false`. Orthogonal to `fullWidth` (children grow vs this root's inline size). A child opts out with its own `data-grow=\"false\"`; ancestor `data-grow` does not inherit into nested stacks."
|
|
45
|
-
},
|
|
46
|
-
"fullWidth": {
|
|
47
|
-
"description": "Sets `inline-size: 100%` on the stack root so it fills the parent's inline size. Default `false`. Use with `maxWidth` under a parent `hAlign=\"center\"` for a fluid capped centered shell. Does not grow children — use `expandChildren` for that."
|
|
48
|
-
},
|
|
49
|
-
"hAlign": {
|
|
50
|
-
"description": "Aligns content on the horizontal axis from the consumer point of view."
|
|
51
|
-
},
|
|
52
|
-
"hPadding": {
|
|
53
|
-
"description": "Sets inline padding using one token for both sides or a `[start, end]` tuple."
|
|
54
|
-
},
|
|
55
|
-
"inline": {
|
|
56
|
-
"description": "Displays the stack as `inline-flex` instead of `flex`."
|
|
57
|
-
},
|
|
58
|
-
"maxWidth": {
|
|
59
|
-
"description": "Applies a maximum width value to the stack root."
|
|
60
|
-
},
|
|
61
|
-
"minWidth": {
|
|
62
|
-
"description": "Applies a minimum width value to the stack root."
|
|
63
|
-
},
|
|
64
|
-
"ref": {
|
|
65
|
-
"description": "Ref forwarded to the rendered stack root element."
|
|
66
|
-
},
|
|
67
|
-
"render": {
|
|
68
|
-
"description": "Replaces the default `div` root using Base UI render semantics."
|
|
69
|
-
},
|
|
70
|
-
"rowGap": {
|
|
71
|
-
"description": "Sets the gap between flex rows using the Vira space token scale."
|
|
72
|
-
},
|
|
73
|
-
"vAlign": {
|
|
74
|
-
"description": "Aligns content on the vertical axis from the consumer point of view."
|
|
75
|
-
},
|
|
76
|
-
"vPadding": {
|
|
77
|
-
"description": "Sets block padding using one token for both sides or a `[start, end]` tuple."
|
|
78
|
-
},
|
|
79
|
-
"wrap": {
|
|
80
|
-
"description": "Allows direct children to wrap onto additional lines when space is constrained."
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"css": {
|
|
84
|
-
"column-gap": {
|
|
85
|
-
"description": "Flex column gap on the root."
|
|
86
|
-
},
|
|
87
|
-
"h-align": {
|
|
88
|
-
"description": "Logical horizontal flex alignment hook."
|
|
89
|
-
},
|
|
90
|
-
"max-width": {
|
|
91
|
-
"description": "Max inline size of the stack root."
|
|
92
|
-
},
|
|
93
|
-
"min-width": {
|
|
94
|
-
"description": "Min inline size of the stack root."
|
|
95
|
-
},
|
|
96
|
-
"padding-block-end": {
|
|
97
|
-
"description": "Block-end padding when padding is enabled."
|
|
98
|
-
},
|
|
99
|
-
"padding-block-start": {
|
|
100
|
-
"description": "Block-start padding when padding is enabled."
|
|
101
|
-
},
|
|
102
|
-
"padding-inline-end": {
|
|
103
|
-
"description": "Inline-end padding when padding is enabled."
|
|
104
|
-
},
|
|
105
|
-
"padding-inline-start": {
|
|
106
|
-
"description": "Inline-start padding when padding is enabled."
|
|
107
|
-
},
|
|
108
|
-
"row-gap": {
|
|
109
|
-
"description": "Flex row gap on the root."
|
|
110
|
-
},
|
|
111
|
-
"v-align": {
|
|
112
|
-
"description": "Logical vertical flex alignment hook."
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "StaticNoise",
|
|
3
|
-
"structure": "<StaticNoise />",
|
|
4
|
-
"summary": "Decorative SVG turbulence noise overlay for textured surfaces and hero sections. Memory-heavy — use sparingly (rarely).",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Subtle grain or texture overlay on cards, panels, or hero sections",
|
|
7
|
-
"Glass or vibrant surfaces that need visual depth without extra content",
|
|
8
|
-
"Decorative atmosphere where the parent owns semantics and layout positioning"
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": [
|
|
11
|
-
"Default decoration on many surfaces — memory cost is high; reserve for rare focal moments",
|
|
12
|
-
"Standalone loading or status feedback without a labeled parent region",
|
|
13
|
-
"Critical readable content where contrast has not been verified",
|
|
14
|
-
"Large numbers of simultaneous full-viewport overlays on the same page"
|
|
15
|
-
],
|
|
16
|
-
"accessibility": [
|
|
17
|
-
"StaticNoise is decorative — the root hardcodes `aria-hidden=\"true\"` (not overridable via props)",
|
|
18
|
-
"Parent surface or region must expose any meaningful label or busy state",
|
|
19
|
-
"Consumer owns position, inset, z-index, and sizing for the overlay placement"
|
|
20
|
-
],
|
|
21
|
-
"antiPatterns": [
|
|
22
|
-
"Treating StaticNoise as cheap wallpaper — it is memory-heavy; prefer few instances",
|
|
23
|
-
"Stacking many full-viewport StaticNoise instances on one screen",
|
|
24
|
-
"Using StaticNoise as the only loading announcement for a page",
|
|
25
|
-
"Embedding layout positioning rules inside the component stylesheet"
|
|
26
|
-
],
|
|
27
|
-
"related": ["Surface", "Skeleton"],
|
|
28
|
-
"properties": {
|
|
29
|
-
"react": {
|
|
30
|
-
"animate": {
|
|
31
|
-
"description": "Animates the internal turbulence filter by cycling `feTurbulence` seed values."
|
|
32
|
-
},
|
|
33
|
-
"baseFrequency": {
|
|
34
|
-
"description": "Sets the SVG turbulence `baseFrequency` for the internal noise filter."
|
|
35
|
-
},
|
|
36
|
-
"mixBlendMode": {
|
|
37
|
-
"description": "Sets the rendered overlay mix blend mode."
|
|
38
|
-
},
|
|
39
|
-
"opacity": {
|
|
40
|
-
"description": "Sets the rendered overlay opacity."
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|