@viraui/react 2026.3.11 → 2026.4.1
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/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 -115
- 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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="skeleton">
|
|
3
|
+
<do>Fixed-dimension pulse blocks while content loads</do>
|
|
4
|
+
<do>Avatar or media placeholders with explicit width and height</do>
|
|
5
|
+
<do>Skeleton.Overlay when placeholder layout should match incoming typography without layout shift</do>
|
|
6
|
+
<do>View-transition wipe reveal for `Skeleton.Overlay`, with `viewTransitionName: 'skeleton-overlay'` on the wrapper around skeleton+loaded content (prefer CSS class, not inline style)</do>
|
|
7
|
+
<dont>Using Skeleton.Overlay without real content structure to size against</dont>
|
|
8
|
+
<dont>Putting aria-busy on Skeleton instead of the surrounding loading region</dont>
|
|
9
|
+
<dont>Expecting view-transition wipe without wrapper `viewTransitionName: 'skeleton-overlay'` (prefer CSS class, not inline style)</dont>
|
|
10
|
+
</usage>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="slider">
|
|
3
|
+
<rule>Provide label or aria-label; when label is omitted, name thumbs with thumbLabel</rule>
|
|
4
|
+
<rule>Range sliders need distinct accessible names for each thumb</rule>
|
|
5
|
+
<rule>Keep keyboard adjustment and value feedback available through native slider semantics</rule>
|
|
6
|
+
</a11y>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="slider" title="Slider" category="form" shared_contract="slider">
|
|
3
|
+
<summary>Field-wrapped range input supporting single-thumb or two-thumb range selection.</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="Slider" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="textfield" />
|
|
9
|
+
<ref id="stack" />
|
|
10
|
+
<ref id="text" />
|
|
11
|
+
</related>
|
|
12
|
+
<units>
|
|
13
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
14
|
+
<unit kind="props" href="props.xml" />
|
|
15
|
+
<unit kind="usage" href="usage.xml" />
|
|
16
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
17
|
+
</units>
|
|
18
|
+
<base_ui href="https://base-ui.com/react/components/slider#api-reference" />
|
|
19
|
+
</meta>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="slider">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Numeric value selection on a horizontal or vertical axis</item>
|
|
5
|
+
<item>Range selection with two thumbs</item>
|
|
6
|
+
<item>Field label, description, and error copy like Textfield</item>
|
|
7
|
+
</when_to_use>
|
|
8
|
+
<when_not_to_use>
|
|
9
|
+
<item>Fixed pixel track lengths — Slider fills its container</item>
|
|
10
|
+
<item>Custom size or variant props — single medium treatment</item>
|
|
11
|
+
</when_not_to_use>
|
|
12
|
+
<prop name="description" kind="react">
|
|
13
|
+
<description>Helper copy rendered with `Field.Description` and `Text` while the field is valid.</description>
|
|
14
|
+
</prop>
|
|
15
|
+
<prop name="error" kind="react">
|
|
16
|
+
<description>Error copy rendered with `Field.Error` and `Text` in the same slot as `description`.</description>
|
|
17
|
+
</prop>
|
|
18
|
+
<prop name="label" kind="react">
|
|
19
|
+
<description>Visible label rendered with shared internal `FieldLabel`.</description>
|
|
20
|
+
</prop>
|
|
21
|
+
<prop name="required" kind="react">
|
|
22
|
+
<description>Marks the slider as required and shows a required indicator on the label.</description>
|
|
23
|
+
</prop>
|
|
24
|
+
<prop name="renderValue" kind="react">
|
|
25
|
+
<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`).</description>
|
|
26
|
+
</prop>
|
|
27
|
+
<prop name="thumbAriaLabel" kind="react">
|
|
28
|
+
<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.</description>
|
|
29
|
+
</prop>
|
|
30
|
+
<css_var suffix="progress-background">
|
|
31
|
+
<description>Slider filled progress color.</description>
|
|
32
|
+
</css_var>
|
|
33
|
+
<css_var suffix="thumb-background">
|
|
34
|
+
<description>Slider thumb fill color.</description>
|
|
35
|
+
</css_var>
|
|
36
|
+
<css_var suffix="thumb-size">
|
|
37
|
+
<description>Slider thumb size.</description>
|
|
38
|
+
</css_var>
|
|
39
|
+
<css_var suffix="track-background">
|
|
40
|
+
<description>Slider track background color.</description>
|
|
41
|
+
</css_var>
|
|
42
|
+
<css_var suffix="track-size">
|
|
43
|
+
<description>Slider track thickness.</description>
|
|
44
|
+
</css_var>
|
|
45
|
+
</props>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="slider">
|
|
3
|
+
<do>Numeric value selection on a horizontal or vertical axis</do>
|
|
4
|
+
<do>Range selection with two thumbs</do>
|
|
5
|
+
<do>Field label, description, and error copy like Textfield</do>
|
|
6
|
+
<dont>Wrapping Slider.Control and Slider.Value in extra layout inside Slider.Root</dont>
|
|
7
|
+
<dont>Overriding Slider.Indicator position in CSS</dont>
|
|
8
|
+
</usage>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="spinner">
|
|
3
|
+
<rule>Set aria-hidden on decorative Spinner instances; the component does not hide itself by default</rule>
|
|
4
|
+
<rule>Parent control or region must expose loading with aria-busy or visible status text</rule>
|
|
5
|
+
<rule>Do not use Spinner alone as the only page-level loading announcement</rule>
|
|
6
|
+
<rule>Keep the control label stable while loading overlays appear</rule>
|
|
7
|
+
</a11y>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="spinner" title="Spinner" category="feedback" shared_contract="spinner">
|
|
3
|
+
<summary>Decorative SVG pulsing loading indicator used inside interactive components.</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="Spinner" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="button" />
|
|
9
|
+
<ref id="icon-button" />
|
|
10
|
+
</related>
|
|
11
|
+
<units>
|
|
12
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
13
|
+
<unit kind="props" href="props.xml" />
|
|
14
|
+
<unit kind="usage" href="usage.xml" />
|
|
15
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
16
|
+
</units>
|
|
17
|
+
</meta>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="spinner">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Inline loading overlay inside Button or IconButton</item>
|
|
5
|
+
<item>Decorative in-progress indicator explicitly hidden from assistive technology</item>
|
|
6
|
+
<item>Loading feedback where the parent exposes the accessible status</item>
|
|
7
|
+
</when_to_use>
|
|
8
|
+
<when_not_to_use>
|
|
9
|
+
<item>Standalone accessible loading status without explicit labeling on a parent</item>
|
|
10
|
+
<item>Page-level loading when a labeled region is not provided</item>
|
|
11
|
+
</when_not_to_use>
|
|
12
|
+
<prop name="color" kind="react">
|
|
13
|
+
<description>Overrides the spinner fill color.</description>
|
|
14
|
+
</prop>
|
|
15
|
+
<prop name="size" kind="react">
|
|
16
|
+
<description>Sets the rendered spinner size.</description>
|
|
17
|
+
</prop>
|
|
18
|
+
<prop name="variant" kind="react">
|
|
19
|
+
<description>Visual animation style.</description>
|
|
20
|
+
</prop>
|
|
21
|
+
<css_var suffix="size">
|
|
22
|
+
<description>Spinner glyph size on the root.</description>
|
|
23
|
+
</css_var>
|
|
24
|
+
</props>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="spinner">
|
|
3
|
+
<do>Inline loading overlay inside Button or IconButton</do>
|
|
4
|
+
<do>Decorative in-progress indicator explicitly hidden from assistive technology</do>
|
|
5
|
+
<do>Loading feedback where the parent exposes the accessible status</do>
|
|
6
|
+
<dont>Using Spinner alone as the only loading announcement for a page</dont>
|
|
7
|
+
<dont>Embedding animation rules outside the component stylesheet</dont>
|
|
8
|
+
</usage>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="stack">
|
|
3
|
+
<rule>Stack is presentational — choose render roots that preserve correct semantics (button, list, heading)</rule>
|
|
4
|
+
<rule>Keep reading order aligned with visual order when using direction and wrap</rule>
|
|
5
|
+
<rule>Do not use Stack alone to imply grouping; use landmarks or headings where needed</rule>
|
|
6
|
+
</a11y>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="stack" title="Stack" category="layout" shared_contract="stack">
|
|
3
|
+
<summary>Flex layout primitive for arranging children with token spacing, alignment, and padding; optionally enables a named CSS container query context (`stack`) via `enableContainer`.</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="Stack" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="surface" />
|
|
9
|
+
<ref id="grid" />
|
|
10
|
+
<ref id="masonry" />
|
|
11
|
+
<ref id="separator" />
|
|
12
|
+
</related>
|
|
13
|
+
<units>
|
|
14
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
15
|
+
<unit kind="props" href="props.xml" />
|
|
16
|
+
<unit kind="usage" href="usage.xml" />
|
|
17
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
18
|
+
</units>
|
|
19
|
+
</meta>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="stack">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Column or row layouts with token gap and alignment</item>
|
|
5
|
+
<item>Composing screens and component internals without custom flex CSS</item>
|
|
6
|
+
<item>Custom native root through render while keeping data-stack hooks</item>
|
|
7
|
+
<item>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)</item>
|
|
8
|
+
<item>Centered max-width shells: parent `hAlign="center"` + child `fullWidth` + `maxWidth`</item>
|
|
9
|
+
</when_to_use>
|
|
10
|
+
<when_not_to_use>
|
|
11
|
+
<item>Cases where a single component already owns required flex chrome</item>
|
|
12
|
+
<item>Expecting direct children to grow on the main axis without setting `expandChildren`</item>
|
|
13
|
+
<item>Expecting this stack to fill parent inline size under non-stretch alignment without `fullWidth` (or an explicit `inlineSize`)</item>
|
|
14
|
+
<item>Using `enableContainer` inside complex masonry-like layouts when you don't need container queries (inline-size containment can change nested layout)</item>
|
|
15
|
+
</when_not_to_use>
|
|
16
|
+
<prop name="columnGap" kind="react">
|
|
17
|
+
<description>Sets the gap between flex columns using the Vira space token scale.</description>
|
|
18
|
+
</prop>
|
|
19
|
+
<prop name="enableContainer" kind="react">
|
|
20
|
+
<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.</description>
|
|
21
|
+
</prop>
|
|
22
|
+
<prop name="direction" kind="react">
|
|
23
|
+
<description>Renders children across rows or columns using the chosen flex direction.</description>
|
|
24
|
+
</prop>
|
|
25
|
+
<prop name="expandChildren" kind="react">
|
|
26
|
+
<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.</description>
|
|
27
|
+
</prop>
|
|
28
|
+
<prop name="fullWidth" kind="react">
|
|
29
|
+
<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.</description>
|
|
30
|
+
</prop>
|
|
31
|
+
<prop name="hAlign" kind="react">
|
|
32
|
+
<description>Aligns content on the horizontal axis from the consumer point of view.</description>
|
|
33
|
+
</prop>
|
|
34
|
+
<prop name="hPadding" kind="react">
|
|
35
|
+
<description>Sets inline padding using one token for both sides or a `[start, end]` tuple.</description>
|
|
36
|
+
</prop>
|
|
37
|
+
<prop name="inline" kind="react">
|
|
38
|
+
<description>Displays the stack as `inline-flex` instead of `flex`.</description>
|
|
39
|
+
</prop>
|
|
40
|
+
<prop name="maxWidth" kind="react">
|
|
41
|
+
<description>Applies a maximum width value to the stack root.</description>
|
|
42
|
+
</prop>
|
|
43
|
+
<prop name="minWidth" kind="react">
|
|
44
|
+
<description>Applies a minimum width value to the stack root.</description>
|
|
45
|
+
</prop>
|
|
46
|
+
<prop name="ref" kind="react">
|
|
47
|
+
<description>Ref forwarded to the rendered stack root element.</description>
|
|
48
|
+
</prop>
|
|
49
|
+
<prop name="render" kind="react">
|
|
50
|
+
<description>Replaces the default `div` root using Base UI render semantics.</description>
|
|
51
|
+
</prop>
|
|
52
|
+
<prop name="rowGap" kind="react">
|
|
53
|
+
<description>Sets the gap between flex rows using the Vira space token scale.</description>
|
|
54
|
+
</prop>
|
|
55
|
+
<prop name="vAlign" kind="react">
|
|
56
|
+
<description>Aligns content on the vertical axis from the consumer point of view.</description>
|
|
57
|
+
</prop>
|
|
58
|
+
<prop name="vPadding" kind="react">
|
|
59
|
+
<description>Sets block padding using one token for both sides or a `[start, end]` tuple.</description>
|
|
60
|
+
</prop>
|
|
61
|
+
<prop name="wrap" kind="react">
|
|
62
|
+
<description>Allows direct children to wrap onto additional lines when space is constrained.</description>
|
|
63
|
+
</prop>
|
|
64
|
+
<css_var suffix="column-gap">
|
|
65
|
+
<description>Flex column gap on the root.</description>
|
|
66
|
+
</css_var>
|
|
67
|
+
<css_var suffix="h-align">
|
|
68
|
+
<description>Logical horizontal flex alignment hook.</description>
|
|
69
|
+
</css_var>
|
|
70
|
+
<css_var suffix="max-width">
|
|
71
|
+
<description>Max inline size of the stack root.</description>
|
|
72
|
+
</css_var>
|
|
73
|
+
<css_var suffix="min-width">
|
|
74
|
+
<description>Min inline size of the stack root.</description>
|
|
75
|
+
</css_var>
|
|
76
|
+
<css_var suffix="padding-block-end">
|
|
77
|
+
<description>Block-end padding when padding is enabled.</description>
|
|
78
|
+
</css_var>
|
|
79
|
+
<css_var suffix="padding-block-start">
|
|
80
|
+
<description>Block-start padding when padding is enabled.</description>
|
|
81
|
+
</css_var>
|
|
82
|
+
<css_var suffix="padding-inline-end">
|
|
83
|
+
<description>Inline-end padding when padding is enabled.</description>
|
|
84
|
+
</css_var>
|
|
85
|
+
<css_var suffix="padding-inline-start">
|
|
86
|
+
<description>Inline-start padding when padding is enabled.</description>
|
|
87
|
+
</css_var>
|
|
88
|
+
<css_var suffix="row-gap">
|
|
89
|
+
<description>Flex row gap on the root.</description>
|
|
90
|
+
</css_var>
|
|
91
|
+
<css_var suffix="v-align">
|
|
92
|
+
<description>Logical vertical flex alignment hook.</description>
|
|
93
|
+
</css_var>
|
|
94
|
+
</props>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="stack">
|
|
3
|
+
<do>Column or row layouts with token gap and alignment</do>
|
|
4
|
+
<do>Composing screens and component internals without custom flex CSS</do>
|
|
5
|
+
<do>Custom native root through render while keeping data-stack hooks</do>
|
|
6
|
+
<do>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)</do>
|
|
7
|
+
<do>Centered max-width shells: parent `hAlign="center"` + child `fullWidth` + `maxWidth`</do>
|
|
8
|
+
<dont>Assuming Stack expands direct children by default — pass `expandChildren` when children should grow along the flex main axis</dont>
|
|
9
|
+
<dont>Using `expandChildren` to fill parent width under `hAlign="center"` — that is `fullWidth` on the child stack (self `inline-size`), not child flex-grow</dont>
|
|
10
|
+
<dont>Putting `data-grow="false"` on an ancestor to control nested expandChildren — set it on the child that should not grow</dont>
|
|
11
|
+
<dont>Re-declaring primitive flex container rules in app CSS when Stack can own the layout</dont>
|
|
12
|
+
<dont>Using viewport media queries when @container stack queries against the rendered Stack inline-size would match the design intent</dont>
|
|
13
|
+
<dont>Combining `fullWidth` with `inline` — prefer block flex when the root must fill parent inline size</dont>
|
|
14
|
+
</usage>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="static-noise">
|
|
3
|
+
<rule>StaticNoise is decorative — the root hardcodes `aria-hidden="true"` (not overridable via props)</rule>
|
|
4
|
+
<rule>Parent surface or region must expose any meaningful label or busy state</rule>
|
|
5
|
+
<rule>Consumer owns position, inset, z-index, and sizing for the overlay placement</rule>
|
|
6
|
+
</a11y>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="static-noise" title="StaticNoise" category="effect" shared_contract="static-noise">
|
|
3
|
+
<summary>Decorative SVG turbulence noise overlay for textured surfaces and hero sections. Memory-heavy — use sparingly (rarely).</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="StaticNoise" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="surface" />
|
|
9
|
+
<ref id="skeleton" />
|
|
10
|
+
</related>
|
|
11
|
+
<units>
|
|
12
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
13
|
+
<unit kind="props" href="props.xml" />
|
|
14
|
+
<unit kind="usage" href="usage.xml" />
|
|
15
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
16
|
+
</units>
|
|
17
|
+
</meta>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="static-noise">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Subtle grain or texture overlay on cards, panels, or hero sections</item>
|
|
5
|
+
<item>Glass or vibrant surfaces that need visual depth without extra content</item>
|
|
6
|
+
<item>Decorative atmosphere where the parent owns semantics and layout positioning</item>
|
|
7
|
+
</when_to_use>
|
|
8
|
+
<when_not_to_use>
|
|
9
|
+
<item>Default decoration on many surfaces — memory cost is high; reserve for rare focal moments</item>
|
|
10
|
+
<item>Standalone loading or status feedback without a labeled parent region</item>
|
|
11
|
+
<item>Critical readable content where contrast has not been verified</item>
|
|
12
|
+
<item>Large numbers of simultaneous full-viewport overlays on the same page</item>
|
|
13
|
+
</when_not_to_use>
|
|
14
|
+
<prop name="animate" kind="react">
|
|
15
|
+
<description>Animates the internal turbulence filter by cycling `feTurbulence` seed values.</description>
|
|
16
|
+
</prop>
|
|
17
|
+
<prop name="baseFrequency" kind="react">
|
|
18
|
+
<description>Sets the SVG turbulence `baseFrequency` for the internal noise filter.</description>
|
|
19
|
+
</prop>
|
|
20
|
+
<prop name="mixBlendMode" kind="react">
|
|
21
|
+
<description>Sets the rendered overlay mix blend mode.</description>
|
|
22
|
+
</prop>
|
|
23
|
+
<prop name="opacity" kind="react">
|
|
24
|
+
<description>Sets the rendered overlay opacity.</description>
|
|
25
|
+
</prop>
|
|
26
|
+
|
|
27
|
+
</props>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="static-noise">
|
|
3
|
+
<do>Subtle grain or texture overlay on cards, panels, or hero sections</do>
|
|
4
|
+
<do>Glass or vibrant surfaces that need visual depth without extra content</do>
|
|
5
|
+
<do>Decorative atmosphere where the parent owns semantics and layout positioning</do>
|
|
6
|
+
<dont>Treating StaticNoise as cheap wallpaper — it is memory-heavy; prefer few instances</dont>
|
|
7
|
+
<dont>Stacking many full-viewport StaticNoise instances on one screen</dont>
|
|
8
|
+
<dont>Using StaticNoise as the only loading announcement for a page</dont>
|
|
9
|
+
<dont>Embedding layout positioning rules inside the component stylesheet</dont>
|
|
10
|
+
</usage>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="surface">
|
|
3
|
+
<rule>Surface is presentational — pair with headings or labels so grouped content is discoverable</rule>
|
|
4
|
+
<rule>Choose render roots with correct roles when Surface wraps interactive content</rule>
|
|
5
|
+
<rule>Do not rely on hover-only background changes as the only state indicator</rule>
|
|
6
|
+
</a11y>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="surface" title="Surface" category="layout" shared_contract="surface">
|
|
3
|
+
<summary>Presentational container with token background, optional border, radius, and padding; `data-vibrant` frosts the fill even without `color` (page shell via `--global-background`); nested surfaces use radius="auto" for concentric corners; optionally enables a named CSS container query context (`surface`) via `enableContainer`.</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="Surface" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="elevator" />
|
|
9
|
+
<ref id="stack" />
|
|
10
|
+
</related>
|
|
11
|
+
<units>
|
|
12
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
13
|
+
<unit kind="props" href="props.xml" />
|
|
14
|
+
<unit kind="usage" href="usage.xml" />
|
|
15
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
16
|
+
</units>
|
|
17
|
+
</meta>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="surface">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Group content with base-level background and contrast border</item>
|
|
5
|
+
<item>Frosted glass panels with `data-vibrant` — omit `color` for page-level shell or pass `color` for a tinted fill</item>
|
|
6
|
+
<item>Popup or card chrome with optional hover background</item>
|
|
7
|
+
<item>Compose with Elevator for animated elevation transitions</item>
|
|
8
|
+
<item>Set radius to a token on the outermost Surface that needs rounded corners</item>
|
|
9
|
+
<item>Set radius to a four-value tuple [top-left, top-right, bottom-right, bottom-left] when corners need different token radii</item>
|
|
10
|
+
<item>Set radius="auto" on a nested Surface when its parent Surface has a radius so each corner subtracts the nearest ancestor padding and stays concentric</item>
|
|
11
|
+
<item>Stack nested auto-radius Surfaces recursively; context still resolves through wrapper layout such as Stack</item>
|
|
12
|
+
<item>Set overflow="hidden" (or scroll/auto) when Surface must clip or scroll inner content with radius or padding</item>
|
|
13
|
+
<item>Style descendants with `@container surface` queries when layout or typography should respond to the Surface's own inline-size instead of the viewport (set `enableContainer` on the Surface you're querying)</item>
|
|
14
|
+
</when_to_use>
|
|
15
|
+
<when_not_to_use>
|
|
16
|
+
<item>Interactive control semantics without an appropriate render root</item>
|
|
17
|
+
<item>Expecting hover background on touch-primary devices</item>
|
|
18
|
+
<item>Using radius="auto" on the outermost Surface when no ancestor Surface provides a radius context</item>
|
|
19
|
+
</when_not_to_use>
|
|
20
|
+
<prop name="border" kind="react">
|
|
21
|
+
<description>Applies the shared contrast border on one or more sides (`all`, `top`, `right`, `bottom`, `left`). Pass a single side or a list (e.g. `["bottom", "left"]`). Omit for no border.</description>
|
|
22
|
+
</prop>
|
|
23
|
+
<prop name="enableContainer" kind="react">
|
|
24
|
+
<description>Opt-in named CSS container query context for this Surface (enables `container: surface / inline-size` on the root). Required for `@container surface (min-width: ...)` rules to react to this Surface 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 Surface.</description>
|
|
25
|
+
</prop>
|
|
26
|
+
<prop name="borderStyle" kind="react">
|
|
27
|
+
<description>Sets the CSS border style when `border` is set.</description>
|
|
28
|
+
</prop>
|
|
29
|
+
<prop name="color" kind="react">
|
|
30
|
+
<description>Sets the resting background using a base ramp layer (`1`–`3`), a literal CSS color value, or the named token `primary` (`data-surface-color="primary"`; CSS owns light/dark opacity via `--global-primary`).</description>
|
|
31
|
+
</prop>
|
|
32
|
+
<prop name="hoverColor" kind="react">
|
|
33
|
+
<description>Sets the hover background on hover-capable pointers using a base ramp layer (`1`–`3`), a literal CSS value, or the named token `primary` (`data-surface-hover-color="primary"`; CSS owns light/dark opacity via `--global-primary`).</description>
|
|
34
|
+
</prop>
|
|
35
|
+
<prop name="hPadding" kind="react">
|
|
36
|
+
<description>Sets inline padding using one token for both sides or a `[start, end]` tuple.</description>
|
|
37
|
+
</prop>
|
|
38
|
+
<prop name="overflow" kind="react">
|
|
39
|
+
<description>Sets root overflow through the `--vui-surface-overflow` custom property.</description>
|
|
40
|
+
</prop>
|
|
41
|
+
<prop name="radius" kind="react">
|
|
42
|
+
<description>Sets corner radius from the Vira radius token scale, a per-corner `[top-left, top-right, bottom-right, bottom-left]` tuple (`0` for square corners), or `auto` for concentric radii from the nearest ancestor Surface.</description>
|
|
43
|
+
</prop>
|
|
44
|
+
<prop name="ref" kind="react">
|
|
45
|
+
<description>Ref forwarded to the rendered surface root element.</description>
|
|
46
|
+
</prop>
|
|
47
|
+
<prop name="render" kind="react">
|
|
48
|
+
<description>Replaces the default `div` root using Base UI render semantics.</description>
|
|
49
|
+
</prop>
|
|
50
|
+
<prop name="vPadding" kind="react">
|
|
51
|
+
<description>Sets block padding using one token for both sides or a `[start, end]` tuple.</description>
|
|
52
|
+
</prop>
|
|
53
|
+
<css_var suffix="background">
|
|
54
|
+
<description>Resting surface background on the root.</description>
|
|
55
|
+
</css_var>
|
|
56
|
+
<css_var suffix="background-hover">
|
|
57
|
+
<description>Hover surface background on the root.</description>
|
|
58
|
+
</css_var>
|
|
59
|
+
<css_var suffix="border-radius">
|
|
60
|
+
<description>Uniform corner radius when radius is a single token.</description>
|
|
61
|
+
</css_var>
|
|
62
|
+
<css_var suffix="border-radius-bottom-left">
|
|
63
|
+
<description>Bottom-left corner radius; radius tuple or auto resolves per corner.</description>
|
|
64
|
+
</css_var>
|
|
65
|
+
<css_var suffix="border-radius-bottom-right">
|
|
66
|
+
<description>Bottom-right corner radius; radius tuple or auto resolves per corner.</description>
|
|
67
|
+
</css_var>
|
|
68
|
+
<css_var suffix="border-radius-top-left">
|
|
69
|
+
<description>Top-left corner radius; radius tuple or auto resolves per corner.</description>
|
|
70
|
+
</css_var>
|
|
71
|
+
<css_var suffix="border-radius-top-right">
|
|
72
|
+
<description>Top-right corner radius; radius tuple or auto resolves per corner.</description>
|
|
73
|
+
</css_var>
|
|
74
|
+
<css_var suffix="border-style">
|
|
75
|
+
<description>Border style when border is enabled.</description>
|
|
76
|
+
</css_var>
|
|
77
|
+
<css_var suffix="overflow">
|
|
78
|
+
<description>Root overflow behavior.</description>
|
|
79
|
+
</css_var>
|
|
80
|
+
<css_var suffix="padding-block-end">
|
|
81
|
+
<description>Block-end padding when padding is enabled.</description>
|
|
82
|
+
</css_var>
|
|
83
|
+
<css_var suffix="padding-block-start">
|
|
84
|
+
<description>Block-start padding when padding is enabled.</description>
|
|
85
|
+
</css_var>
|
|
86
|
+
<css_var suffix="padding-inline-end">
|
|
87
|
+
<description>Inline-end padding when padding is enabled.</description>
|
|
88
|
+
</css_var>
|
|
89
|
+
<css_var suffix="padding-inline-start">
|
|
90
|
+
<description>Inline-start padding when padding is enabled.</description>
|
|
91
|
+
</css_var>
|
|
92
|
+
</props>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="surface">
|
|
3
|
+
<do>Group content with base-level background and contrast border</do>
|
|
4
|
+
<do>Frosted glass panels with `data-vibrant` — omit `color` for page-level shell or pass `color` for a tinted fill</do>
|
|
5
|
+
<do>Popup or card chrome with optional hover background</do>
|
|
6
|
+
<do>Compose with Elevator for animated elevation transitions</do>
|
|
7
|
+
<do>Set radius to a token on the outermost Surface that needs rounded corners</do>
|
|
8
|
+
<do>Set radius to a four-value tuple [top-left, top-right, bottom-right, bottom-left] when corners need different token radii</do>
|
|
9
|
+
<do>Set radius="auto" on a nested Surface when its parent Surface has a radius so each corner subtracts the nearest ancestor padding and stays concentric</do>
|
|
10
|
+
<do>Stack nested auto-radius Surfaces recursively; context still resolves through wrapper layout such as Stack</do>
|
|
11
|
+
<dont>Overwriting transition shorthand without composing box-shadow when data-elevation is present</dont>
|
|
12
|
+
<dont>Assuming hoverColor applies on touch devices</dont>
|
|
13
|
+
<dont>Reusing the parent token radius on nested Surfaces instead of radius="auto" when concentric corners are required</dont>
|
|
14
|
+
<dont>Expecting radius="auto" to inherit a token when the nearest ancestor Surface has no radius set</dont>
|
|
15
|
+
<dont>Using viewport media queries when @container surface queries against the rendered Surface inline-size would match the design intent</dont>
|
|
16
|
+
</usage>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="switch">
|
|
3
|
+
<rule>Provide visible label or aria-label so the switch has an accessible name</rule>
|
|
4
|
+
<rule>Checked state must map to the native switch semantics exposed by the control</rule>
|
|
5
|
+
<rule>Surface invalid state and error copy through the shared field pattern</rule>
|
|
6
|
+
</a11y>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="switch" title="Switch" category="form" shared_contract="switch">
|
|
3
|
+
<summary>Field-wrapped toggle control with medium or small track and optional field copy.</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="Switch" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="textfield" />
|
|
9
|
+
<ref id="stack" />
|
|
10
|
+
<ref id="text" />
|
|
11
|
+
</related>
|
|
12
|
+
<units>
|
|
13
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
14
|
+
<unit kind="props" href="props.xml" />
|
|
15
|
+
<unit kind="usage" href="usage.xml" />
|
|
16
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
17
|
+
</units>
|
|
18
|
+
<base_ui href="https://base-ui.com/react/components/switch#api-reference" />
|
|
19
|
+
</meta>
|