@viraui/react 2026.3.11 → 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/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
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Toast",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/toast#api-reference",
|
|
4
|
-
"structure": "<Toast.Provider>\n <Toast.Portal>\n <Toast.Viewport>\n <Toast.Banner toast={…}>\n <Toast.Action>…</Toast.Action>\n </Toast.Banner>\n </Toast.Viewport>\n </Toast.Portal>\n</Toast.Provider>",
|
|
5
|
-
"summary": "Non-callable compound Toast namespace for transient notifications, with stacked or anchored placement, Banner high-level API, and optional action buttons.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Confirming a completed action such as save or delete",
|
|
8
|
-
"Offering a short undo window after a reversible change",
|
|
9
|
-
"Showing contextual feedback anchored to the control that triggered it",
|
|
10
|
-
"Custom portal host (iframe preview, shadow root, or app overlay root) via `container` on the portal-owning public part"
|
|
11
|
-
],
|
|
12
|
-
"whenNotToUse": [
|
|
13
|
-
"Blocking errors that need immediate correction — use inline field errors or a dialog",
|
|
14
|
-
"Persistent status that should stay visible — use inline status text or a banner pattern",
|
|
15
|
-
"Long-form content that needs reading time — use a dialog or dedicated panel"
|
|
16
|
-
],
|
|
17
|
-
"accessibility": [
|
|
18
|
-
"Pass title and description strings to toastManager.add for screen reader announcements on high-priority toasts",
|
|
19
|
-
"Keep toast copy concise; users can navigate the toast viewport landmark with F6",
|
|
20
|
-
"Ensure action and dismiss controls have visible labels",
|
|
21
|
-
"Use anchored toasts for contextual feedback tied to a specific trigger"
|
|
22
|
-
],
|
|
23
|
-
"antiPatterns": [
|
|
24
|
-
"Nesting arbitrary components inside Toast.Banner — children must be Toast.Action only",
|
|
25
|
-
"Stacking many simultaneous toasts without a clear limit",
|
|
26
|
-
"Using toasts for critical validation errors that block task completion"
|
|
27
|
-
],
|
|
28
|
-
"related": ["Button", "Surface", "Stack", "Dialog"],
|
|
29
|
-
"properties": {
|
|
30
|
-
"react": {
|
|
31
|
-
"Banner.children": {
|
|
32
|
-
"description": "Optional action buttons. Accepts a single `Toast.Action` or an array of them."
|
|
33
|
-
},
|
|
34
|
-
"Banner.className": {
|
|
35
|
-
"description": "Class name forwarded to the toast root."
|
|
36
|
-
},
|
|
37
|
-
"Banner.description": {
|
|
38
|
-
"description": "Supporting copy below the title."
|
|
39
|
-
},
|
|
40
|
-
"Banner.dismissable": {
|
|
41
|
-
"description": "Whether to render the dismiss control."
|
|
42
|
-
},
|
|
43
|
-
"Banner.dismissLabel": {
|
|
44
|
-
"description": "Label for the dismiss control."
|
|
45
|
-
},
|
|
46
|
-
"Banner.onDismiss": {
|
|
47
|
-
"description": "Called when the dismiss control is activated, before Base UI closes the toast."
|
|
48
|
-
},
|
|
49
|
-
"Banner.title": {
|
|
50
|
-
"description": "Heading above the description. Falls back to `toast.title` from `toastManager.add`."
|
|
51
|
-
},
|
|
52
|
-
"Banner.toast": {
|
|
53
|
-
"description": "Toast instance from `Toast.useToastManager().toasts` or `Toast.createToastManager()`."
|
|
54
|
-
},
|
|
55
|
-
"Viewport.position": {
|
|
56
|
-
"description": "Controls viewport placement and stacking layout hooks."
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ToggleButton",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/toggle#api-reference",
|
|
4
|
-
"structure": "<ToggleButton restingIcon={<Plus />} aria-label=\"Pin\" />",
|
|
5
|
-
"summary": "Icon-only two-state toggle that swaps resting and optional pressed icons on Base UI Toggle state; `interpolateIcons` (default false) opt-in crossfade + light rotate between dual icons.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Toolbar pin, favorite, or mute toggles identified only by icon",
|
|
8
|
-
"Compact on/off controls that share IconButton size, variant, and loading model",
|
|
9
|
-
"Two-state actions where pressed state should swap the visible glyph",
|
|
10
|
-
"Temporally swap icons after user interactions with temporal pressed state, like copy feedback."
|
|
11
|
-
],
|
|
12
|
-
"whenNotToUse": [
|
|
13
|
-
"Settings-style on/off fields — use Switch",
|
|
14
|
-
"One-shot actions with no pressed state — use IconButton"
|
|
15
|
-
],
|
|
16
|
-
"accessibility": [
|
|
17
|
-
"Provide aria-label or aria-labelledby on every ToggleButton — icon alone is not a name",
|
|
18
|
-
"Base UI Toggle exposes aria-pressed on the rendered button",
|
|
19
|
-
"Keep the accessible name stable when loading state changes"
|
|
20
|
-
],
|
|
21
|
-
"antiPatterns": [
|
|
22
|
-
"Using IconButton for persistent pressed toolbar state",
|
|
23
|
-
"Using Switch for compact icon-only toolbar toggles",
|
|
24
|
-
"Passing icon or render — ToggleButton owns icon swap and Toggle render wiring"
|
|
25
|
-
],
|
|
26
|
-
"related": ["IconButton", "Button", "Switch", "ToggleGroup"],
|
|
27
|
-
"properties": {
|
|
28
|
-
"react": {
|
|
29
|
-
"interpolateIcons": {
|
|
30
|
-
"description": "When `pressedIcon` is set, crossfade and rotate between resting and pressed icons (`data-interpolate=\"true\"`). When `false`, swap instantly with no transition."
|
|
31
|
-
},
|
|
32
|
-
"loading": {
|
|
33
|
-
"description": "Shows a centered spinner overlay while preserving the original content width."
|
|
34
|
-
},
|
|
35
|
-
"pill": {
|
|
36
|
-
"description": "Applies a fully rounded pill shape to the button."
|
|
37
|
-
},
|
|
38
|
-
"pressedIcon": {
|
|
39
|
-
"description": "Icon shown while the toggle is pressed."
|
|
40
|
-
},
|
|
41
|
-
"pressedVariant": {
|
|
42
|
-
"description": "Visual variant while the toggle is pressed."
|
|
43
|
-
},
|
|
44
|
-
"restingIcon": {
|
|
45
|
-
"description": "Icon shown while the toggle is not pressed."
|
|
46
|
-
},
|
|
47
|
-
"size": {
|
|
48
|
-
"description": "Controls the visual button size."
|
|
49
|
-
},
|
|
50
|
-
"variant": {
|
|
51
|
-
"description": "Visual variant while the toggle is not pressed."
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"css": {
|
|
55
|
-
"background": {
|
|
56
|
-
"description": "Button fill; variant and state selectors preset this."
|
|
57
|
-
},
|
|
58
|
-
"color": {
|
|
59
|
-
"description": "Button label and icon color."
|
|
60
|
-
},
|
|
61
|
-
"height": {
|
|
62
|
-
"description": "Button block size; size prop presets via data attributes."
|
|
63
|
-
},
|
|
64
|
-
"icon-size": {
|
|
65
|
-
"description": "Addon icon size inside the button."
|
|
66
|
-
},
|
|
67
|
-
"padding-block": {
|
|
68
|
-
"description": "Vertical padding inside the button."
|
|
69
|
-
},
|
|
70
|
-
"padding-inline": {
|
|
71
|
-
"description": "Horizontal padding inside the button."
|
|
72
|
-
},
|
|
73
|
-
"radius": {
|
|
74
|
-
"description": "Corner radius; pill sets infinite radius via data-pill."
|
|
75
|
-
},
|
|
76
|
-
"spinner-color": {
|
|
77
|
-
"description": "Loading spinner color on the root."
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ToggleGroup",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/toggle-group#api-reference",
|
|
4
|
-
"structure": "<ToggleGroup>\n <ToggleButton restingIcon={<Plus />} aria-label=\"List\" value=\"list\" />\n</ToggleGroup>",
|
|
5
|
-
"summary": "Toolbar toggle set with shared selection state; Stack direction follows orientation with zero default gap.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Segmented icon toolbars such as text alignment or formatting controls",
|
|
8
|
-
"Single- or multi-select pressed states across related ToggleButton items",
|
|
9
|
-
"Compact action clusters that need coordinated value and disabled state"
|
|
10
|
-
],
|
|
11
|
-
"whenNotToUse": [
|
|
12
|
-
"Standalone one-off toggles — use ToggleButton",
|
|
13
|
-
"Settings-style on/off fields — use Switch",
|
|
14
|
-
"Tabbed panel navigation — use Tabs"
|
|
15
|
-
],
|
|
16
|
-
"accessibility": [
|
|
17
|
-
"Provide aria-label or aria-labelledby on the ToggleGroup root",
|
|
18
|
-
"Provide aria-label or aria-labelledby on every ToggleButton child",
|
|
19
|
-
"Each ToggleButton exposes aria-pressed; group selection follows Base UI ToggleGroup semantics"
|
|
20
|
-
],
|
|
21
|
-
"antiPatterns": [
|
|
22
|
-
"Omitting value on ToggleButton children inside a group",
|
|
23
|
-
"Using Switch for icon-only toolbar toggle sets",
|
|
24
|
-
"Embedding Surface chrome in the component — wrap demos or app chrome at the consumer"
|
|
25
|
-
],
|
|
26
|
-
"related": ["ToggleButton", "IconButton", "Tabs"]
|
|
27
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Tooltip",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/tooltip#api-reference",
|
|
4
|
-
"structure": "<Tooltip.Provider>\n <Tooltip>\n <Tooltip.Trigger />\n <Tooltip.Content />\n </Tooltip>\n</Tooltip.Provider>",
|
|
5
|
-
"summary": "Compound tooltip built on Base UI Tooltip with `Tooltip.Provider`, `Tooltip.Trigger`, `Tooltip.Content`, and `Tooltip.createHandle` for detached and multiple triggers; `Content` encapsulates Portal + Positioner + Popup + Viewport and animates position, size, and content between triggers.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Short hints on hover or focus for toolbar controls and icon buttons",
|
|
8
|
-
"Per-trigger labels on shared tooltip roots using `payload` and Root render-function children",
|
|
9
|
-
"Adjacent controls that benefit from shared open/close delay via `Tooltip.Provider`",
|
|
10
|
-
"Custom portal host (iframe preview, shadow root, or app overlay root) via `container` on the portal-owning public part"
|
|
11
|
-
],
|
|
12
|
-
"whenNotToUse": [
|
|
13
|
-
"Rich interactive panels or forms (use Popover or Dialog)",
|
|
14
|
-
"System-wide transient alerts (use Toast)",
|
|
15
|
-
"Content that must stay open while the pointer moves into the popup (enable `disableHoverablePopup` only when needed)"
|
|
16
|
-
],
|
|
17
|
-
"accessibility": [
|
|
18
|
-
"Match trigger `aria-label` to tooltip copy so sighted and assistive users get the same hint",
|
|
19
|
-
"Keep tooltip copy concise; use Popover when the hint needs paragraphs, links, or controls",
|
|
20
|
-
"Wrap regions with multiple tooltips in `Tooltip.Provider` for predictable delay grouping"
|
|
21
|
-
],
|
|
22
|
-
"antiPatterns": [
|
|
23
|
-
"Putting essential-only information in a tooltip with no accessible name on the trigger",
|
|
24
|
-
"Expecting `Tooltip.Arrow` (it is intentionally not exported or rendered)",
|
|
25
|
-
"Using tooltip for modal or focus-trapped tasks"
|
|
26
|
-
],
|
|
27
|
-
"related": ["Surface", "Button", "IconButton", "Stack", "Popover", "Icon"],
|
|
28
|
-
"properties": {
|
|
29
|
-
"css": {
|
|
30
|
-
"content-fade-duration": {
|
|
31
|
-
"description": "content fade duration custom property on the component root."
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"react": {
|
|
35
|
-
"Content.container": {
|
|
36
|
-
"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)."
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Typewriter",
|
|
3
|
-
"structure": "<Typewriter>…</Typewriter>",
|
|
4
|
-
"summary": "Decorative inline typewriter animation that inherits typography and color from a parent text primitive.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Hero or marketing copy that cycles through short phrases",
|
|
7
|
-
"Loading or status labels that reveal text progressively",
|
|
8
|
-
"Muted intro copy inside Text or Title where motion adds emphasis"
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": [
|
|
11
|
-
"Standalone accessible status updates without a surrounding labeled region",
|
|
12
|
-
"Long-form content better served by static Text",
|
|
13
|
-
"Cases where reduced-motion users must see every phrase in a multi-text cycle"
|
|
14
|
-
],
|
|
15
|
-
"accessibility": [
|
|
16
|
-
"One phrase layer (Ghost when preserveSpace, clipped A11y otherwise) holds the full current phrase and announces via aria-live",
|
|
17
|
-
"The absolute/in-flow typed layer is aria-hidden and only paints the progressive effect plus caret",
|
|
18
|
-
"Reduced motion shows the final phrase immediately without cycling delays",
|
|
19
|
-
"Parent region owns loading or busy semantics when Typewriter is decorative"
|
|
20
|
-
],
|
|
21
|
-
"antiPatterns": [
|
|
22
|
-
"Using Typewriter as the only source of critical status information",
|
|
23
|
-
"Embedding layout positioning rules inside the component stylesheet",
|
|
24
|
-
"Restarting animation on every parent render by passing unstable inline text arrays without stable content",
|
|
25
|
-
"Setting parent Text or Title trim={false} solely so preserveSpace can reserve wrapped height",
|
|
26
|
-
"Driving per-character typing through React state (use DOM writes on the typed layer instead)"
|
|
27
|
-
],
|
|
28
|
-
"related": ["Text", "Title", "Shimmer"],
|
|
29
|
-
"properties": {
|
|
30
|
-
"react": {
|
|
31
|
-
"caret": {
|
|
32
|
-
"description": "Selects the caret style rendered after the typed text."
|
|
33
|
-
},
|
|
34
|
-
"caretColor": {
|
|
35
|
-
"description": "Overrides the caret color."
|
|
36
|
-
},
|
|
37
|
-
"delay": {
|
|
38
|
-
"description": "Sets the initial delay before typing starts, in milliseconds."
|
|
39
|
-
},
|
|
40
|
-
"deleteSpeed": {
|
|
41
|
-
"description": "Sets the delay between deleted characters in milliseconds."
|
|
42
|
-
},
|
|
43
|
-
"loop": {
|
|
44
|
-
"description": "Repeats the phrase cycle after the final phrase is deleted."
|
|
45
|
-
},
|
|
46
|
-
"pause": {
|
|
47
|
-
"description": "Sets the pause after a phrase completes before deletion starts, in milliseconds."
|
|
48
|
-
},
|
|
49
|
-
"preserveSpace": {
|
|
50
|
-
"description": "Reserves the full phrase width and height (including wrap under parent constraints) from first paint through delay, typing, and deletion."
|
|
51
|
-
},
|
|
52
|
-
"speed": {
|
|
53
|
-
"description": "Sets the delay between typed characters in milliseconds."
|
|
54
|
-
},
|
|
55
|
-
"texts": {
|
|
56
|
-
"description": "Cycles through multiple phrases instead of a single `children` string."
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"css": {
|
|
60
|
-
"caret-color": {
|
|
61
|
-
"description": "Typewriter caret color."
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
package/dist/consumption.json
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"summary": "Minimal bootstrap for external apps consuming @viraui/react.",
|
|
3
|
-
"requiredPackages": {
|
|
4
|
-
"@viraui/react": "Public components, preflight CSS, and usage guides.",
|
|
5
|
-
"react": "Peer dependency.",
|
|
6
|
-
"react-dom": "Peer dependency.",
|
|
7
|
-
"@base-ui/react": "Peer dependency for wrapped primitives."
|
|
8
|
-
},
|
|
9
|
-
"optionalPackages": {
|
|
10
|
-
"@viraui/foundation": "Preset Vira brand theme CSS, ThemeTypes, and JSON only.",
|
|
11
|
-
"@viraui/icons": "Optional Vira content glyphs (@viraui/icons/react). Icon slots accept any ReactNode (lucide-react, other libraries, custom SVG). Chrome defaults are inlined in @viraui/react."
|
|
12
|
-
},
|
|
13
|
-
"importOrder": [
|
|
14
|
-
"Compatible theme CSS (preset @viraui/foundation/vira.css, custom theme CSS, or future theme-builder export)",
|
|
15
|
-
"Consumer font CSS or @font-face rules matching theme font-family strings (for example @fontsource-variable packages)",
|
|
16
|
-
"@viraui/react/preflight.css"
|
|
17
|
-
],
|
|
18
|
-
"componentCss": {
|
|
19
|
-
"rule": "Import public components from the @viraui/react root barrel. Component CSS follows the JS module graph through side-effect CSS imports.",
|
|
20
|
-
"optionalExplicitImport": "@viraui/react/<component>.css for tree-shaking or debugging only; not part of default bootstrap."
|
|
21
|
-
},
|
|
22
|
-
"cascadeLayers": {
|
|
23
|
-
"orderDeclaredIn": "@viraui/react/preflight.css",
|
|
24
|
-
"alsoRedeclaredIn": "Every emitted component CSS file (first statement)",
|
|
25
|
-
"order": ["viraui.preflight", "viraui.components", "viraui.overrides"],
|
|
26
|
-
"rule": "Preflight owns the canonical @layer order; component CSS re-declares the same order so bundlers that inject component CSS before preflight still lock preflight < components < overrides. Default component rules use viraui.components; cross-component same-node overrides use viraui.overrides. Unlayered app CSS beats all Vira layers."
|
|
27
|
-
},
|
|
28
|
-
"importMechanism": {
|
|
29
|
-
"rule": "Load theme CSS, font CSS, and preflight through JavaScript side-effect imports in the app root entry module. Import public components from the @viraui/react root barrel; component CSS follows the emitted JavaScript module graph and is not part of bootstrap.",
|
|
30
|
-
"forbidden": "Do not bootstrap Vira theme, font, or preflight CSS with CSS @import in a global stylesheet. Do not require per-component CSS imports in app bootstrap."
|
|
31
|
-
},
|
|
32
|
-
"rootProviders": {
|
|
33
|
-
"rule": "After CSS bootstrap, wrap the app tree once in Dialog.Provider, Dialog.IndentBackground, Dialog.Indent, Tooltip.Provider, and Toast.Provider. Toast.createToastManager() stays at module scope. Map Toast.useToastManager().toasts to Toast.Banner inside Toast.Portal and Toast.Viewport. Overlay composition details stay in colocated *.guide.json and viraui-design composition.md.",
|
|
34
|
-
"tree": [
|
|
35
|
-
"Dialog.Provider",
|
|
36
|
-
"Dialog.IndentBackground (sibling of Indent)",
|
|
37
|
-
"Dialog.Indent (wraps app + toast viewport)",
|
|
38
|
-
"Tooltip.Provider",
|
|
39
|
-
"Toast.Provider toastManager={toastManager}",
|
|
40
|
-
"children",
|
|
41
|
-
"Toast.Portal > Toast.Viewport > Toast.Banner per toast"
|
|
42
|
-
],
|
|
43
|
-
"nextJsAppRouter": "Keep CSS side-effect imports in the Server Component root layout. Put the provider tree in a Client Component that wraps children.",
|
|
44
|
-
"astro": "React context does not cross Astro islands. Providers must live in the same island as the Vira overlays that consume them.",
|
|
45
|
-
"rtl": "For RTL menus and popups, wrap with Base UI DirectionProvider direction=\"rtl\" and set dir=\"rtl\" on a portal ancestor (usually html)."
|
|
46
|
-
},
|
|
47
|
-
"nextJsAppRouter": {
|
|
48
|
-
"mandatory": true,
|
|
49
|
-
"rule": "In Next.js App Router apps, import theme CSS, font CSS, and @viraui/react/preflight.css as JavaScript side-effect imports in root app/layout.tsx; never bootstrap them with CSS @import in globals.css.",
|
|
50
|
-
"entryModule": "app/layout.tsx",
|
|
51
|
-
"importOrder": [
|
|
52
|
-
"Compatible theme CSS (preset @viraui/foundation/vira.css, custom theme CSS, or future theme-builder export)",
|
|
53
|
-
"Consumer font CSS or @fontsource-variable packages matching theme font-family strings",
|
|
54
|
-
"@viraui/react/preflight.css"
|
|
55
|
-
],
|
|
56
|
-
"requiredImports": [
|
|
57
|
-
"import '@viraui/foundation/vira.css'",
|
|
58
|
-
"import '@fontsource-variable/geist/wght.css'",
|
|
59
|
-
"import '@fontsource-variable/geist-mono/wght.css'",
|
|
60
|
-
"import '@viraui/react/preflight.css'"
|
|
61
|
-
],
|
|
62
|
-
"forbidden": {
|
|
63
|
-
"location": "app/globals.css",
|
|
64
|
-
"mechanism": "CSS @import",
|
|
65
|
-
"targets": ["@viraui/foundation/*", "@viraui/react/preflight.css", "@fontsource-variable/*"]
|
|
66
|
-
},
|
|
67
|
-
"globalsCssScope": "App-owned global styles only; no @viraui/* or font-package @import",
|
|
68
|
-
"providers": "Client Component wrapping children; CSS imports stay in app/layout.tsx",
|
|
69
|
-
"layoutExample": [
|
|
70
|
-
"import '@viraui/foundation/vira.css';",
|
|
71
|
-
"import '@fontsource-variable/geist/wght.css';",
|
|
72
|
-
"import '@fontsource-variable/geist-mono/wght.css';",
|
|
73
|
-
"import '@viraui/react/preflight.css';",
|
|
74
|
-
"import './globals.css';"
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
"discovery": {
|
|
78
|
-
"catalog": "@viraui/react/catalog.json",
|
|
79
|
-
"consumption": "@viraui/react/consumption.json",
|
|
80
|
-
"themeSurface": "@viraui/react/theme-surface.json",
|
|
81
|
-
"preflightSurface": "@viraui/react/preflight-surface.json",
|
|
82
|
-
"componentGuide": "@viraui/react/<component>.guide.json"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"summary": "Data attributes and related CSS custom properties exposed by @viraui/react/preflight.css.",
|
|
3
|
-
"prerequisite": "Import compatible theme CSS, then @viraui/react/preflight.css. See @viraui/react/consumption.json.",
|
|
4
|
-
"sourceModules": [
|
|
5
|
-
{
|
|
6
|
-
"id": "themes",
|
|
7
|
-
"file": "modes.css",
|
|
8
|
-
"purpose": "Runtime color-scheme hints for light, dark, and inverted mode."
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": "core",
|
|
12
|
-
"file": "core.css",
|
|
13
|
-
"purpose": "Root baseline including html font-size from --font-root-size, --is-light-mode registration, global element defaults, and corner-shape gate via var(--__corner-shape, var(--corner-shape))."
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"id": "typography",
|
|
17
|
-
"file": "typography.css",
|
|
18
|
-
"purpose": "Semantic HTML element typography and link styling opt-out."
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"id": "elevations",
|
|
22
|
-
"file": "elevations.css",
|
|
23
|
-
"purpose": "Theme-gated resting and hover box-shadow elevation stacks plus unlayered box-shadow transitions."
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"id": "layout",
|
|
27
|
-
"file": "layout.css",
|
|
28
|
-
"purpose": "Flex growth and shrink utilities via data-grow / data-shrink for Stack and component children."
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"id": "vibrancy",
|
|
32
|
-
"file": "vibrancy.css",
|
|
33
|
-
"purpose": "Theme-gated backdrop-filter vibrancy on elements that opt in with data-vibrant."
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"attributes": [
|
|
37
|
-
{
|
|
38
|
-
"name": "data-mode",
|
|
39
|
-
"module": "themes",
|
|
40
|
-
"values": ["light", "dark", "inverted"],
|
|
41
|
-
"presence": "value required",
|
|
42
|
-
"effect": "Narrows color-scheme on the element subtree: light forces light, dark forces dark, inverted flips color-scheme relative to the active theme using --is-light-mode on the root container.",
|
|
43
|
-
"whenToUse": [
|
|
44
|
-
"Toggle runtime light or dark mode on html, body, or a layout wrapper",
|
|
45
|
-
"Scope a subtree to one mode while the rest of the page stays unchanged",
|
|
46
|
-
"Invert color-scheme on a nested surface that must contrast the active theme, for example a primary Chip addon inside a primary Button"
|
|
47
|
-
],
|
|
48
|
-
"whenNotToUse": [
|
|
49
|
-
"As a substitute for loading compatible theme CSS",
|
|
50
|
-
"To swap brand stylesheets; use theme CSS imports instead"
|
|
51
|
-
],
|
|
52
|
-
"related": ["data-mode is independent from brand stylesheet selection; see runtime-enhancements.md"]
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "data-no-link-style",
|
|
56
|
-
"module": "typography",
|
|
57
|
-
"values": ["(boolean presence)"],
|
|
58
|
-
"presence": "boolean attribute on anchor elements",
|
|
59
|
-
"effect": "Excludes the anchor from preflight default link styling (interactive color, no underline, animated underline on unclassed links).",
|
|
60
|
-
"whenToUse": [
|
|
61
|
-
"Links that must keep component-owned or custom link chrome",
|
|
62
|
-
"Anchors inside Button, IconButton, or other interactive surfaces"
|
|
63
|
-
],
|
|
64
|
-
"whenNotToUse": ["Standard inline prose links that should inherit preflight link styling"],
|
|
65
|
-
"related": []
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"name": "data-elevation",
|
|
69
|
-
"module": "elevations",
|
|
70
|
-
"values": ["0", "1", "2", "3", "4"],
|
|
71
|
-
"presence": "value required",
|
|
72
|
-
"effect": "When the active theme sets --effect-shadows, applies resting box-shadow stack for the chosen elevation level.",
|
|
73
|
-
"whenToUse": [
|
|
74
|
-
"Static surfaces such as cards, panels, and popovers",
|
|
75
|
-
"Direct DOM usage without the Elevator component"
|
|
76
|
-
],
|
|
77
|
-
"whenNotToUse": [
|
|
78
|
-
"When Elevator or getElevationProps already sets elevation hooks on the target element",
|
|
79
|
-
"When the theme sets --effect-shadows: initial (attr is a no-op for box-shadow)"
|
|
80
|
-
],
|
|
81
|
-
"related": ["Elevator", "Surface", "getElevationProps", "--effect-shadows"]
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"name": "data-elevation-hover",
|
|
85
|
-
"module": "elevations",
|
|
86
|
-
"values": ["0", "1", "2", "3", "4"],
|
|
87
|
-
"presence": "optional value",
|
|
88
|
-
"effect": "When the active theme sets --effect-shadows, applies a different elevation level on :hover than the resting data-elevation value.",
|
|
89
|
-
"whenToUse": [
|
|
90
|
-
"Interactive surfaces that should lift on hover",
|
|
91
|
-
"Pair with data-elevation for resting and hover shadow levels"
|
|
92
|
-
],
|
|
93
|
-
"whenNotToUse": [
|
|
94
|
-
"When hover elevation is not desired; omit the attribute entirely",
|
|
95
|
-
"When the theme sets --effect-shadows: initial (attr is a no-op for box-shadow)"
|
|
96
|
-
],
|
|
97
|
-
"related": ["Elevator", "getElevationProps", "--effect-shadows"]
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"name": "data-elevation-direction",
|
|
101
|
-
"module": "elevations",
|
|
102
|
-
"values": ["bottom", "top", "left", "right"],
|
|
103
|
-
"presence": "optional; defaults to bottom when data-elevation is present",
|
|
104
|
-
"effect": "When the active theme sets --effect-shadows, casts the shadow downward, upward, to the left, or to the right.",
|
|
105
|
-
"whenToUse": ["Side drawers, top bars, or lateral panels where shadow direction matters"],
|
|
106
|
-
"whenNotToUse": [
|
|
107
|
-
"When default bottom cast is sufficient",
|
|
108
|
-
"When the theme sets --effect-shadows: initial (attr is a no-op for box-shadow)"
|
|
109
|
-
],
|
|
110
|
-
"related": ["Elevator", "getElevationProps", "--effect-shadows"]
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"name": "data-grow",
|
|
114
|
-
"module": "layout",
|
|
115
|
-
"values": ["true", "false"],
|
|
116
|
-
"presence": "optional; omit for default flex growth",
|
|
117
|
-
"effect": "Affects only the element: true sets --vira-flex-grow: 1 and flex-grow: 1; false sets --vira-flex-grow: 0 and flex-grow: 0. Custom props are registered inherits: false so ancestors do not poison nested Stack expandChildren.",
|
|
118
|
-
"whenToUse": [
|
|
119
|
-
"Force grow or opt out on an expandChildren direct child",
|
|
120
|
-
"Fixed-width icons, indicators, or trailing slots (false)"
|
|
121
|
-
],
|
|
122
|
-
"whenNotToUse": [
|
|
123
|
-
"When default flex growth is already correct",
|
|
124
|
-
"Expecting ancestor data-grow to change nested expandChildren children"
|
|
125
|
-
],
|
|
126
|
-
"related": ["Stack", "--vira-flex-grow"]
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"name": "data-shrink",
|
|
130
|
-
"module": "layout",
|
|
131
|
-
"values": ["true", "false"],
|
|
132
|
-
"presence": "optional; omit for default flex shrink",
|
|
133
|
-
"effect": "Affects only the element: true sets --vira-flex-shrink: 1 and flex-shrink: 1; false sets --vira-flex-shrink: 0 and flex-shrink: 0. Custom props are registered inherits: false.",
|
|
134
|
-
"whenToUse": [
|
|
135
|
-
"Force shrink or resist shrink on that flex item",
|
|
136
|
-
"Labels, icons, or controls that must keep intrinsic width (false)"
|
|
137
|
-
],
|
|
138
|
-
"whenNotToUse": [
|
|
139
|
-
"When default flex shrink is already correct",
|
|
140
|
-
"Expecting ancestor data-shrink to change nested flex consumers"
|
|
141
|
-
],
|
|
142
|
-
"related": ["Stack", "--vira-flex-shrink"]
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"name": "data-vibrant",
|
|
146
|
-
"module": "vibrancy",
|
|
147
|
-
"values": ["(boolean presence)"],
|
|
148
|
-
"presence": "boolean attribute; value ignored",
|
|
149
|
-
"effect": "When the active theme sets --effect-vibrancy, applies vibrancy backdrop-filter (brightness/blur/saturate). Surface with data-vibrant translucifies its fill via component CSS: without color, frosted shell from --global-background; with color, 80% tint from --vui-surface-background.",
|
|
150
|
-
"whenToUse": [
|
|
151
|
-
"Glass / frosted panels on Surface or other hosts over busy backgrounds",
|
|
152
|
-
"Match overlay chrome (Dialog/Popover/Menu/Toast) that ships with data-vibrant"
|
|
153
|
-
],
|
|
154
|
-
"whenNotToUse": [
|
|
155
|
-
"When the theme does not expose --effect-vibrancy (attr is a no-op for filters)",
|
|
156
|
-
"Hand-rolling backdrop-filter CSS instead of the documented attr"
|
|
157
|
-
],
|
|
158
|
-
"related": ["Surface", "--effect-vibrancy", "--vibrancy-blur", "--vibrancy-brightness"]
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
"customProperties": [
|
|
162
|
-
{
|
|
163
|
-
"name": "--is-light-mode",
|
|
164
|
-
"module": "themes",
|
|
165
|
-
"setBy": "html root in core.css from contrast-color(var(--global-background))",
|
|
166
|
-
"default": "black",
|
|
167
|
-
"purpose": "Registers the active theme polarity for @container root queries; data-mode=\"inverted\" flips color-scheme against this value."
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
"name": "--shadow-color",
|
|
171
|
-
"module": "elevations",
|
|
172
|
-
"setBy": "inline style or component elevation mapping",
|
|
173
|
-
"default": "oklch(0% 0 0)",
|
|
174
|
-
"purpose": "Shadow tint for data-elevation stacks."
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"name": "--extra-shadow",
|
|
178
|
-
"module": "elevations",
|
|
179
|
-
"setBy": "inline style or component elevation mapping",
|
|
180
|
-
"default": "0 0 0 1px transparent",
|
|
181
|
-
"purpose": "Additional box-shadow layer appended to elevation stacks, for example hairline borders."
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"name": "--elevation-transition-duration",
|
|
185
|
-
"module": "elevations",
|
|
186
|
-
"setBy": "inline style or theme override",
|
|
187
|
-
"default": "160ms",
|
|
188
|
-
"purpose": "Duration for data-elevation box-shadow transitions."
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
"name": "--elevation-transition-easing",
|
|
192
|
-
"module": "elevations",
|
|
193
|
-
"setBy": "inline style or theme override",
|
|
194
|
-
"default": "ease",
|
|
195
|
-
"purpose": "Timing function for data-elevation box-shadow transitions."
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"name": "--vira-flex-grow",
|
|
199
|
-
"module": "layout",
|
|
200
|
-
"setBy": "data-grow=\"true\" or data-grow=\"false\"; registered in global-properties.css",
|
|
201
|
-
"default": "1 (initial-value); inherits: false; Stack expandChildren uses var(--vira-flex-grow, 1)",
|
|
202
|
-
"purpose": "Local grow signal for Stack expandChildren / child flex defaults; does not inherit so ancestor data-grow cannot poison nested stacks."
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"name": "--vira-flex-shrink",
|
|
206
|
-
"module": "layout",
|
|
207
|
-
"setBy": "data-shrink=\"true\" or data-shrink=\"false\"; registered in global-properties.css",
|
|
208
|
-
"default": "1 (initial-value); inherits: false",
|
|
209
|
-
"purpose": "Local shrink signal for flex defaults; does not inherit so ancestor data-shrink cannot poison descendants."
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"name": "--__corner-shape",
|
|
213
|
-
"module": "core",
|
|
214
|
-
"setBy": "ViraUI components on the same element as infinite / pill radius (CSS modules or React style); registered in global-properties.css",
|
|
215
|
-
"default": "guaranteed-invalid (no initial-value); inherits: false; preflight uses var(--__corner-shape, var(--corner-shape))",
|
|
216
|
-
"purpose": "Internal override for the preflight corner-shape gate so infinite radius keeps round pill arcs when --effect-corner-shape is on. Not a consumer data-* or public theme recipe. Consumers must disable corner-shape when using infinite radius."
|
|
217
|
-
}
|
|
218
|
-
],
|
|
219
|
-
"antiPatterns": [
|
|
220
|
-
"Using data-elevation without importing @viraui/react/preflight.css",
|
|
221
|
-
"Fighting data-mode color-scheme rules without documenting a deliberate override",
|
|
222
|
-
"Applying data-no-link-style to prose links that should use the default interactive underline treatment",
|
|
223
|
-
"Inventing backdrop-filter CSS instead of data-vibrant when vibrancy is desired",
|
|
224
|
-
"Inventing box-shadow CSS instead of data-elevation when theme-gated shadows are desired",
|
|
225
|
-
"Shipping a new consumer-facing data-* without updating preflight-surface.json and viraui-design/custom-attributes.md",
|
|
226
|
-
"Relying on ancestor data-grow / data-shrink to control nested Stack expandChildren (props do not inherit)"
|
|
227
|
-
],
|
|
228
|
-
"discovery": {
|
|
229
|
-
"consumption": "@viraui/react/consumption.json",
|
|
230
|
-
"themeSurface": "@viraui/react/theme-surface.json",
|
|
231
|
-
"elevationUtility": "Elevator and getElevationProps from @viraui/react"
|
|
232
|
-
}
|
|
233
|
-
}
|