@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,115 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Surface",
|
|
3
|
-
"structure": "<Surface>…</Surface>",
|
|
4
|
-
"summary": "Presentational container with token background, optional border, radius, and padding; `data-vibrant` frosts the fill even without `color` (page shell via `--global-background`); nested surfaces use radius=\"auto\" for concentric corners; optionally enables a named CSS container query context (`surface`) via `enableContainer`.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Group content with base-level background and contrast border",
|
|
7
|
-
"Frosted glass panels with `data-vibrant` — omit `color` for page-level shell or pass `color` for a tinted fill",
|
|
8
|
-
"Popup or card chrome with optional hover background",
|
|
9
|
-
"Compose with Elevator for animated elevation transitions",
|
|
10
|
-
"Set radius to a token on the outermost Surface that needs rounded corners",
|
|
11
|
-
"Set radius to a four-value tuple [top-left, top-right, bottom-right, bottom-left] when corners need different token radii",
|
|
12
|
-
"Set radius=\"auto\" on a nested Surface when its parent Surface has a radius so each corner subtracts the nearest ancestor padding and stays concentric",
|
|
13
|
-
"Stack nested auto-radius Surfaces recursively; context still resolves through wrapper layout such as Stack",
|
|
14
|
-
"Set overflow=\"hidden\" (or scroll/auto) when Surface must clip or scroll inner content with radius or padding",
|
|
15
|
-
"Style descendants with `@container surface` queries when layout or typography should respond to the Surface's own inline-size instead of the viewport (set `enableContainer` on the Surface you're querying)"
|
|
16
|
-
],
|
|
17
|
-
"whenNotToUse": [
|
|
18
|
-
"Interactive control semantics without an appropriate render root",
|
|
19
|
-
"Expecting hover background on touch-primary devices",
|
|
20
|
-
"Using radius=\"auto\" on the outermost Surface when no ancestor Surface provides a radius context"
|
|
21
|
-
],
|
|
22
|
-
"accessibility": [
|
|
23
|
-
"Surface is presentational — pair with headings or labels so grouped content is discoverable",
|
|
24
|
-
"Choose render roots with correct roles when Surface wraps interactive content",
|
|
25
|
-
"Do not rely on hover-only background changes as the only state indicator"
|
|
26
|
-
],
|
|
27
|
-
"antiPatterns": [
|
|
28
|
-
"Overwriting transition shorthand without composing box-shadow when data-elevation is present",
|
|
29
|
-
"Assuming hoverColor applies on touch devices",
|
|
30
|
-
"Reusing the parent token radius on nested Surfaces instead of radius=\"auto\" when concentric corners are required",
|
|
31
|
-
"Expecting radius=\"auto\" to inherit a token when the nearest ancestor Surface has no radius set",
|
|
32
|
-
"Using viewport media queries when @container surface queries against the rendered Surface inline-size would match the design intent"
|
|
33
|
-
],
|
|
34
|
-
"related": ["Elevator", "Stack"],
|
|
35
|
-
"properties": {
|
|
36
|
-
"react": {
|
|
37
|
-
"border": {
|
|
38
|
-
"description": "Applies the shared contrast border on one or more sides (`all`, `top`, `right`, `bottom`, `left`). Pass a single side or a list (e.g. `[\"bottom\", \"left\"]`). Omit for no border."
|
|
39
|
-
},
|
|
40
|
-
"enableContainer": {
|
|
41
|
-
"description": "Opt-in named CSS container query context for this Surface (enables `container: surface / inline-size` on the root). Required for `@container surface (min-width: ...)` rules to react to this Surface inline-size. Warning: inline-size containment can affect nested layout (e.g. cards inside Masonry). Use only when you need container queries against this specific Surface."
|
|
42
|
-
},
|
|
43
|
-
"borderStyle": {
|
|
44
|
-
"description": "Sets the CSS border style when `border` is set."
|
|
45
|
-
},
|
|
46
|
-
"color": {
|
|
47
|
-
"description": "Sets the resting background using a base ramp layer (`1`–`3`), a literal CSS color value, or the named token `primary` (`data-surface-color=\"primary\"`; CSS owns light/dark opacity via `--global-primary`)."
|
|
48
|
-
},
|
|
49
|
-
"hoverColor": {
|
|
50
|
-
"description": "Sets the hover background on hover-capable pointers using a base ramp layer (`1`–`3`), a literal CSS value, or the named token `primary` (`data-surface-hover-color=\"primary\"`; CSS owns light/dark opacity via `--global-primary`)."
|
|
51
|
-
},
|
|
52
|
-
"hPadding": {
|
|
53
|
-
"description": "Sets inline padding using one token for both sides or a `[start, end]` tuple."
|
|
54
|
-
},
|
|
55
|
-
"overflow": {
|
|
56
|
-
"description": "Sets root overflow through the `--vui-surface-overflow` custom property.",
|
|
57
|
-
"refCss": "overflow"
|
|
58
|
-
},
|
|
59
|
-
"radius": {
|
|
60
|
-
"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."
|
|
61
|
-
},
|
|
62
|
-
"ref": {
|
|
63
|
-
"description": "Ref forwarded to the rendered surface root element."
|
|
64
|
-
},
|
|
65
|
-
"render": {
|
|
66
|
-
"description": "Replaces the default `div` root using Base UI render semantics."
|
|
67
|
-
},
|
|
68
|
-
"vPadding": {
|
|
69
|
-
"description": "Sets block padding using one token for both sides or a `[start, end]` tuple."
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"css": {
|
|
73
|
-
"background": {
|
|
74
|
-
"description": "Resting surface background on the root."
|
|
75
|
-
},
|
|
76
|
-
"background-hover": {
|
|
77
|
-
"description": "Hover surface background on the root."
|
|
78
|
-
},
|
|
79
|
-
"border-radius": {
|
|
80
|
-
"description": "Uniform corner radius when radius is a single token."
|
|
81
|
-
},
|
|
82
|
-
"border-radius-bottom-left": {
|
|
83
|
-
"description": "Bottom-left corner radius; radius tuple or auto resolves per corner."
|
|
84
|
-
},
|
|
85
|
-
"border-radius-bottom-right": {
|
|
86
|
-
"description": "Bottom-right corner radius; radius tuple or auto resolves per corner."
|
|
87
|
-
},
|
|
88
|
-
"border-radius-top-left": {
|
|
89
|
-
"description": "Top-left corner radius; radius tuple or auto resolves per corner."
|
|
90
|
-
},
|
|
91
|
-
"border-radius-top-right": {
|
|
92
|
-
"description": "Top-right corner radius; radius tuple or auto resolves per corner."
|
|
93
|
-
},
|
|
94
|
-
"border-style": {
|
|
95
|
-
"description": "Border style when border is enabled."
|
|
96
|
-
},
|
|
97
|
-
"overflow": {
|
|
98
|
-
"description": "Root overflow behavior.",
|
|
99
|
-
"refReact": "overflow"
|
|
100
|
-
},
|
|
101
|
-
"padding-block-end": {
|
|
102
|
-
"description": "Block-end padding when padding is enabled."
|
|
103
|
-
},
|
|
104
|
-
"padding-block-start": {
|
|
105
|
-
"description": "Block-start padding when padding is enabled."
|
|
106
|
-
},
|
|
107
|
-
"padding-inline-end": {
|
|
108
|
-
"description": "Inline-end padding when padding is enabled."
|
|
109
|
-
},
|
|
110
|
-
"padding-inline-start": {
|
|
111
|
-
"description": "Inline-start padding when padding is enabled."
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Switch",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/switch#api-reference",
|
|
4
|
-
"structure": "<Switch label=\"…\" />",
|
|
5
|
-
"summary": "Field-wrapped toggle control with medium or small track and optional field copy.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Boolean on/off settings with optional label and helper text",
|
|
8
|
-
"Compact small or medium track sizes",
|
|
9
|
-
"Invalid and disabled states with Textfield-parity focus treatment"
|
|
10
|
-
],
|
|
11
|
-
"whenNotToUse": [
|
|
12
|
-
"Unlabeled switch without aria-label on the root",
|
|
13
|
-
"Expecting size or variant beyond medium and small"
|
|
14
|
-
],
|
|
15
|
-
"accessibility": [
|
|
16
|
-
"Provide visible label or aria-label so the switch has an accessible name",
|
|
17
|
-
"Checked state must map to the native switch semantics exposed by the control",
|
|
18
|
-
"Surface invalid state and error copy through the shared field pattern"
|
|
19
|
-
],
|
|
20
|
-
"antiPatterns": [
|
|
21
|
-
"Rendering a switch without label and without aria-label",
|
|
22
|
-
"Expecting description to stay visible when invalid without an error message"
|
|
23
|
-
],
|
|
24
|
-
"related": ["Textfield", "Stack", "Text"],
|
|
25
|
-
"properties": {
|
|
26
|
-
"react": {
|
|
27
|
-
"description": {
|
|
28
|
-
"description": "Helper copy rendered with `Field.Description` and `Text` while the field is valid."
|
|
29
|
-
},
|
|
30
|
-
"error": {
|
|
31
|
-
"description": "Error copy rendered with `Field.Error` and `Text` in the same slot as `description`. Replaces description while the field is invalid and dirty."
|
|
32
|
-
},
|
|
33
|
-
"hPadding": {
|
|
34
|
-
"description": "Sets inline padding using one token for both sides or a `[start, end]` tuple."
|
|
35
|
-
},
|
|
36
|
-
"label": {
|
|
37
|
-
"description": "Visible label rendered with shared internal `FieldLabel`."
|
|
38
|
-
},
|
|
39
|
-
"size": {
|
|
40
|
-
"description": "Controls the visual switch size.",
|
|
41
|
-
"refCss": "track-block-size"
|
|
42
|
-
},
|
|
43
|
-
"vPadding": {
|
|
44
|
-
"description": "Sets block padding using one token for both sides or a `[start, end]` tuple."
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"css": {
|
|
48
|
-
"thumb-background": {
|
|
49
|
-
"description": "Switch thumb background color."
|
|
50
|
-
},
|
|
51
|
-
"thumb-inset": {
|
|
52
|
-
"description": "Inset between thumb and track edges."
|
|
53
|
-
},
|
|
54
|
-
"thumb-size": {
|
|
55
|
-
"description": "Switch thumb size derived from track block size.",
|
|
56
|
-
"refReact": "size"
|
|
57
|
-
},
|
|
58
|
-
"track-background": {
|
|
59
|
-
"description": "Switch track background color."
|
|
60
|
-
},
|
|
61
|
-
"track-block-size": {
|
|
62
|
-
"description": "Switch track block size; size presets adjust track and thumb.",
|
|
63
|
-
"refReact": "size"
|
|
64
|
-
},
|
|
65
|
-
"track-radius": {
|
|
66
|
-
"description": "Switch track corner radius.",
|
|
67
|
-
"refReact": "size"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Tabs",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/tabs#api-reference",
|
|
4
|
-
"structure": "<Tabs>\n <Tabs.List>\n <Tabs.Tab value=\"a\">…</Tabs.Tab>\n </Tabs.List>\n <Tabs.Viewport>\n <Tabs.Panel value=\"a\">…</Tabs.Panel>\n </Tabs.Viewport>\n</Tabs>",
|
|
5
|
-
"summary": "Compound segmented tab control with Surface list chrome, moving indicator, and animated panels.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Switching between related views in the same surface",
|
|
8
|
-
"Compact horizontal segmented navigation",
|
|
9
|
-
"Decorative start/end addons on tab labels without changing accessible names"
|
|
10
|
-
],
|
|
11
|
-
"whenNotToUse": [
|
|
12
|
-
"Primary app navigation that should use links or routes directly",
|
|
13
|
-
"Vertical tab layouts in v1 styled targets"
|
|
14
|
-
],
|
|
15
|
-
"accessibility": [
|
|
16
|
-
"Keep tab labels as visible text; addons are decorative and aria-hidden",
|
|
17
|
-
"Ensure each `Tabs.Panel` value matches a `Tabs.Tab` value",
|
|
18
|
-
"Disabled items cannot be activated through pointer or keyboard"
|
|
19
|
-
],
|
|
20
|
-
"antiPatterns": [
|
|
21
|
-
"Using addons as the only visible label for a tab",
|
|
22
|
-
"Trying to compose a separate public `Tabs.Indicator`; the indicator is owned by `Tabs.List`"
|
|
23
|
-
],
|
|
24
|
-
"related": ["Surface", "Stack", "Text"],
|
|
25
|
-
"properties": {
|
|
26
|
-
"react": {
|
|
27
|
-
"listAlignment": {
|
|
28
|
-
"description": "Horizontal alignment of tab list within root Stack."
|
|
29
|
-
},
|
|
30
|
-
"Tab.addon": {
|
|
31
|
-
"description": "Decorative addon rendered alongside the tab label."
|
|
32
|
-
},
|
|
33
|
-
"Tab.addonPosition": {
|
|
34
|
-
"description": "Controls whether the addon appears before or after the label."
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"css": {
|
|
38
|
-
"translate-amount": {
|
|
39
|
-
"description": "Panel entry translate distance for tab transitions."
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Text",
|
|
3
|
-
"structure": "<Text>…</Text>",
|
|
4
|
-
"summary": "Theme-aware body-copy primitive with tone, family, and responsive body sizing.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Body copy with semantic tone (including brand `primary`) and token-backed typography",
|
|
7
|
-
"Helper, label, or inline copy inside other components",
|
|
8
|
-
"Mono or body family text with fluid clamp sizing"
|
|
9
|
-
],
|
|
10
|
-
"whenNotToUse": [
|
|
11
|
-
"Headings or display typography — use Title",
|
|
12
|
-
"Heading semantics without an appropriate render root"
|
|
13
|
-
],
|
|
14
|
-
"accessibility": [
|
|
15
|
-
"Use Text for body copy; do not substitute for heading elements in the document outline",
|
|
16
|
-
"Semantic tone supports meaning but does not replace explicit labels on controls",
|
|
17
|
-
"Choose render when the copy must live on a specific inline or block element"
|
|
18
|
-
],
|
|
19
|
-
"antiPatterns": ["Using Text for headings instead of Title"],
|
|
20
|
-
"related": ["Title", "ClampText"],
|
|
21
|
-
"properties": {
|
|
22
|
-
"react": {
|
|
23
|
-
"align": {
|
|
24
|
-
"description": "Aligns text using logical alignment values.",
|
|
25
|
-
"refCss": "align"
|
|
26
|
-
},
|
|
27
|
-
"balanced": {
|
|
28
|
-
"description": "Enables balanced wrapping for block-like copy."
|
|
29
|
-
},
|
|
30
|
-
"color": {
|
|
31
|
-
"description": "Applies a literal color escape hatch when semantic `tone` is not used."
|
|
32
|
-
},
|
|
33
|
-
"family": {
|
|
34
|
-
"description": "Selects the semantic font family for body copy and inline code-like text."
|
|
35
|
-
},
|
|
36
|
-
"fontWidth": {
|
|
37
|
-
"description": "Overrides font width as a percentage (100 = normal); maps to `font-stretch` and `wdth`."
|
|
38
|
-
},
|
|
39
|
-
"hPadding": {
|
|
40
|
-
"description": "Sets inline padding using one token for both sides or a `[start, end]` tuple."
|
|
41
|
-
},
|
|
42
|
-
"lineHeight": {
|
|
43
|
-
"description": "Controls line height through foundation leading tokens."
|
|
44
|
-
},
|
|
45
|
-
"maxWidth": {
|
|
46
|
-
"description": "Constrains the maximum inline size of the rendered text block."
|
|
47
|
-
},
|
|
48
|
-
"opticalSize": {
|
|
49
|
-
"description": "Overrides the optical size (`opsz`) axis on variable fonts; static fonts keep `font-optical-sizing: auto`."
|
|
50
|
-
},
|
|
51
|
-
"ref": {
|
|
52
|
-
"description": "Ref forwarded to the rendered text root element."
|
|
53
|
-
},
|
|
54
|
-
"render": {
|
|
55
|
-
"description": "Replaces the default `span` root using Base UI render semantics."
|
|
56
|
-
},
|
|
57
|
-
"selection": {
|
|
58
|
-
"description": "Enables text selection on the rendered copy."
|
|
59
|
-
},
|
|
60
|
-
"size": {
|
|
61
|
-
"description": "Selects a semantic body typography size from the active theme scale."
|
|
62
|
-
},
|
|
63
|
-
"tone": {
|
|
64
|
-
"description": "Sets the semantic text color role when no literal `color` override is used. `default` inherits; `primary` → `--global-primary`; `muted` → `--global-muted`; `interactive` → `--global-interactive-text`; `positive` / `informative` / `danger` / `warning` → `--highlight-green` / `--highlight-blue` / `--highlight-red` / `--highlight-yellow`."
|
|
65
|
-
},
|
|
66
|
-
"tracking": {
|
|
67
|
-
"description": "Sets letter spacing on the rendered copy.",
|
|
68
|
-
"refCss": "letter-spacing"
|
|
69
|
-
},
|
|
70
|
-
"transform": {
|
|
71
|
-
"description": "Applies a text-transform on the rendered copy.",
|
|
72
|
-
"refCss": "text-transform"
|
|
73
|
-
},
|
|
74
|
-
"trim": {
|
|
75
|
-
"description": "Trims text box whitespace at the chosen edge when the browser supports `text-box`. Pass `false` to disable text-box trim.",
|
|
76
|
-
"refCss": "trim"
|
|
77
|
-
},
|
|
78
|
-
"trimType": {
|
|
79
|
-
"description": "Selects the `text-box` trim basis when `trim` is active."
|
|
80
|
-
},
|
|
81
|
-
"vPadding": {
|
|
82
|
-
"description": "Sets block padding using one token for both sides or a `[start, end]` tuple."
|
|
83
|
-
},
|
|
84
|
-
"weight": {
|
|
85
|
-
"description": "Selects a semantic weight keyword or a numeric weight (`font-weight` + `wght` axis)."
|
|
86
|
-
},
|
|
87
|
-
"whiteSpace": {
|
|
88
|
-
"description": "Controls white-space preservation and wrapping behavior."
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"css": {
|
|
92
|
-
"align": {
|
|
93
|
-
"description": "Text alignment on the root.",
|
|
94
|
-
"refReact": "align"
|
|
95
|
-
},
|
|
96
|
-
"font-family": {
|
|
97
|
-
"description": "Font family; family prop presets via data attributes."
|
|
98
|
-
},
|
|
99
|
-
"font-opsz": {
|
|
100
|
-
"description": "Optical size axis on the root (variable fonts)."
|
|
101
|
-
},
|
|
102
|
-
"font-size": {
|
|
103
|
-
"description": "Body font size; size prop presets via data attributes."
|
|
104
|
-
},
|
|
105
|
-
"font-weight": {
|
|
106
|
-
"description": "Font weight on the root; keyword presets or numeric via weight prop."
|
|
107
|
-
},
|
|
108
|
-
"font-width": {
|
|
109
|
-
"description": "Font width percentage on the root (font-stretch + wdth)."
|
|
110
|
-
},
|
|
111
|
-
"line-height": {
|
|
112
|
-
"description": "Line height; lineHeight prop presets via data attributes."
|
|
113
|
-
},
|
|
114
|
-
"letter-spacing": {
|
|
115
|
-
"description": "Letter spacing on the root.",
|
|
116
|
-
"refReact": "tracking"
|
|
117
|
-
},
|
|
118
|
-
"literal-color": {
|
|
119
|
-
"description": "Literal color override on the root."
|
|
120
|
-
},
|
|
121
|
-
"max-width": {
|
|
122
|
-
"description": "Max inline size of the text root."
|
|
123
|
-
},
|
|
124
|
-
"padding-block-end": {
|
|
125
|
-
"description": "Block-end padding when padding is enabled."
|
|
126
|
-
},
|
|
127
|
-
"padding-block-start": {
|
|
128
|
-
"description": "Block-start padding when padding is enabled."
|
|
129
|
-
},
|
|
130
|
-
"padding-inline-end": {
|
|
131
|
-
"description": "Inline-end padding when padding is enabled."
|
|
132
|
-
},
|
|
133
|
-
"padding-inline-start": {
|
|
134
|
-
"description": "Inline-start padding when padding is enabled."
|
|
135
|
-
},
|
|
136
|
-
"trim": {
|
|
137
|
-
"description": "Text-box trim mode on the root.",
|
|
138
|
-
"refReact": "trim"
|
|
139
|
-
},
|
|
140
|
-
"trim-type": {
|
|
141
|
-
"description": "Text-box trim basis on the root."
|
|
142
|
-
},
|
|
143
|
-
"text-transform": {
|
|
144
|
-
"description": "Text transform on the root.",
|
|
145
|
-
"refReact": "transform"
|
|
146
|
-
},
|
|
147
|
-
"white-space": {
|
|
148
|
-
"description": "White-space behavior on the root."
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Textarea",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/field#api-reference",
|
|
4
|
-
"structure": "<Textarea />",
|
|
5
|
-
"summary": "Multi-line field control with shared field copy, optional resize, and optional content sizing.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Multi-line text entry with label, description, and error",
|
|
8
|
-
"Optional native CSS resize (vertical, horizontal, both, and other valid resize values)",
|
|
9
|
-
"Content-sized growth via fitContent",
|
|
10
|
-
"Native textarea attributes through the field control",
|
|
11
|
-
"One or more Textareas inside Fieldset when they belong to a labeled form section with other fields"
|
|
12
|
-
],
|
|
13
|
-
"whenNotToUse": [
|
|
14
|
-
"Single-line input — use Textfield",
|
|
15
|
-
"Addon slots like Textfield startAddon or endAddon",
|
|
16
|
-
"Wrapping a lone Textarea in Fieldset when its own label is sufficient"
|
|
17
|
-
],
|
|
18
|
-
"accessibility": [
|
|
19
|
-
"Associate label with the textarea through the field label pattern",
|
|
20
|
-
"Expose validation and helper copy through description and error slots",
|
|
21
|
-
"Prefer resize modes that do not hide required content from keyboard users"
|
|
22
|
-
],
|
|
23
|
-
"antiPatterns": ["Using Textarea for single-line values", "Expecting unsupported size or variant props"],
|
|
24
|
-
"related": ["Fieldset", "Textfield", "Text"],
|
|
25
|
-
"properties": {
|
|
26
|
-
"react": {
|
|
27
|
-
"description": {
|
|
28
|
-
"description": "Helper copy rendered with `Field.Description` and `Text` while the field is valid."
|
|
29
|
-
},
|
|
30
|
-
"error": {
|
|
31
|
-
"description": "Error copy rendered with `Field.Error` and `Text` in the same slot as `description`. Replaces description while the field is invalid and dirty. Validation messages from `validate` are shown by `Field.Error` even when this prop is omitted (also requires dirty)."
|
|
32
|
-
},
|
|
33
|
-
"fitContent": {
|
|
34
|
-
"description": "When `true`, sets `field-sizing: content` so the control grows with its value. Still respects `min-block-size` and `resize`. Omitted / `false` keeps the browser fixed default."
|
|
35
|
-
},
|
|
36
|
-
"label": {
|
|
37
|
-
"description": "Visible label rendered with shared internal `FieldLabel`."
|
|
38
|
-
},
|
|
39
|
-
"resize": {
|
|
40
|
-
"description": "Native CSS `resize` for the control, serialized to `data-resize`. Omitted keeps resize disabled (`none`); accepts any valid `CSSProperties['resize']` value such as `\"vertical\"`, `\"horizontal\"`, or `\"both\"`."
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"css": {
|
|
44
|
-
"input-border-radius": {
|
|
45
|
-
"description": "Corner radius for the BasicInput textarea control (also drives field label/description inline padding)."
|
|
46
|
-
},
|
|
47
|
-
"min-block-size": {
|
|
48
|
-
"description": "Minimum block size of the BasicInput textarea control."
|
|
49
|
-
},
|
|
50
|
-
"padding-block": {
|
|
51
|
-
"description": "Block padding on the BasicInput textarea control."
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Textfield",
|
|
3
|
-
"baseUIApi": "https://base-ui.com/react/components/input#api-reference",
|
|
4
|
-
"structure": "<Textfield />",
|
|
5
|
-
"summary": "Single-line field input with control-group chrome and optional addons.",
|
|
6
|
-
"whenToUse": [
|
|
7
|
-
"Single-line text, email, password, or similar native input types",
|
|
8
|
-
"Start or end addon slots inside the shared control group",
|
|
9
|
-
"Label, description, and error copy with validation states",
|
|
10
|
-
"Several related Textfields grouped under one section legend as Fieldset children (e.g. billing details)"
|
|
11
|
-
],
|
|
12
|
-
"whenNotToUse": [
|
|
13
|
-
"Multi-line entry — use Textarea",
|
|
14
|
-
"Custom size or variant props — fixed medium treatment",
|
|
15
|
-
"Wrapping a lone Textfield in Fieldset when its own label is sufficient — Fieldset is for multi-field sections or shared legends",
|
|
16
|
-
"Using Fieldset instead of the Textfield label for a single control"
|
|
17
|
-
],
|
|
18
|
-
"accessibility": [
|
|
19
|
-
"Associate label with the input through the field label pattern",
|
|
20
|
-
"Surface validation errors in the shared description slot or Field.Error",
|
|
21
|
-
"Addon buttons must keep type=\"button\" and their own accessible names"
|
|
22
|
-
],
|
|
23
|
-
"antiPatterns": [
|
|
24
|
-
"Passing unsupported size or variant props",
|
|
25
|
-
"Expecting a focus ring when focus is only on addon controls"
|
|
26
|
-
],
|
|
27
|
-
"related": ["Autocomplete", "Fieldset", "Textarea", "Select", "Text"],
|
|
28
|
-
"properties": {
|
|
29
|
-
"react": {
|
|
30
|
-
"description": {
|
|
31
|
-
"description": "Helper copy rendered with `Field.Description` and `Text` while the field is valid."
|
|
32
|
-
},
|
|
33
|
-
"endAddon": {
|
|
34
|
-
"description": "Trailing decoration (icon, button). Buttons must use `type=\"button\"`."
|
|
35
|
-
},
|
|
36
|
-
"error": {
|
|
37
|
-
"description": "Error copy rendered with `Field.Error` and `Text` in the same slot as `description`. Replaces description while the field is invalid and dirty. Validation messages from `validate` are shown by `Field.Error` even when this prop is omitted (also requires dirty)."
|
|
38
|
-
},
|
|
39
|
-
"fitContent": {
|
|
40
|
-
"description": "When `true`, sets `field-sizing: content` so the control grows inline with its value. Block chrome stays `var(--vui-textfield-input-height)`. Omitted / `false` keeps the browser fixed default."
|
|
41
|
-
},
|
|
42
|
-
"fullWidth": {
|
|
43
|
-
"description": "When `true`, root and control group take `inline-size: 100%`."
|
|
44
|
-
},
|
|
45
|
-
"label": {
|
|
46
|
-
"description": "Visible label rendered with shared internal `FieldLabel`."
|
|
47
|
-
},
|
|
48
|
-
"startAddon": {
|
|
49
|
-
"description": "Leading decoration (prefix text, icon). Not a second field control."
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"css": {
|
|
53
|
-
"control-group-background": {
|
|
54
|
-
"description": "Textfield control group background."
|
|
55
|
-
},
|
|
56
|
-
"control-group-border-color": {
|
|
57
|
-
"description": "Textfield control group border color."
|
|
58
|
-
},
|
|
59
|
-
"control-group-border-radius": {
|
|
60
|
-
"description": "Textfield control group corner radius."
|
|
61
|
-
},
|
|
62
|
-
"control-group-color": {
|
|
63
|
-
"description": "Textfield control group foreground color."
|
|
64
|
-
},
|
|
65
|
-
"input-height": {
|
|
66
|
-
"description": "Textfield control group block size."
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Title",
|
|
3
|
-
"structure": "<Title>…</Title>",
|
|
4
|
-
"summary": "Theme-aware heading and display typography primitive.",
|
|
5
|
-
"whenToUse": [
|
|
6
|
-
"Headings and display text with title presets",
|
|
7
|
-
"Semantic heading tags chosen explicitly through render",
|
|
8
|
-
"Size and render paired together for most heading use cases",
|
|
9
|
-
"Fluid clamp sizing across title appearance presets"
|
|
10
|
-
],
|
|
11
|
-
"whenNotToUse": ["Body copy — use Text", "Body or mono family typography"],
|
|
12
|
-
"accessibility": [
|
|
13
|
-
"Title renders a span by default, so choose render to match the correct heading level for the page outline",
|
|
14
|
-
"Visual size presets do not replace picking the right h1–h6 element",
|
|
15
|
-
"Use size for appearance and render for semantics; pair them unless you intentionally need a visual mismatch",
|
|
16
|
-
"Keep heading hierarchy sequential; do not skip outline levels for styling alone"
|
|
17
|
-
],
|
|
18
|
-
"antiPatterns": [
|
|
19
|
-
"Assuming size changes the HTML tag automatically",
|
|
20
|
-
"Letting size force the HTML tag instead of choosing render explicitly",
|
|
21
|
-
"Using Title for long body paragraphs"
|
|
22
|
-
],
|
|
23
|
-
"related": ["Text", "ClampText"],
|
|
24
|
-
"properties": {
|
|
25
|
-
"react": {
|
|
26
|
-
"align": {
|
|
27
|
-
"description": "Aligns text using logical alignment values.",
|
|
28
|
-
"refCss": "align"
|
|
29
|
-
},
|
|
30
|
-
"balanced": {
|
|
31
|
-
"description": "Enables balanced wrapping for block-like titles."
|
|
32
|
-
},
|
|
33
|
-
"color": {
|
|
34
|
-
"description": "Applies a literal color escape hatch."
|
|
35
|
-
},
|
|
36
|
-
"fontWidth": {
|
|
37
|
-
"description": "Overrides font width as a percentage (100 = normal); maps to `font-stretch` and `wdth`."
|
|
38
|
-
},
|
|
39
|
-
"hPadding": {
|
|
40
|
-
"description": "Sets inline padding using one token for both sides or a `[start, end]` tuple."
|
|
41
|
-
},
|
|
42
|
-
"lineHeight": {
|
|
43
|
-
"description": "Controls line height through foundation leading tokens."
|
|
44
|
-
},
|
|
45
|
-
"maxWidth": {
|
|
46
|
-
"description": "Constrains the maximum inline size of the rendered text block."
|
|
47
|
-
},
|
|
48
|
-
"opticalSize": {
|
|
49
|
-
"description": "Overrides the optical size (`opsz`) axis on variable fonts; static fonts keep `font-optical-sizing: auto`."
|
|
50
|
-
},
|
|
51
|
-
"ref": {
|
|
52
|
-
"description": "Ref forwarded to the rendered title root element."
|
|
53
|
-
},
|
|
54
|
-
"render": {
|
|
55
|
-
"description": "Replaces the default `span` root using Base UI render semantics. Pair this with `size` for most headings so DOM semantics and visual preset stay intentionally aligned."
|
|
56
|
-
},
|
|
57
|
-
"selection": {
|
|
58
|
-
"description": "Enables text selection on the rendered copy."
|
|
59
|
-
},
|
|
60
|
-
"size": {
|
|
61
|
-
"description": "Selects a heading or display typography preset from the active theme scale. This controls only the visual preset. Semantic heading choice remains owned by `render`, because `Title` keeps a `span` root unless `render` replaces it."
|
|
62
|
-
},
|
|
63
|
-
"tracking": {
|
|
64
|
-
"description": "Sets letter spacing on the rendered copy. Overrides size preset letter-spacing when set.",
|
|
65
|
-
"refCss": "letter-spacing"
|
|
66
|
-
},
|
|
67
|
-
"transform": {
|
|
68
|
-
"description": "Applies a text-transform on the rendered copy.",
|
|
69
|
-
"refCss": "text-transform"
|
|
70
|
-
},
|
|
71
|
-
"trim": {
|
|
72
|
-
"description": "Trims text box whitespace at the chosen edge when the browser supports `text-box`. Pass `false` to disable text-box trim.",
|
|
73
|
-
"refCss": "trim"
|
|
74
|
-
},
|
|
75
|
-
"trimType": {
|
|
76
|
-
"description": "Selects the `text-box` trim basis when `trim` is active."
|
|
77
|
-
},
|
|
78
|
-
"vPadding": {
|
|
79
|
-
"description": "Sets block padding using one token for both sides or a `[start, end]` tuple."
|
|
80
|
-
},
|
|
81
|
-
"weight": {
|
|
82
|
-
"description": "Overrides the size preset weight (`font-weight` + `wght` axis)."
|
|
83
|
-
},
|
|
84
|
-
"whiteSpace": {
|
|
85
|
-
"description": "Controls white-space preservation and wrapping behavior."
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
"css": {
|
|
89
|
-
"align": {
|
|
90
|
-
"description": "Title alignment on the root.",
|
|
91
|
-
"refReact": "align"
|
|
92
|
-
},
|
|
93
|
-
"font-family": {
|
|
94
|
-
"description": "Heading font family on the root."
|
|
95
|
-
},
|
|
96
|
-
"font-opsz": {
|
|
97
|
-
"description": "Optical size axis on the root (variable fonts)."
|
|
98
|
-
},
|
|
99
|
-
"font-size": {
|
|
100
|
-
"description": "Heading font size; size prop presets via data attributes."
|
|
101
|
-
},
|
|
102
|
-
"font-weight": {
|
|
103
|
-
"description": "Font weight on the root."
|
|
104
|
-
},
|
|
105
|
-
"font-width": {
|
|
106
|
-
"description": "Font width percentage on the root (font-stretch + wdth)."
|
|
107
|
-
},
|
|
108
|
-
"letter-spacing": {
|
|
109
|
-
"description": "Public letter spacing from the `tracking` prop when set.",
|
|
110
|
-
"refReact": "tracking"
|
|
111
|
-
},
|
|
112
|
-
"line-height": {
|
|
113
|
-
"description": "Line height; lineHeight prop presets via data attributes."
|
|
114
|
-
},
|
|
115
|
-
"literal-color": {
|
|
116
|
-
"description": "Literal color override on the root."
|
|
117
|
-
},
|
|
118
|
-
"max-width": {
|
|
119
|
-
"description": "Max inline size of the title root."
|
|
120
|
-
},
|
|
121
|
-
"padding-block-end": {
|
|
122
|
-
"description": "Block-end padding when padding is enabled."
|
|
123
|
-
},
|
|
124
|
-
"padding-block-start": {
|
|
125
|
-
"description": "Block-start padding when padding is enabled."
|
|
126
|
-
},
|
|
127
|
-
"padding-inline-end": {
|
|
128
|
-
"description": "Inline-end padding when padding is enabled."
|
|
129
|
-
},
|
|
130
|
-
"padding-inline-start": {
|
|
131
|
-
"description": "Inline-start padding when padding is enabled."
|
|
132
|
-
},
|
|
133
|
-
"trim": {
|
|
134
|
-
"description": "Text-box trim mode on the root.",
|
|
135
|
-
"refReact": "trim"
|
|
136
|
-
},
|
|
137
|
-
"trim-type": {
|
|
138
|
-
"description": "Text-box trim basis on the root."
|
|
139
|
-
},
|
|
140
|
-
"text-transform": {
|
|
141
|
-
"description": "Text transform on the root.",
|
|
142
|
-
"refReact": "transform"
|
|
143
|
-
},
|
|
144
|
-
"white-space": {
|
|
145
|
-
"description": "White-space behavior on the root."
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|