@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,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ButtonLink",
|
|
3
|
-
"structure": "<ButtonLink href=\"#\">Save</ButtonLink>",
|
|
4
|
-
"summary": "Navigation link that shares Button visual chrome (--vui-button-* CSS) and default a root with optional render for framework Link.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Actions that navigate (href or router Link) but should look like Button",
|
|
7
|
-
"Same size, variant, addon, pill, and loading chrome as Button without button semantics",
|
|
8
|
-
"Compose with Next.js Link or React Router Link via the render prop"
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": ["In-page actions that do not navigate — use Button", "Icon-only navigation — use IconButtonLink"],
|
|
11
|
-
"accessibility": [
|
|
12
|
-
"Renders a real link root so assistive tech get link role and keyboard behavior",
|
|
13
|
-
"loading sets aria-disabled / aria-busy for loading chrome; no disabled prop — native links stay activatable",
|
|
14
|
-
"Loading sets aria-busy; Spinner stays decorative"
|
|
15
|
-
],
|
|
16
|
-
"antiPatterns": ["Using Button with render={<a />} instead of ButtonLink", "Forcing role=button on a link"],
|
|
17
|
-
"related": ["Button", "IconButtonLink", "Icon", "Spinner", "Chip"],
|
|
18
|
-
"properties": {
|
|
19
|
-
"react": {
|
|
20
|
-
"addon": {
|
|
21
|
-
"description": "Decorative addon rendered alongside the link label."
|
|
22
|
-
},
|
|
23
|
-
"addonPosition": {
|
|
24
|
-
"description": "Controls whether the addon appears before or after the label."
|
|
25
|
-
},
|
|
26
|
-
"loading": {
|
|
27
|
-
"description": "Shows a centered spinner overlay while preserving the original content width. Sets `aria-disabled` / `aria-busy` for loading chrome; link stays activatable."
|
|
28
|
-
},
|
|
29
|
-
"pill": {
|
|
30
|
-
"description": "Applies a fully rounded pill shape."
|
|
31
|
-
},
|
|
32
|
-
"render": {
|
|
33
|
-
"description": "Replaces the default `a` root using Base UI render semantics (e.g. Next.js `Link`)."
|
|
34
|
-
},
|
|
35
|
-
"size": {
|
|
36
|
-
"description": "Controls the visual button size."
|
|
37
|
-
},
|
|
38
|
-
"variant": {
|
|
39
|
-
"description": "Selects the visual treatment matching Button."
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"css": {
|
|
43
|
-
"background": {
|
|
44
|
-
"description": "Button fill; variant and state selectors preset this."
|
|
45
|
-
},
|
|
46
|
-
"color": {
|
|
47
|
-
"description": "Button label and icon color."
|
|
48
|
-
},
|
|
49
|
-
"height": {
|
|
50
|
-
"description": "Button block size; size prop presets via data attributes."
|
|
51
|
-
},
|
|
52
|
-
"icon-size": {
|
|
53
|
-
"description": "Addon icon size inside the button."
|
|
54
|
-
},
|
|
55
|
-
"padding-block": {
|
|
56
|
-
"description": "Vertical padding inside the button."
|
|
57
|
-
},
|
|
58
|
-
"padding-inline": {
|
|
59
|
-
"description": "Horizontal padding inside the button."
|
|
60
|
-
},
|
|
61
|
-
"radius": {
|
|
62
|
-
"description": "Corner radius; pill sets infinite radius via data-pill."
|
|
63
|
-
},
|
|
64
|
-
"spinner-color": {
|
|
65
|
-
"description": "Loading spinner color on the root."
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Button",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/button#api-reference",
|
|
4
|
-
"structure": "<Button>Save</Button>",
|
|
5
|
-
"summary": "Primary action control with size, variant, optional addon, optional pill shape, and loading state.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Labeled actions with text and optional leading or trailing addon",
|
|
8
|
-
"Primary, secondary, flat, or destructive visual treatments",
|
|
9
|
-
"Capsule-shaped actions via pill when a fully rounded button fits the layout",
|
|
10
|
-
"Async actions that need a stable width while loading",
|
|
11
|
-
"Primary Chip addons inside a primary Button — set data-mode=\"inverted\" on the Chip so its background contrasts the button fill"
|
|
12
|
-
],
|
|
13
|
-
"whenNotToUse": [
|
|
14
|
-
"Icon-only actions without a visible label — use IconButton",
|
|
15
|
-
"Navigation or non-button semantics — use ButtonLink"
|
|
16
|
-
],
|
|
17
|
-
"accessibility": [
|
|
18
|
-
"Visible button text should name the action; avoid relying on addon alone",
|
|
19
|
-
"Loading sets aria-busy on the control while Spinner stays decorative",
|
|
20
|
-
"Disabled and loading states should not remove the action from the tab order without clear context"
|
|
21
|
-
],
|
|
22
|
-
"antiPatterns": [
|
|
23
|
-
"Using Button without children as icon-only — prefer IconButton",
|
|
24
|
-
"Using Button with render={<a />} for links — Base UI enforces button semantics; use ButtonLink",
|
|
25
|
-
"Duplicating icon size on every addon slot — Button CSS sizes SVG descendants",
|
|
26
|
-
"Mixing pill with custom border-radius overrides that fight data-pill styling",
|
|
27
|
-
"Primary Chip addon inside a primary Button without data-mode=\"inverted\" — chip background matches the button fill and disappears"
|
|
28
|
-
],
|
|
29
|
-
"related": ["ButtonLink", "IconButton", "IconButtonLink", "Icon", "Spinner", "Chip"],
|
|
30
|
-
"properties": {
|
|
31
|
-
"react": {
|
|
32
|
-
"addon": {
|
|
33
|
-
"description": "Decorative addon rendered alongside the button label. Pass any React element; use a named icon from `@viraui/icons/react` or `<Chip />` for status chips."
|
|
34
|
-
},
|
|
35
|
-
"addonPosition": {
|
|
36
|
-
"description": "Controls whether the addon appears before or after the label."
|
|
37
|
-
},
|
|
38
|
-
"loading": {
|
|
39
|
-
"description": "Shows a centered spinner overlay while preserving the original content width."
|
|
40
|
-
},
|
|
41
|
-
"pill": {
|
|
42
|
-
"description": "Applies a fully rounded pill shape to the button."
|
|
43
|
-
},
|
|
44
|
-
"size": {
|
|
45
|
-
"description": "Controls the visual button size."
|
|
46
|
-
},
|
|
47
|
-
"variant": {
|
|
48
|
-
"description": "Selects the visual treatment for the button."
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"css": {
|
|
52
|
-
"background": {
|
|
53
|
-
"description": "Button fill; variant and state selectors preset this."
|
|
54
|
-
},
|
|
55
|
-
"color": {
|
|
56
|
-
"description": "Button label and icon color."
|
|
57
|
-
},
|
|
58
|
-
"height": {
|
|
59
|
-
"description": "Button block size; size prop presets via data attributes."
|
|
60
|
-
},
|
|
61
|
-
"icon-size": {
|
|
62
|
-
"description": "Addon icon size inside the button."
|
|
63
|
-
},
|
|
64
|
-
"padding-block": {
|
|
65
|
-
"description": "Vertical padding inside the button."
|
|
66
|
-
},
|
|
67
|
-
"padding-inline": {
|
|
68
|
-
"description": "Horizontal padding inside the button."
|
|
69
|
-
},
|
|
70
|
-
"radius": {
|
|
71
|
-
"description": "Corner radius; pill sets infinite radius via data-pill."
|
|
72
|
-
},
|
|
73
|
-
"spinner-color": {
|
|
74
|
-
"description": "Loading spinner color on the root."
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Checkbox",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/checkbox#api-reference",
|
|
4
|
-
"structure": "<Checkbox label=\"…\" />",
|
|
5
|
-
"summary": "Field.Item checkbox option for standalone fields or CheckboxGroup children.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Single boolean fields wrapped in Field.Root with optional label and helper text — no Fieldset required",
|
|
8
|
-
"CheckboxGroup alone inside Field.Root when each Checkbox has its own label and no shared group legend is needed",
|
|
9
|
-
"Multi-select sets with shared legend or group copy — Field.Root > Fieldset render={<CheckboxGroup />} with Checkbox children",
|
|
10
|
-
"Invalid and disabled states with Switch-parity focus treatment"
|
|
11
|
-
],
|
|
12
|
-
"whenNotToUse": [
|
|
13
|
-
"Unlabeled checkbox without aria-label on the root",
|
|
14
|
-
"Mutually exclusive options in a set (use Radio and RadioGroup instead)",
|
|
15
|
-
"Assuming Fieldset is mandatory for every CheckboxGroup — add Fieldset only for shared legend or group copy",
|
|
16
|
-
"Group legend, description, or validation on CheckboxGroup props — use Field.Root and Fieldset instead"
|
|
17
|
-
],
|
|
18
|
-
"accessibility": [
|
|
19
|
-
"Provide visible label or aria-label so the checkbox has an accessible name",
|
|
20
|
-
"Checked and indeterminate states must map to native checkbox semantics exposed by the control",
|
|
21
|
-
"Surface standalone invalid state and error copy through Field.Root and FieldHelperCopy on Checkbox"
|
|
22
|
-
],
|
|
23
|
-
"antiPatterns": [
|
|
24
|
-
"Rendering a checkbox without label and without aria-label",
|
|
25
|
-
"Using Checkbox without Field.Root for standalone validated fields",
|
|
26
|
-
"Expecting description to stay visible when invalid without an error message"
|
|
27
|
-
],
|
|
28
|
-
"related": ["Fieldset", "CheckboxGroup", "Switch", "Stack", "Text"],
|
|
29
|
-
"properties": {
|
|
30
|
-
"react": {
|
|
31
|
-
"description": {
|
|
32
|
-
"description": "Helper copy rendered with `Field.Description` and `Text` for this option."
|
|
33
|
-
},
|
|
34
|
-
"error": {
|
|
35
|
-
"description": "Error copy rendered in the same slot as `description` while invalid."
|
|
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 checkbox 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": "Checkbox control background color."
|
|
53
|
-
},
|
|
54
|
-
"border-color": {
|
|
55
|
-
"description": "Checkbox control border color; invalid and checked states override."
|
|
56
|
-
},
|
|
57
|
-
"indicator-color": {
|
|
58
|
-
"description": "Checkbox check/minus indicator color."
|
|
59
|
-
},
|
|
60
|
-
"radius": {
|
|
61
|
-
"description": "Checkbox control corner radius."
|
|
62
|
-
},
|
|
63
|
-
"size": {
|
|
64
|
-
"description": "Checkbox control box size; size presets adjust footprint and radius."
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Chip",
|
|
3
|
-
"structure": "<Chip>Label</Chip>",
|
|
4
|
-
"summary": "Compact visual label primitive for short status, category, or metadata treatments.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Short, non-interactive labels that need a compact pill treatment",
|
|
7
|
-
"Metadata, category, status, or inline tag-like presentation",
|
|
8
|
-
"Color-coded badges using the semantic highlight palette",
|
|
9
|
-
"Polymorphic label content that should render as div by default or as another semantic tag through render"
|
|
10
|
-
],
|
|
11
|
-
"whenNotToUse": [
|
|
12
|
-
"Interactive actions or dismiss controls — use Button or IconButton",
|
|
13
|
-
"Long-form text content that should wrap like body copy — use Text"
|
|
14
|
-
],
|
|
15
|
-
"accessibility": [
|
|
16
|
-
"Chip renders a div by default, so choose render explicitly when a different semantic element is needed",
|
|
17
|
-
"Decorative addons are aria-hidden and should not carry the accessible name",
|
|
18
|
-
"Chip does not add button semantics, disabled state, or loading behavior in v1"
|
|
19
|
-
],
|
|
20
|
-
"antiPatterns": [
|
|
21
|
-
"Using Chip as a button replacement for clickable actions",
|
|
22
|
-
"Expecting addonPosition to have any effect when addon is omitted",
|
|
23
|
-
"Introducing custom size variants instead of the fixed compact height",
|
|
24
|
-
"Re-adding a one-off destructive variant instead of using the red highlight color"
|
|
25
|
-
],
|
|
26
|
-
"related": ["Button", "Icon", "IconButton", "Stack", "Text"],
|
|
27
|
-
"properties": {
|
|
28
|
-
"react": {
|
|
29
|
-
"addon": {
|
|
30
|
-
"description": "Decorative addon rendered alongside the chip label."
|
|
31
|
-
},
|
|
32
|
-
"addonPosition": {
|
|
33
|
-
"description": "Controls whether the addon appears before or after the label."
|
|
34
|
-
},
|
|
35
|
-
"ref": {
|
|
36
|
-
"description": "Ref forwarded to the rendered chip root element."
|
|
37
|
-
},
|
|
38
|
-
"render": {
|
|
39
|
-
"description": "Replaces the default `div` root using Base UI render semantics."
|
|
40
|
-
},
|
|
41
|
-
"variant": {
|
|
42
|
-
"description": "Selects the visual treatment for the chip."
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"css": {
|
|
46
|
-
"background": {
|
|
47
|
-
"description": "Chip fill; variant presets via data attributes."
|
|
48
|
-
},
|
|
49
|
-
"border-color": {
|
|
50
|
-
"description": "Chip border color."
|
|
51
|
-
},
|
|
52
|
-
"color": {
|
|
53
|
-
"description": "Chip label and icon color."
|
|
54
|
-
},
|
|
55
|
-
"color-bg-opacity": {
|
|
56
|
-
"description": "Highlight variant background opacity mix."
|
|
57
|
-
},
|
|
58
|
-
"color-border-opacity": {
|
|
59
|
-
"description": "Highlight variant border opacity mix."
|
|
60
|
-
},
|
|
61
|
-
"height": {
|
|
62
|
-
"description": "Fixed chip block size."
|
|
63
|
-
},
|
|
64
|
-
"icon-size": {
|
|
65
|
-
"description": "Decorative addon icon size."
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ClampText",
|
|
3
|
-
"structure": "<ClampText>…</ClampText>",
|
|
4
|
-
"summary": "Presentational utility that truncates overflowing copy to a fixed line count.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Single- or multi-line ellipsis in constrained layouts",
|
|
7
|
-
"Clamp Text or Title roots through render",
|
|
8
|
-
"Inline or block clamped typography"
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": [
|
|
11
|
-
"Full text must remain visible without truncation",
|
|
12
|
-
"Heading semantics without composing Title through render"
|
|
13
|
-
],
|
|
14
|
-
"accessibility": [
|
|
15
|
-
"Truncation hides content — provide full text nearby, in a tooltip, or on a detail view when it matters",
|
|
16
|
-
"Do not use clamped text alone for critical instructions or legal copy",
|
|
17
|
-
"Choose Title render for headings so document outline stays correct"
|
|
18
|
-
],
|
|
19
|
-
"antiPatterns": [
|
|
20
|
-
"Using ClampText as a heading primitive without Title render",
|
|
21
|
-
"Expecting children-driven sizing instead of rows"
|
|
22
|
-
],
|
|
23
|
-
"related": ["Text", "Title"],
|
|
24
|
-
"properties": {
|
|
25
|
-
"react": {
|
|
26
|
-
"inline": {
|
|
27
|
-
"description": "Uses inline `-webkit-inline-box` display instead of block `-webkit-box`."
|
|
28
|
-
},
|
|
29
|
-
"ref": {
|
|
30
|
-
"description": "Ref forwarded to the rendered clamp text root element."
|
|
31
|
-
},
|
|
32
|
-
"render": {
|
|
33
|
-
"description": "Replaces the default `span` root using Base UI render semantics."
|
|
34
|
-
},
|
|
35
|
-
"rows": {
|
|
36
|
-
"description": "Sets how many lines of text remain visible before truncation.",
|
|
37
|
-
"refCss": "rows"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"css": {
|
|
41
|
-
"rows": {
|
|
42
|
-
"description": "WebKit line-clamp row count on the root.",
|
|
43
|
-
"refReact": "rows"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Dialog",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/drawer#api-reference",
|
|
4
|
-
"structure": "<Dialog.Provider>\n <Dialog.IndentBackground />\n <Dialog.Indent>\n …\n <Dialog>\n <Dialog.Trigger />\n <Dialog.Sheet title=\"…\">\n …\n <Dialog.Close />\n </Dialog.Sheet>\n </Dialog>\n </Dialog.Indent>\n</Dialog.Provider>",
|
|
5
|
-
"summary": "Compound drawer sheet with `Dialog.Trigger`, `Dialog.Sheet`, `Dialog.Close`, and Base UI pass-through `Dialog.Provider`, `Dialog.Indent`, and `Dialog.IndentBackground` for app-shell indent effects.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Focused tasks or confirmations that interrupt the current page without navigation",
|
|
8
|
-
"Short forms or read-only content that needs a modal layer above the app",
|
|
9
|
-
"Bottom sheets where swipe dismissal or snap points are useful (pass `snapPoints`, `snapPoint`/`onSnapPointChange`, or `defaultSnapPoint` directly on `Dialog`)",
|
|
10
|
-
"Drill-down sheet flows (for example settings sub-pages) by nesting a `Dialog` inside `Dialog.Sheet` children",
|
|
11
|
-
"App-shell indent effects by wrapping page content in `Dialog.Provider`, `Dialog.IndentBackground`, and `Dialog.Indent`",
|
|
12
|
-
"Custom portal host (iframe preview, shadow root, or app overlay root) via `container` on the portal-owning public part"
|
|
13
|
-
],
|
|
14
|
-
"whenNotToUse": [
|
|
15
|
-
"Small anchored hints or quick actions that should use Popover or Menu",
|
|
16
|
-
"Highly custom sheet anatomy that needs primitive-level composition",
|
|
17
|
-
"Centered modal layouts that should not slide from the screen edge"
|
|
18
|
-
],
|
|
19
|
-
"accessibility": [
|
|
20
|
-
"Always pass `title`; add `description` when the heading alone is not enough context",
|
|
21
|
-
"Compose `Dialog.Close` with an accessible name when a visible close control is needed",
|
|
22
|
-
"Use `Dialog.Close` for footer actions that should dismiss the sheet",
|
|
23
|
-
"For non-modal Dialogs (`modal={false}` with `disablePointerDismissal`), the Sheet backdrop is omitted automatically — do not expect a scrim"
|
|
24
|
-
],
|
|
25
|
-
"antiPatterns": [
|
|
26
|
-
"Opening a sheet without `title` copy for assistive technologies",
|
|
27
|
-
"Relying only on backdrop press or swipe when a footer action is the primary close path",
|
|
28
|
-
"Using Dialog when a centered non-gesture modal is enough and a future Dialog primitive is available"
|
|
29
|
-
],
|
|
30
|
-
"related": ["Surface", "Button", "IconButton", "Stack", "Elevator"],
|
|
31
|
-
"properties": {
|
|
32
|
-
"react": {
|
|
33
|
-
"Sheet.children": {
|
|
34
|
-
"description": "Optional body content rendered below the description."
|
|
35
|
-
},
|
|
36
|
-
"Sheet.container": {
|
|
37
|
-
"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)."
|
|
38
|
-
},
|
|
39
|
-
"Sheet.description": {
|
|
40
|
-
"description": "Supporting copy announced with the title."
|
|
41
|
-
},
|
|
42
|
-
"Sheet.fitContent": {
|
|
43
|
-
"description": "Centers the sheet horizontally within the viewport."
|
|
44
|
-
},
|
|
45
|
-
"Sheet.headerAlign": {
|
|
46
|
-
"description": "Aligns the header stack and title/description text (`start` | `center` | `end`)."
|
|
47
|
-
},
|
|
48
|
-
"Sheet.maxContentWidth": {
|
|
49
|
-
"description": "Optional maximum width of the content area."
|
|
50
|
-
},
|
|
51
|
-
"Sheet.maxHeight": {
|
|
52
|
-
"description": "Maximum block size of the sheet panel.",
|
|
53
|
-
"refCss": "max-block-size"
|
|
54
|
-
},
|
|
55
|
-
"Sheet.showCloseButton": {
|
|
56
|
-
"description": "Whether to show the close button."
|
|
57
|
-
},
|
|
58
|
-
"Sheet.showHandle": {
|
|
59
|
-
"description": "Whether to show the drag handle above the sheet header."
|
|
60
|
-
},
|
|
61
|
-
"Sheet.title": {
|
|
62
|
-
"description": "Accessible dialog title rendered as the modal heading."
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"css": {
|
|
66
|
-
"max-block-size": {
|
|
67
|
-
"description": "Max block size of Dialog.Sheet popup root.",
|
|
68
|
-
"refReact": "Sheet.maxHeight"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Elevator",
|
|
3
|
-
"structure": "<Elevator resting={1}>…</Elevator>",
|
|
4
|
-
"summary": "No-DOM elevation utility that merges shadow hooks onto valid element children.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Apply resting and optional hover elevation to existing elements",
|
|
7
|
-
"Compose animated box-shadow transitions with data-elevation hooks",
|
|
8
|
-
"Use getElevationProps when you need the mapping directly"
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": [
|
|
11
|
-
"When you need a wrapper DOM node for layout or styling isolation",
|
|
12
|
-
"Non-element children that cannot receive merged props"
|
|
13
|
-
],
|
|
14
|
-
"accessibility": [
|
|
15
|
-
"Elevation is visual only — do not use shadow depth as the only affordance for interactivity",
|
|
16
|
-
"Preserve child focus order and semantics; Elevator does not add a focusable node",
|
|
17
|
-
"Respect reduced-motion preferences when pairing animated elevation with motion"
|
|
18
|
-
],
|
|
19
|
-
"antiPatterns": [
|
|
20
|
-
"Wrapping invalid or non-element nodes",
|
|
21
|
-
"Overwriting child transition shorthand without composing box-shadow"
|
|
22
|
-
],
|
|
23
|
-
"related": ["Surface"],
|
|
24
|
-
"properties": {
|
|
25
|
-
"react": {
|
|
26
|
-
"children": {
|
|
27
|
-
"description": "Element or elements that receive elevation hooks on their rendered root."
|
|
28
|
-
},
|
|
29
|
-
"direction": {
|
|
30
|
-
"description": "Shadow cast direction mapped to `data-elevation-direction`."
|
|
31
|
-
},
|
|
32
|
-
"extraShadow": {
|
|
33
|
-
"description": "Additional shadow layer mapped to the `--extra-shadow` custom property."
|
|
34
|
-
},
|
|
35
|
-
"hover": {
|
|
36
|
-
"description": "Hover elevation level mapped to `data-elevation-hover`."
|
|
37
|
-
},
|
|
38
|
-
"resting": {
|
|
39
|
-
"description": "Resting elevation level mapped to `data-elevation`."
|
|
40
|
-
},
|
|
41
|
-
"shadowColor": {
|
|
42
|
-
"description": "Shadow color mapped to the `--shadow-color` custom property."
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Fieldset",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/fieldset#api-reference",
|
|
4
|
-
"structure": "<Fieldset label=\"…\">…</Fieldset>",
|
|
5
|
-
"summary": "Semantic field grouping with shared legend and optional group helper copy.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Section legends for multiple related fields — billing details with Textfield, Textarea, or Select children",
|
|
8
|
-
"Choice groups that need a shared legend, group description, or group error — Field.Root > Fieldset render={<RadioGroup<Value> />} or render={<CheckboxGroup />}",
|
|
9
|
-
"Group validation and helper copy that require a Field.Root ancestor plus Fieldset description or error",
|
|
10
|
-
"Type-safe radio unions via RadioGroup<'ssd' | 'hdd'> merged through Fieldset render",
|
|
11
|
-
"Shared legend plus optional group description/error for a form block — border/section chrome belongs on Surface or the consumer"
|
|
12
|
-
],
|
|
13
|
-
"whenNotToUse": [
|
|
14
|
-
"Every RadioGroup or CheckboxGroup by default — Fieldset is optional when options already have labels and no group copy is needed",
|
|
15
|
-
"Single Textfield, Textarea, Select, Radio, or Checkbox that already exposes its own label",
|
|
16
|
-
"Standalone RadioGroup or CheckboxGroup inside Field.Root with no shared legend — primitives are enough",
|
|
17
|
-
"Group legend, description, or validation on RadioGroup or CheckboxGroup props — those belong on Fieldset (with Field.Root when validating)"
|
|
18
|
-
],
|
|
19
|
-
"accessibility": [
|
|
20
|
-
"Map visible label to Fieldset.Legend so grouped controls share an accessible section name",
|
|
21
|
-
"Keep group invalid state on Field.Root and surface group error copy through Fieldset error",
|
|
22
|
-
"Pass disabled to `<Fieldset disabled>` when the whole section should ignore interaction"
|
|
23
|
-
],
|
|
24
|
-
"antiPatterns": [
|
|
25
|
-
"Wrapping Fieldset.Root in Stack render — breaks Base UI render merge with RadioGroup or CheckboxGroup",
|
|
26
|
-
"Expecting description or error on Fieldset without a Field.Root ancestor",
|
|
27
|
-
"Omitting RadioGroup<Value> generics when option values are a restricted union"
|
|
28
|
-
],
|
|
29
|
-
"related": ["RadioGroup", "CheckboxGroup", "Textfield", "Textarea", "Select", "Stack"],
|
|
30
|
-
"properties": {
|
|
31
|
-
"react": {
|
|
32
|
-
"description": {
|
|
33
|
-
"description": "Group helper copy rendered below the legend while valid. Requires a `Field.Root` ancestor for `FieldHelperCopy`."
|
|
34
|
-
},
|
|
35
|
-
"error": {
|
|
36
|
-
"description": "Group error copy rendered below the legend when invalid. Requires a `Field.Root` ancestor."
|
|
37
|
-
},
|
|
38
|
-
"label": {
|
|
39
|
-
"description": "Visible legend copy rendered with shared internal `FieldLabel`."
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "FitText",
|
|
3
|
-
"structure": "<FitText>…</FitText>",
|
|
4
|
-
"summary": "CSS-only fit-to-width wrapper that scales children to fill available inline space.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Headlines or short copy that should fill a constrained inline width",
|
|
7
|
-
"Multi-line display type broken with br (or equivalent) inside Title, Text, or native markup",
|
|
8
|
-
"Resize-friendly marketing/hero type without JS measurement"
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": [
|
|
11
|
-
"Long body copy that should wrap and reflow at a fixed type size",
|
|
12
|
-
"Truncation — use ClampText instead",
|
|
13
|
-
"Cases that need a JS-measured or observer-driven fit"
|
|
14
|
-
],
|
|
15
|
-
"accessibility": [
|
|
16
|
-
"Children render twice; the reference copy is aria-hidden and inert so assistive tech sees one tree",
|
|
17
|
-
"Keep semantic roots on the visible children (Title render, heading elements, paragraphs)",
|
|
18
|
-
"Fitted size still respects user zoom because the ratio multiplies 1em"
|
|
19
|
-
],
|
|
20
|
-
"antiPatterns": [
|
|
21
|
-
"Expecting automatic line breaks without br or block structure in children",
|
|
22
|
-
"Putting interactive controls inside FitText (duplicate trees and inert reference)",
|
|
23
|
-
"Using FitText for truncation or ellipsis"
|
|
24
|
-
],
|
|
25
|
-
"related": ["Title", "Text", "ClampText"],
|
|
26
|
-
"properties": {
|
|
27
|
-
"react": {
|
|
28
|
-
"maxFontSize": {
|
|
29
|
-
"description": "Caps the fitted font size using any valid CSS length string."
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"css": {
|
|
33
|
-
"max-font-size": {
|
|
34
|
-
"description": "Upper bound for the fitted font size on the display slot."
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Glow",
|
|
3
|
-
"structure": "<Glow>{children}</Glow>",
|
|
4
|
-
"summary": "Decorative pointer-driven border highlight on a transparent Surface shell (radius only). Put the visual card as children; a shared rAF tracker paints CSS variables without React re-renders. Memory-heavy — use sparingly (rarely).",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Wrap a Surface (or other content) that should highlight toward the pointer",
|
|
7
|
-
"Grid of glow shells that share one pointer highlight path",
|
|
8
|
-
"Nested glow inside a padded Surface using radius=\"auto\""
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": [
|
|
11
|
-
"Default decoration on many cards — memory cost is high; reserve for rare focal moments",
|
|
12
|
-
"Static or continuously animated borders — use Surface border or Beam instead",
|
|
13
|
-
"Accessible status or focus indication — glow is decorative only",
|
|
14
|
-
"As a replacement for Surface color/padding — compose Surface as children"
|
|
15
|
-
],
|
|
16
|
-
"accessibility": [
|
|
17
|
-
"Root stays in the accessibility tree; highlight is decorative CSS only",
|
|
18
|
-
"Glow is not a focus or status indicator — consumer owns accessible names and state",
|
|
19
|
-
"Highlight hides under coarse pointer / no-hover and under prefers-reduced-motion"
|
|
20
|
-
],
|
|
21
|
-
"antiPatterns": [
|
|
22
|
-
"Relying on Glow for keyboard focus visibility",
|
|
23
|
-
"Treating Glow as the visual card (color/padding) instead of composing Surface children",
|
|
24
|
-
"Setting overflow:hidden on an ancestor Surface when outer glow must remain visible",
|
|
25
|
-
"Expecting soft bloom Light layer — Glow is border-ring only",
|
|
26
|
-
"Using many Glow instances on one page — memory- and CPU-heavy",
|
|
27
|
-
"Expecting continuous spin — use Beam instead"
|
|
28
|
-
],
|
|
29
|
-
"related": ["Surface", "Beam", "Shimmer", "ProgressiveBlur"],
|
|
30
|
-
"properties": {
|
|
31
|
-
"react": {
|
|
32
|
-
"radius": {
|
|
33
|
-
"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."
|
|
34
|
-
},
|
|
35
|
-
"proximity": {
|
|
36
|
-
"description": "Distance from the surface edge where the glow becomes fully active."
|
|
37
|
-
},
|
|
38
|
-
"spread": {
|
|
39
|
-
"description": "Angular width of the highlighted arc (degrees, used as a unitless CSS number).",
|
|
40
|
-
"refCss": "spread"
|
|
41
|
-
},
|
|
42
|
-
"opacity": {
|
|
43
|
-
"description": "Resting opacity of the glow when the pointer is outside proximity."
|
|
44
|
-
},
|
|
45
|
-
"fitContent": {
|
|
46
|
-
"description": "Shrinks the root to fit its content (`max-width: fit-content`)."
|
|
47
|
-
},
|
|
48
|
-
"borderWidth": {
|
|
49
|
-
"description": "Width of the masked glow border ring.",
|
|
50
|
-
"refCss": "border-width"
|
|
51
|
-
},
|
|
52
|
-
"borderColor": {
|
|
53
|
-
"description": "Color of the masked border ring under the highlight.",
|
|
54
|
-
"refCss": "border-color"
|
|
55
|
-
},
|
|
56
|
-
"borderOffset": {
|
|
57
|
-
"description": "Offset of the glow ring from the surface edge. Negative values place the ring outside.",
|
|
58
|
-
"refCss": "border-offset"
|
|
59
|
-
},
|
|
60
|
-
"glowColor": {
|
|
61
|
-
"description": "Overrides the glow gradient with a solid color or custom background value. Ignored when `rainbowColors` is true.",
|
|
62
|
-
"refCss": "color"
|
|
63
|
-
},
|
|
64
|
-
"globalHighlight": {
|
|
65
|
-
"description": "Shares the highlight gradient across cards via `background-attachment: fixed`. Forced off when `rainbowColors` is true."
|
|
66
|
-
},
|
|
67
|
-
"rainbowColors": {
|
|
68
|
-
"description": "Uses the multi-stop rainbow highlight gradient and disables global highlight attachment."
|
|
69
|
-
},
|
|
70
|
-
"angleLag": {
|
|
71
|
-
"description": "CSS transition duration in milliseconds for the pointer-driven starting angle. Soft follow by default; set 0 for instant snap.",
|
|
72
|
-
"refCss": "angle-lag"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"css": {
|
|
76
|
-
"starting-angle": {
|
|
77
|
-
"description": "Conic gradient start angle in degrees (unitless number). Pointer tracker writes a continuous unwrapped value."
|
|
78
|
-
},
|
|
79
|
-
"angle-lag": {
|
|
80
|
-
"description": "Transition duration for `--vui-glow-starting-angle`.",
|
|
81
|
-
"refReact": "angleLag"
|
|
82
|
-
},
|
|
83
|
-
"active-opacity": {
|
|
84
|
-
"description": "Current glow opacity from proximity tracking. Written by the shared tracker."
|
|
85
|
-
},
|
|
86
|
-
"spread": {
|
|
87
|
-
"description": "Angular width of the highlighted arc.",
|
|
88
|
-
"refReact": "spread"
|
|
89
|
-
},
|
|
90
|
-
"border-width": {
|
|
91
|
-
"description": "Masked glow border ring width.",
|
|
92
|
-
"refReact": "borderWidth"
|
|
93
|
-
},
|
|
94
|
-
"border-color": {
|
|
95
|
-
"description": "Masked border ring color under the highlight.",
|
|
96
|
-
"refReact": "borderColor"
|
|
97
|
-
},
|
|
98
|
-
"border-offset": {
|
|
99
|
-
"description": "Glow ring offset from the surface edge.",
|
|
100
|
-
"refReact": "borderOffset"
|
|
101
|
-
},
|
|
102
|
-
"color": {
|
|
103
|
-
"description": "Glow fill (solid color or gradient).",
|
|
104
|
-
"refReact": "glowColor"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|