luxen-ui 0.24.0 → 0.26.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/README.md +1 -0
- package/bin/cli.mjs +16 -1
- package/cdn/custom-elements.json +295 -169
- package/cdn/elements/alert-dialog/alert-dialog.d.ts +3 -2
- package/cdn/elements/alert-dialog/alert-dialog.d.ts.map +1 -1
- package/cdn/elements/alert-dialog/alert-dialog.js.map +1 -1
- package/cdn/elements/avatar/avatar.js +1 -1
- package/cdn/elements/avatar/avatar.js.map +1 -1
- package/cdn/elements/carousel/carousel.js +1 -1
- package/cdn/elements/carousel/carousel.js.map +1 -1
- package/cdn/elements/combobox/combobox.d.ts.map +1 -1
- package/cdn/elements/combobox/combobox.js +2 -1
- package/cdn/elements/combobox/combobox.js.map +1 -1
- package/cdn/elements/dialog/dialog.d.ts +2 -1
- package/cdn/elements/dialog/dialog.d.ts.map +1 -1
- package/cdn/elements/dialog/dialog.js.map +1 -1
- package/cdn/elements/dialog/dialog.styles.js +1 -1
- package/cdn/elements/dialog/dialog.styles.js.map +1 -1
- package/cdn/elements/drawer/drawer.d.ts +7 -7
- package/cdn/elements/drawer/drawer.js +1 -1
- package/cdn/elements/drawer/drawer.js.map +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.js +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.js.map +1 -1
- package/cdn/elements/input-otp/input-otp.d.ts +2 -2
- package/cdn/elements/input-otp/input-otp.js.map +1 -1
- package/cdn/elements/prose-editor/prose-editor.js +1 -1
- package/cdn/elements/prose-editor/prose-editor.js.map +1 -1
- package/cdn/elements/rating/rating.js +1 -1
- package/cdn/elements/rating/rating.js.map +1 -1
- package/cdn/elements/select/select.d.ts.map +1 -1
- package/cdn/elements/select/select.js +2 -1
- package/cdn/elements/select/select.js.map +1 -1
- package/cdn/elements/slider/slider.js +1 -1
- package/cdn/elements/slider/slider.js.map +1 -1
- package/cdn/elements/stories-viewer/stories-viewer.js +1 -1
- package/cdn/elements/stories-viewer/stories-viewer.js.map +1 -1
- package/cdn/elements/table/table.meta.d.ts +55 -0
- package/cdn/elements/table/table.meta.d.ts.map +1 -0
- package/cdn/elements/table/table.meta.js +0 -0
- package/cdn/elements/tag/tag.js +1 -1
- package/cdn/elements/tag/tag.js.map +1 -1
- package/cdn/elements/tree/tree.js +1 -1
- package/cdn/elements/tree/tree.js.map +1 -1
- package/cdn/elements/tree-item/tree-item.js +1 -1
- package/cdn/elements/tree-item/tree-item.js.map +1 -1
- package/cdn/shared/controllers/listbox-nav.d.ts +7 -0
- package/cdn/shared/controllers/listbox-nav.d.ts.map +1 -1
- package/cdn/shared/controllers/listbox-nav.js +1 -1
- package/cdn/shared/controllers/listbox-nav.js.map +1 -1
- package/cdn/shared/styles/button-core.styles.js +1 -1
- package/cdn/shared/styles/button-core.styles.js.map +1 -1
- package/cdn/shared/styles/checkbox-appearance.styles.js +1 -1
- package/cdn/shared/styles/checkbox-appearance.styles.js.map +1 -1
- package/cdn/shared/styles/picker-core.styles.js +1 -1
- package/cdn/shared/styles/picker-core.styles.js.map +1 -1
- package/cdn/standalone.css +392 -86
- package/cdn/standalone.js +38 -28
- package/cdn/standalone.js.map +1 -1
- package/cdn/styles/base.css +11 -0
- package/cdn/styles/elements/breadcrumb.css +2 -2
- package/cdn/styles/elements/button.css +2 -2
- package/cdn/styles/elements/checkbox.css +2 -2
- package/cdn/styles/elements/close-button/circle.css +2 -2
- package/cdn/styles/elements/close-button/ring.css +2 -2
- package/cdn/styles/elements/close-button/square.css +2 -2
- package/cdn/styles/elements/disclosure.css +2 -2
- package/cdn/styles/elements/input-otp.css +20 -4
- package/cdn/styles/elements/input-stepper/default.css +2 -2
- package/cdn/styles/elements/input-stepper/pill.css +2 -2
- package/cdn/styles/elements/input-stepper/rounded.css +2 -2
- package/cdn/styles/elements/input.css +50 -17
- package/cdn/styles/elements/prose-editor.css +26 -11
- package/cdn/styles/elements/radio-group.css +2 -2
- package/cdn/styles/elements/radio.css +2 -2
- package/cdn/styles/elements/segmented-control.css +2 -2
- package/cdn/styles/elements/select.css +26 -5
- package/cdn/styles/elements/story.css +2 -2
- package/cdn/styles/elements/switch.css +2 -2
- package/cdn/styles/elements/table.css +186 -0
- package/cdn/styles/elements/tabs/enclosed.css +4 -4
- package/cdn/styles/elements/tabs/line.css +4 -4
- package/cdn/styles/elements/textarea.css +23 -9
- package/cdn/styles/preset.css +21 -2
- package/cdn/styles/tokens/aliases.css +6 -2
- package/cdn/styles/tokens/forms.css +4 -0
- package/cdn/styles/tokens.css +10 -2
- package/dist/css/base.css +11 -0
- package/dist/css/elements/breadcrumb.css +2 -2
- package/dist/css/elements/button.css +2 -2
- package/dist/css/elements/checkbox.css +2 -2
- package/dist/css/elements/close-button/circle.css +2 -2
- package/dist/css/elements/close-button/ring.css +2 -2
- package/dist/css/elements/close-button/square.css +2 -2
- package/dist/css/elements/disclosure.css +2 -2
- package/dist/css/elements/input-otp.css +20 -4
- package/dist/css/elements/input-stepper/default.css +2 -2
- package/dist/css/elements/input-stepper/pill.css +2 -2
- package/dist/css/elements/input-stepper/rounded.css +2 -2
- package/dist/css/elements/input.css +50 -17
- package/dist/css/elements/prose-editor.css +26 -11
- package/dist/css/elements/radio-group.css +2 -2
- package/dist/css/elements/radio.css +2 -2
- package/dist/css/elements/segmented-control.css +2 -2
- package/dist/css/elements/select.css +26 -5
- package/dist/css/elements/story.css +2 -2
- package/dist/css/elements/switch.css +2 -2
- package/dist/css/elements/table.css +186 -0
- package/dist/css/elements/tabs/enclosed.css +4 -4
- package/dist/css/elements/tabs/line.css +4 -4
- package/dist/css/elements/textarea.css +23 -9
- package/dist/css/preset.css +21 -2
- package/dist/css/tokens/aliases.css +6 -2
- package/dist/css/tokens/forms.css +4 -0
- package/dist/css/tokens.css +10 -2
- package/dist/custom-elements.json +295 -169
- package/dist/elements/alert-dialog/alert-dialog.d.ts +3 -2
- package/dist/elements/alert-dialog/alert-dialog.d.ts.map +1 -1
- package/dist/elements/alert-dialog/alert-dialog.js +3 -2
- package/dist/elements/avatar/avatar.css +2 -2
- package/dist/elements/carousel/carousel.css +18 -0
- package/dist/elements/combobox/combobox.css +9 -0
- package/dist/elements/combobox/combobox.d.ts.map +1 -1
- package/dist/elements/combobox/combobox.js +1 -0
- package/dist/elements/dialog/dialog.css +12 -0
- package/dist/elements/dialog/dialog.d.ts +2 -1
- package/dist/elements/dialog/dialog.d.ts.map +1 -1
- package/dist/elements/dialog/dialog.js +2 -1
- package/dist/elements/drawer/drawer.css +11 -1
- package/dist/elements/drawer/drawer.d.ts +7 -7
- package/dist/elements/drawer/drawer.js +7 -7
- package/dist/elements/dropdown-item/dropdown-item.css +5 -4
- package/dist/elements/input-otp/input-otp.d.ts +2 -2
- package/dist/elements/input-otp/input-otp.js +2 -2
- package/dist/elements/prose-editor/prose-editor.css +5 -3
- package/dist/elements/rating/rating.css +9 -10
- package/dist/elements/select/select.css +10 -9
- package/dist/elements/select/select.d.ts.map +1 -1
- package/dist/elements/select/select.js +1 -0
- package/dist/elements/slider/slider.css +5 -1
- package/dist/elements/stories-viewer/stories-viewer.css +10 -2
- package/dist/elements/table/table.meta.d.ts +55 -0
- package/dist/elements/table/table.meta.d.ts.map +1 -0
- package/dist/elements/table/table.meta.js +65 -0
- package/dist/elements/tag/tag.css +4 -4
- package/dist/elements/tree/tree.css +3 -3
- package/dist/elements/tree-item/tree-item.css +5 -3
- package/dist/metadata/alert-dialog.json +90 -85
- package/dist/metadata/alert.json +22 -22
- package/dist/metadata/avatar.json +26 -26
- package/dist/metadata/badge.json +13 -13
- package/dist/metadata/breadcrumb.json +9 -9
- package/dist/metadata/button.json +40 -40
- package/dist/metadata/carousel.json +133 -133
- package/dist/metadata/checkbox.json +13 -13
- package/dist/metadata/close-button.json +15 -15
- package/dist/metadata/color-scheme-icon.json +13 -13
- package/dist/metadata/combobox.json +77 -94
- package/dist/metadata/dialog.json +49 -44
- package/dist/metadata/disclosure.json +17 -17
- package/dist/metadata/divider.json +12 -12
- package/dist/metadata/drawer.json +61 -61
- package/dist/metadata/dropdown-item.json +50 -50
- package/dist/metadata/dropdown.json +32 -32
- package/dist/metadata/form-field.json +15 -15
- package/dist/metadata/icon.json +8 -8
- package/dist/metadata/index.json +1761 -1765
- package/dist/metadata/input-group.json +5 -5
- package/dist/metadata/input-otp.json +17 -17
- package/dist/metadata/input-stepper.json +24 -24
- package/dist/metadata/input.json +31 -31
- package/dist/metadata/popover.json +49 -49
- package/dist/metadata/progress.json +15 -15
- package/dist/metadata/prose-editor.json +110 -116
- package/dist/metadata/radio.json +15 -15
- package/dist/metadata/rating.json +25 -47
- package/dist/metadata/segmented-control.json +24 -46
- package/dist/metadata/select.json +81 -98
- package/dist/metadata/skeleton.json +12 -12
- package/dist/metadata/slider.json +60 -78
- package/dist/metadata/spinner.json +5 -5
- package/dist/metadata/sticky-bar.json +13 -13
- package/dist/metadata/stories-viewer.json +105 -105
- package/dist/metadata/stories.json +17 -17
- package/dist/metadata/story.json +41 -41
- package/dist/metadata/switch.json +9 -9
- package/dist/metadata/table.json +88 -0
- package/dist/metadata/tabs.json +26 -26
- package/dist/metadata/tag.json +50 -50
- package/dist/metadata/textarea.json +28 -28
- package/dist/metadata/toast.json +16 -16
- package/dist/metadata/tooltip.json +49 -49
- package/dist/metadata/tree-item.json +73 -73
- package/dist/metadata/tree.json +39 -39
- package/dist/shared/controllers/listbox-nav.d.ts +7 -0
- package/dist/shared/controllers/listbox-nav.d.ts.map +1 -1
- package/dist/shared/controllers/listbox-nav.js +12 -0
- package/dist/shared/styles/button-core.css +2 -2
- package/dist/shared/styles/checkbox-appearance.css +2 -2
- package/dist/shared/styles/picker-core.css +31 -7
- package/dist/templates/elements/alert-dialog.md +19 -18
- package/dist/templates/elements/alert.md +4 -4
- package/dist/templates/elements/avatar.md +9 -9
- package/dist/templates/elements/badge.md +4 -4
- package/dist/templates/elements/breadcrumb.md +4 -4
- package/dist/templates/elements/button.md +8 -8
- package/dist/templates/elements/carousel.md +32 -32
- package/dist/templates/elements/checkbox.md +4 -4
- package/dist/templates/elements/close-button.md +2 -2
- package/dist/templates/elements/color-scheme-icon.md +13 -13
- package/dist/templates/elements/combobox.md +19 -19
- package/dist/templates/elements/dialog.md +11 -10
- package/dist/templates/elements/disclosure.md +3 -3
- package/dist/templates/elements/divider.md +2 -2
- package/dist/templates/elements/drawer.md +15 -15
- package/dist/templates/elements/dropdown.md +15 -15
- package/dist/templates/elements/form-field.md +3 -3
- package/dist/templates/elements/icon.md +1 -1
- package/dist/templates/elements/input-otp.md +5 -5
- package/dist/templates/elements/input-stepper.md +4 -4
- package/dist/templates/elements/input.md +15 -8
- package/dist/templates/elements/popover.md +8 -8
- package/dist/templates/elements/progress.md +3 -3
- package/dist/templates/elements/prose-editor.md +38 -39
- package/dist/templates/elements/radio.md +6 -6
- package/dist/templates/elements/rating.md +5 -13
- package/dist/templates/elements/segmented-control.md +4 -4
- package/dist/templates/elements/select.md +23 -23
- package/dist/templates/elements/skeleton.md +2 -2
- package/dist/templates/elements/slider.md +13 -13
- package/dist/templates/elements/spinner.md +1 -1
- package/dist/templates/elements/sticky-bar.md +2 -2
- package/dist/templates/elements/stories-viewer.md +29 -29
- package/dist/templates/elements/stories.md +4 -4
- package/dist/templates/elements/story.md +11 -11
- package/dist/templates/elements/switch.md +5 -5
- package/dist/templates/elements/table.md +210 -0
- package/dist/templates/elements/tabs.md +4 -4
- package/dist/templates/elements/tag.md +14 -14
- package/dist/templates/elements/textarea.md +8 -8
- package/dist/templates/elements/toast.md +4 -4
- package/dist/templates/elements/tooltip.md +9 -9
- package/dist/templates/elements/tree-item.md +18 -18
- package/dist/templates/elements/tree.md +13 -13
- package/dist/templates/foundations/focus.md +303 -0
- package/elements.json +9 -0
- package/package.json +1 -1
- package/postcss-plugin-prefix.js +2 -2
- package/templates/SKILL.md.tpl +1 -0
- package/templates/choosing-elements.md.tpl +1 -0
|
@@ -179,10 +179,10 @@ import 'luxen-ui/segmented-control';
|
|
|
179
179
|
|
|
180
180
|
### Attributes & Properties
|
|
181
181
|
|
|
182
|
-
- **value**: `string` — Value of the selected segment (its `value` attribute, else its index).
|
|
183
|
-
- **size**: `SegmentedControlSize` (default: `'md'`) — Control height, aligned with buttons and form controls at the same size.
|
|
184
|
-
- **label**: `string | undefined` — Accessible label announced for the group. Not displayed on screen.
|
|
185
182
|
- **full-width**: `boolean` (default: `false`) — Stretch segments to fill the container width.
|
|
183
|
+
- **label**: `string | undefined` — Accessible label announced for the group. Not displayed on screen.
|
|
184
|
+
- **size**: `SegmentedControlSize` (default: `'md'`) — Control height, aligned with buttons and form controls at the same size.
|
|
185
|
+
- **value**: `string` — Value of the selected segment (its `value` attribute, else its index).
|
|
186
186
|
|
|
187
187
|
### Events
|
|
188
188
|
|
|
@@ -190,5 +190,5 @@ import 'luxen-ui/segmented-control';
|
|
|
190
190
|
|
|
191
191
|
### CSS custom properties
|
|
192
192
|
|
|
193
|
-
- `--indicator-color` (default: `var(--l-color-surface)`) — Background of the sliding pill behind the selected segment.
|
|
194
193
|
- `--border-radius` (default: `var(--l-radius-lg)`) — Corner radius of the track.
|
|
194
|
+
- `--indicator-color` (default: `var(--l-color-surface)`) — Background of the sliding pill behind the selected segment.
|
|
@@ -145,7 +145,7 @@ Don't add a `label` attribute to native options: a labelled option paints its la
|
|
|
145
145
|
|
|
146
146
|
## Enhanced: `<l-select>`
|
|
147
147
|
|
|
148
|
-
When the native tier isn't enough, the `<l-select>` custom element adds in-popover search, multi-select with removable chips, and async options. It needs its JS module (`import 'luxen-ui/select'`). Options are authored as a native `<datalist>` of `<option>` — the same surface as [`<l-combobox>`](/elements/combobox) — with `<option selected>` for pre-selection.
|
|
148
|
+
When the native tier isn't enough, the `<l-select>` custom element adds in-popover search, multi-select with removable chips, and async options. It needs its JS module (`import 'luxen-ui/select'`). Options are authored as a native `<datalist>` of `<option>` — the same surface as [`<l-combobox>`](https://luxen-ui.com/elements/combobox) — with `<option selected>` for pre-selection.
|
|
149
149
|
|
|
150
150
|
**`<l-select>`** — Custom Element · Shadow DOM
|
|
151
151
|
|
|
@@ -176,7 +176,7 @@ Add `searchable` for a filter box inside the popover — useful for long lists.
|
|
|
176
176
|
|
|
177
177
|
### Multiple
|
|
178
178
|
|
|
179
|
-
Add `multiple` to select several values. The trigger shows a removable [`<l-tag>`](/elements/tag) chip per value and the form submits one entry per value under `name`.
|
|
179
|
+
Add `multiple` to select several values. The trigger shows a removable [`<l-tag>`](https://luxen-ui.com/elements/tag) chip per value and the form submits one entry per value under `name`.
|
|
180
180
|
|
|
181
181
|
```html
|
|
182
182
|
<div class="w-72">
|
|
@@ -250,7 +250,7 @@ With `searchable`, the query is highlighted inside `.l-select-item-title` and `.
|
|
|
250
250
|
</div>
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
-
The [`.l-select-item-suffix`](#suffix) works the same way, and stays out of the trigger, the chips and the search. Rich options are copied into the popover's shadow root: an [`<l-badge>`](/elements/badge) is styled there, but your page's own selectors don't reach that copy. To theme it, set the badge's CSS custom properties on the `<l-select>`: they inherit into the popover.
|
|
253
|
+
The [`.l-select-item-suffix`](#suffix) works the same way, and stays out of the trigger, the chips and the search. Rich options are copied into the popover's shadow root: an [`<l-badge>`](https://luxen-ui.com/elements/badge) is styled there, but your page's own selectors don't reach that copy. To theme it, set the badge's CSS custom properties on the `<l-select>`: they inherit into the popover.
|
|
254
254
|
|
|
255
255
|
```html
|
|
256
256
|
<div class="w-80">
|
|
@@ -476,50 +476,50 @@ import 'luxen-ui/select';
|
|
|
476
476
|
|
|
477
477
|
### Attributes & Properties
|
|
478
478
|
|
|
479
|
-
- **
|
|
479
|
+
- **filter**: `SelectFilter` (default: `defaultFilter`) — Override the option filter. `(item, query) => boolean`.
|
|
480
480
|
- **label**: `string` — Accessible label for the trigger.
|
|
481
|
-
- **size**: `SelectSize` (default: `'md'`) — Control size.
|
|
482
|
-
- **searchable**: `boolean` (default: `false`) — Show a filter box inside the popover (opt-in, for long lists).
|
|
483
|
-
- **with-clear**: `boolean` (default: `false`) — Show a button to clear the value.
|
|
484
|
-
- **placement**: `Placement` (default: `'bottom-start'`) — Panel placement relative to the trigger.
|
|
485
481
|
- **multiple**: `boolean` (default: `false`) — Allow selecting multiple values — renders chips and submits one entry per value.
|
|
486
|
-
- **
|
|
487
|
-
- **
|
|
482
|
+
- **placeholder**: `string` — Placeholder shown in the trigger when nothing is selected.
|
|
483
|
+
- **placement**: `Placement` (default: `'bottom-start'`) — Panel placement relative to the trigger.
|
|
484
|
+
- **searchable**: `boolean` (default: `false`) — Show a filter box inside the popover (opt-in, for long lists).
|
|
485
|
+
- **size**: `SelectSize` (default: `'md'`) — Control size.
|
|
488
486
|
- **validationTarget**
|
|
487
|
+
- **value**: `string | string[]` — The selected value (single mode) or array of values (multiple mode).
|
|
488
|
+
- **with-clear**: `boolean` (default: `false`) — Show a button to clear the value.
|
|
489
489
|
|
|
490
490
|
### Events
|
|
491
491
|
|
|
492
|
-
- **change** — Fired when the selection changes. Bubbles. Not cancelable. Properties: `value: string | string[]`.
|
|
493
|
-
- **input** — Fired as the user types in the search box. Bubbles. Not cancelable. Properties: `value: string` (the query).
|
|
494
492
|
- **show** (cancelable) — Fired before the listbox opens. Cancelable.
|
|
495
493
|
- **hide** (cancelable) — Fired before the listbox closes. Cancelable.
|
|
494
|
+
- **change** — Fired when the selection changes. Bubbles. Not cancelable. Properties: `value: string | string[]`.
|
|
495
|
+
- **input** — Fired as the user types in the search box. Bubbles. Not cancelable. Properties: `value: string` (the query).
|
|
496
496
|
|
|
497
497
|
### CSS parts
|
|
498
498
|
|
|
499
499
|
- `base` — The host wrapper.
|
|
500
|
-
- `trigger` — The button that opens the listbox.
|
|
501
|
-
- `value` — The selection display inside the trigger.
|
|
502
500
|
- `chevron` — The trigger chevron.
|
|
503
501
|
- `clear` — The clear button.
|
|
504
|
-
- `
|
|
505
|
-
- `search` — The search input.
|
|
502
|
+
- `empty` — The "no results" message.
|
|
506
503
|
- `listbox` — The options container.
|
|
507
504
|
- `option` — Each option row.
|
|
508
|
-
- `
|
|
505
|
+
- `panel` — The floating popover panel.
|
|
506
|
+
- `search` — The search input.
|
|
507
|
+
- `trigger` — The button that opens the listbox.
|
|
508
|
+
- `value` — The selection display inside the trigger.
|
|
509
509
|
|
|
510
510
|
### CSS classes
|
|
511
511
|
|
|
512
|
+
- `.l-select-item-description` — Rich option: secondary line, shown in the listbox only.
|
|
512
513
|
- `.l-select-item-media` — Rich option: leading image or icon.
|
|
514
|
+
- `.l-select-item-suffix` — Rich option: trailing badge, count or status icon on the title's line. Kept out of the trigger, the chips and the search.
|
|
513
515
|
- `.l-select-item-text` — Rich option: column holding the title and the description.
|
|
514
516
|
- `.l-select-item-title` — Rich option: title, truncated with an ellipsis. Used as the label when the option has no `label`.
|
|
515
|
-
- `.l-select-item-description` — Rich option: secondary line, shown in the listbox only.
|
|
516
|
-
- `.l-select-item-suffix` — Rich option: trailing badge, count or status icon on the title's line. Kept out of the trigger, the chips and the search.
|
|
517
517
|
|
|
518
518
|
### CSS custom properties
|
|
519
519
|
|
|
520
|
-
- `--
|
|
521
|
-
- `--
|
|
520
|
+
- `--background` — Panel background.
|
|
521
|
+
- `--border-radius` — Trigger + panel radius.
|
|
522
522
|
- `--chevron-icon` — Chevron glyph as a `url()`. Masked, so its color comes from the control, not the image.
|
|
523
523
|
- `--clear-icon` — Clear button glyph as a `url()`.
|
|
524
|
-
- `--
|
|
525
|
-
- `--
|
|
524
|
+
- `--height` (default: `var(--l-form-control-height)`) — Control height. The clear button and the chevron each take a square of this height (borders excluded), so their hit area and spacing follow it.
|
|
525
|
+
- `--l-form-control-icon-size` (default: `1em`) — Glyph size of the clear button and the chevron (global form-control token; set it here or on any ancestor). Changes the glyph only — the hit area follows `--height`.
|
|
@@ -103,10 +103,10 @@ import 'luxen-ui/skeleton';
|
|
|
103
103
|
|
|
104
104
|
### Attributes & Properties
|
|
105
105
|
|
|
106
|
-
- **shape**: `circle | text` — Placeholder shape. Default is a block.
|
|
107
106
|
- **animation**: `pulse | wave` — Loading animation. Default is `pulse`.
|
|
107
|
+
- **shape**: `circle | text` — Placeholder shape. Default is a block.
|
|
108
108
|
|
|
109
109
|
### CSS custom properties
|
|
110
110
|
|
|
111
|
-
- `--width` — Width of the skeleton
|
|
112
111
|
- `--height` — Height of the skeleton
|
|
112
|
+
- `--width` — Width of the skeleton
|
|
@@ -192,38 +192,38 @@ import 'luxen-ui/slider';
|
|
|
192
192
|
|
|
193
193
|
### Attributes & Properties
|
|
194
194
|
|
|
195
|
-
- **
|
|
195
|
+
- **label**: `string` — Accessible label for the slider (and base for the range thumbs' names).
|
|
196
196
|
- **max**: `number` (default: `100`) — Maximum value.
|
|
197
|
-
- **step**: `number` (default: `1`) — Step increment.
|
|
198
|
-
- **value**: `number` (default: `0`) — Single-thumb value.
|
|
199
|
-
- **range**: `boolean` (default: `false`) — Enable a two-thumb min–max range.
|
|
200
|
-
- **min-value**: `number` (default: `0`) — Lower value (range mode).
|
|
201
197
|
- **max-value**: `number` (default: `100`) — Upper value (range mode).
|
|
202
|
-
- **
|
|
203
|
-
- **
|
|
198
|
+
- **min**: `number` (default: `0`) — Minimum value.
|
|
199
|
+
- **min-value**: `number` (default: `0`) — Lower value (range mode).
|
|
204
200
|
- **orientation**: `SliderOrientation` (default: `'horizontal'`) — Layout axis. Vertical sliders increase upward.
|
|
205
|
-
- **
|
|
201
|
+
- **range**: `boolean` (default: `false`) — Enable a two-thumb min–max range.
|
|
202
|
+
- **size**: `SliderSize` (default: `'md'`) — Control size.
|
|
203
|
+
- **step**: `number` (default: `1`) — Step increment.
|
|
204
|
+
- **value**: `number` (default: `0`) — Single-thumb value.
|
|
206
205
|
- **valueFormatter**: `(value: number) => string | undefined` — Formats a value for the tooltip and the `aria-valuetext` announcement.
|
|
207
206
|
Assign a function `(value: number) => string`, e.g. to add a unit or currency.
|
|
208
207
|
- **values**: `number[]` — Current thumb values, low to high.
|
|
208
|
+
- **with-tooltip**: `boolean` (default: `false`) — Show a tooltip with the current value while a thumb is focused or dragged.
|
|
209
209
|
|
|
210
210
|
### Events
|
|
211
211
|
|
|
212
|
-
- **input** — Fired continuously while a thumb moves. Bubbles. Not cancelable. Properties: `value: number`, `values: number[]`.
|
|
213
212
|
- **change** — Fired when a thumb is released. Bubbles. Not cancelable. Properties: `value: number`, `values: number[]`.
|
|
213
|
+
- **input** — Fired continuously while a thumb moves. Bubbles. Not cancelable. Properties: `value: number`, `values: number[]`.
|
|
214
214
|
|
|
215
215
|
### CSS parts
|
|
216
216
|
|
|
217
217
|
- `base` — The slider container.
|
|
218
|
-
- `track` — The full-width rail.
|
|
219
218
|
- `indicator` — The filled portion of the rail.
|
|
220
219
|
- `thumb` — Each draggable thumb.
|
|
221
220
|
- `tooltip` — The value tooltip shown above a thumb when `with-tooltip` is set.
|
|
221
|
+
- `track` — The full-width rail.
|
|
222
222
|
|
|
223
223
|
### CSS custom properties
|
|
224
224
|
|
|
225
|
-
- `--track-size` — Thickness of the rail.
|
|
226
|
-
- `--thumb-size` — Diameter of each thumb.
|
|
227
|
-
- `--track-color` — Color of the unfilled rail.
|
|
228
225
|
- `--indicator-color` — Color of the filled portion.
|
|
229
226
|
- `--thumb-color` — Background color of the thumbs.
|
|
227
|
+
- `--thumb-size` — Diameter of each thumb.
|
|
228
|
+
- `--track-color` — Color of the unfilled rail.
|
|
229
|
+
- `--track-size` — Thickness of the rail.
|
|
@@ -58,6 +58,6 @@ import 'luxen-ui/spinner';
|
|
|
58
58
|
|
|
59
59
|
### CSS custom properties
|
|
60
60
|
|
|
61
|
-
- `--size` (default: `1em`) — The size of the spinner (width and height).
|
|
62
61
|
- `--indicator-color` — The color of the spinner.
|
|
62
|
+
- `--size` (default: `1em`) — The size of the spinner (width and height).
|
|
63
63
|
- `--speed` — The duration of one full spin cycle.
|
|
@@ -81,8 +81,8 @@ import 'luxen-ui/sticky-bar';
|
|
|
81
81
|
### Attributes & Properties
|
|
82
82
|
|
|
83
83
|
- **for**: `string` — HTML id of the element to track. When that element leaves the viewport, the bar reveals. Omit for a permanently visible bar.
|
|
84
|
-
- **root**: `string` — HTML id of the scrolling ancestor used as the IntersectionObserver root. Omit to use the viewport. Useful for nested scroll containers (CMS preview panes, modals).
|
|
85
84
|
- **placement**: `'bottom' | 'top'` (default: `'bottom'`) — Edge to dock against.
|
|
85
|
+
- **root**: `string` — HTML id of the scrolling ancestor used as the IntersectionObserver root. Omit to use the viewport. Useful for nested scroll containers (CMS preview panes, modals).
|
|
86
86
|
|
|
87
87
|
### Events
|
|
88
88
|
|
|
@@ -97,8 +97,8 @@ import 'luxen-ui/sticky-bar';
|
|
|
97
97
|
|
|
98
98
|
### CSS custom properties
|
|
99
99
|
|
|
100
|
-
- `--show-duration` (default: `200ms`) — Reveal animation duration.
|
|
101
100
|
- `--hide-duration` (default: `200ms`) — Dismiss animation duration.
|
|
102
101
|
- `--offset` (default: `0px`) — Distance from the active edge. Use to clear a sticky header when `placement="top"`.
|
|
102
|
+
- `--show-duration` (default: `200ms`) — Reveal animation duration.
|
|
103
103
|
|
|
104
104
|
> **Top layer.** The bar uses `popover="manual"` internally, so it paints in the document's top layer — `z-index` is not needed and would be ignored. Target `l-sticky-bar:popover-open` to style the revealed state.
|
|
@@ -4,7 +4,7 @@ outline: deep
|
|
|
4
4
|
|
|
5
5
|
# Stories viewer
|
|
6
6
|
|
|
7
|
-
The fullscreen modal that plays a sequence of [`<l-story>`](/elements/story) videos. Linked to one or more [`<l-stories>`](/elements/stories) rows via matching `id` ↔ `for`. See [Stories](/elements/stories) for the full composition pattern, examples, and accessibility notes.
|
|
7
|
+
The fullscreen modal that plays a sequence of [`<l-story>`](https://luxen-ui.com/elements/story) videos. Linked to one or more [`<l-stories>`](https://luxen-ui.com/elements/stories) rows via matching `id` ↔ `for`. See [Stories](https://luxen-ui.com/elements/stories) for the full composition pattern, examples, and accessibility notes.
|
|
8
8
|
|
|
9
9
|
**`<l-stories-viewer>`** — Custom Element · Shadow DOM
|
|
10
10
|
|
|
@@ -18,26 +18,26 @@ import 'luxen-ui/stories-viewer';
|
|
|
18
18
|
|
|
19
19
|
### Attributes & Properties
|
|
20
20
|
|
|
21
|
-
- **open**: `boolean` (default: `false`) — Whether the viewer is open.
|
|
22
|
-
- **index**: `number` (default: `0`) — Active story index (0-based).
|
|
23
|
-
- **muted**: `boolean` (default: `true`) — Whether playback is muted. so autoplay always succeeds across browsers. The user can unmute via the dedicated button or the `m` keyboard shortcut.
|
|
24
|
-
- **loop**: `boolean` (default: `false`) — Loop the active story instead of advancing.
|
|
25
21
|
- **auto-advance**: `boolean` (default: `true`) — Move to the next story when the current one ends; close after the last story.
|
|
26
|
-
- **light-dismiss**: `boolean` (default: `true`) — Close when the backdrop is clicked.
|
|
27
22
|
- **chapter**: `number` (default: `0`) — Active chapter index within the current story. Reflected.
|
|
28
|
-
- **
|
|
23
|
+
- **index**: `number` (default: `0`) — Active story index (0-based).
|
|
24
|
+
- **light-dismiss**: `boolean` (default: `true`) — Close when the backdrop is clicked.
|
|
25
|
+
- **loop**: `boolean` (default: `false`) — Loop the active story instead of advancing.
|
|
26
|
+
- **muted**: `boolean` (default: `true`) — Whether playback is muted. so autoplay always succeeds across browsers. The user can unmute via the dedicated button or the `m` keyboard shortcut.
|
|
27
|
+
- **open**: `boolean` (default: `false`) — Whether the viewer is open.
|
|
29
28
|
- **source**: `LuxenStories | null` (default: `null`) — Internal: the source `<l-stories>` element that opened the viewer.
|
|
29
|
+
- **stories**: `LuxenStory[]` (default: `[]`) — Internal: the playlist set by the source `<l-stories>`.
|
|
30
30
|
|
|
31
31
|
### Methods
|
|
32
32
|
|
|
33
|
-
- **openAt(stories: LuxenStory[], index: unknown, source: LuxenStories | null)** — Open the viewer at the given index with an explicit playlist.
|
|
34
33
|
- **close()**
|
|
35
34
|
- **next()** — Advance one chapter, or to the next story at the chapter boundary.
|
|
36
|
-
- **previous()** — Retreat one chapter, restart the current chapter past 1s in, or cross into the previous story.
|
|
37
35
|
- **nextStory()** — Jump to the next story, skipping any remaining chapters in the current story.
|
|
38
|
-
- **
|
|
39
|
-
- **play()**
|
|
36
|
+
- **openAt(stories: LuxenStory[], index: unknown, source: LuxenStories | null)** — Open the viewer at the given index with an explicit playlist.
|
|
40
37
|
- **pause()**
|
|
38
|
+
- **play()**
|
|
39
|
+
- **previous()** — Retreat one chapter, restart the current chapter past 1s in, or cross into the previous story.
|
|
40
|
+
- **previousStory()** — Jump to the previous story regardless of current chapter. Lands on chapter 0 of the previous story.
|
|
41
41
|
|
|
42
42
|
### Events
|
|
43
43
|
|
|
@@ -45,45 +45,45 @@ import 'luxen-ui/stories-viewer';
|
|
|
45
45
|
- **after-show** — Fired after the open transition completes. Not cancelable.
|
|
46
46
|
- **hide** (cancelable) — Fired when the viewer is about to close. Cancelable.
|
|
47
47
|
- **after-hide** — Fired after the close transition completes. Not cancelable.
|
|
48
|
-
- **story-change** — Fired when the active story changes. Properties: `index: number`, `story: LuxenStory`.
|
|
49
|
-
- **story-end** — Fired when the active story finishes playback. Properties: `index: number`.
|
|
50
48
|
- **chapter-change** — Fired when the active chapter (within a story) changes. Properties: `chapter: number`, `story: LuxenStory`.
|
|
51
49
|
- **mute-change** — Fired when the mute state changes. Properties: `muted: boolean`.
|
|
50
|
+
- **story-change** — Fired when the active story changes. Properties: `index: number`, `story: LuxenStory`.
|
|
51
|
+
- **story-end** — Fired when the active story finishes playback. Properties: `index: number`.
|
|
52
52
|
|
|
53
53
|
### Slots
|
|
54
54
|
|
|
55
|
+
- **close** — Override the default close button.
|
|
55
56
|
- **cta** — Default CTA overlay (e.g. shoppable card). Per-story `slot="cta"` inside `<l-story>` overrides this when that story is active.
|
|
56
57
|
- **header** — Default header overlay (e.g. avatar + author). Per-story override available the same way.
|
|
57
|
-
- **close** — Override the default close button.
|
|
58
58
|
|
|
59
59
|
### CSS parts
|
|
60
60
|
|
|
61
|
-
- `dialog` — The native `<dialog>` element.
|
|
62
|
-
- `frame` — The aspect-ratio video frame.
|
|
63
|
-
- `progress` — The progress bar wrapper.
|
|
64
|
-
- `progress-segment` — A single progress segment.
|
|
65
|
-
- `progress-fill` — The fill element inside an active segment.
|
|
66
|
-
- `video` — The `<video>` element.
|
|
67
|
-
- `overlay` — The overlay wrapper that hosts CTA/header slots.
|
|
68
|
-
- `header` — The top-left header area (story thumbnail + label fallback, or consumer-supplied content via the `header` slot).
|
|
69
|
-
- `header-label` — The default story label inside the header.
|
|
70
61
|
- `actions` — The top-right vertical button stack (close, play/pause, mute).
|
|
71
62
|
- `button-close` — The close button.
|
|
72
|
-
- `button-pause` — The play/pause toggle.
|
|
73
63
|
- `button-mute` — The mute toggle.
|
|
74
|
-
- `button-previous` — The previous story button.
|
|
75
64
|
- `button-next` — The next story button.
|
|
65
|
+
- `button-pause` — The play/pause toggle.
|
|
66
|
+
- `button-previous` — The previous story button.
|
|
67
|
+
- `dialog` — The native `<dialog>` element.
|
|
68
|
+
- `frame` — The aspect-ratio video frame.
|
|
69
|
+
- `header` — The top-left header area (story thumbnail + label fallback, or consumer-supplied content via the `header` slot).
|
|
70
|
+
- `header-label` — The default story label inside the header.
|
|
71
|
+
- `overlay` — The overlay wrapper that hosts CTA/header slots.
|
|
72
|
+
- `progress` — The progress bar wrapper.
|
|
73
|
+
- `progress-fill` — The fill element inside an active segment.
|
|
74
|
+
- `progress-segment` — A single progress segment.
|
|
76
75
|
- `spinner` — The loading spinner shown while the current video is buffering.
|
|
76
|
+
- `video` — The `<video>` element.
|
|
77
77
|
|
|
78
78
|
### CSS custom properties
|
|
79
79
|
|
|
80
|
-
- `--
|
|
81
|
-
- `--
|
|
80
|
+
- `--backdrop` (default: `var(--l-backdrop-strong)`) — Backdrop color. — darker than `--l-backdrop` to focus attention on the immersive frame, but still translucent so the page stays perceptible.
|
|
81
|
+
- `--hide-duration` (default: `200ms`) — Close transition duration.
|
|
82
82
|
- `--progress-bg` (default: `rgb(255 255 255 / 35%)`) — Inactive progress segment background.
|
|
83
|
+
- `--progress-color` (default: `white`) — Active progress fill color.
|
|
83
84
|
- `--progress-gap` (default: `4px`) — Gap between segments.
|
|
84
85
|
- `--show-duration` (default: `200ms`) — Open transition duration.
|
|
85
|
-
- `--
|
|
86
|
-
- `--backdrop` (default: `var(--l-backdrop-strong)`) — Backdrop color. — darker than `--l-backdrop` to focus attention on the immersive frame, but still translucent so the page stays perceptible.
|
|
86
|
+
- `--width` (default: `min(420px, 100vw)`) — Frame width.
|
|
87
87
|
|
|
88
88
|
To change the frame ratio (e.g. `4/5` or `1/1`), target the `frame` part:
|
|
89
89
|
|
|
@@ -252,8 +252,8 @@ import 'luxen-ui/stories-viewer';
|
|
|
252
252
|
|
|
253
253
|
### Attributes & Properties
|
|
254
254
|
|
|
255
|
-
- **for**: `string` — ID of the linked `<l-stories-viewer>`.
|
|
256
255
|
- **appearance**: `StoriesAppearance` (default: `'rounded'`) — Visual appearance of the thumbnails.
|
|
256
|
+
- **for**: `string` — ID of the linked `<l-stories-viewer>`.
|
|
257
257
|
|
|
258
258
|
To customize size, radius, gap, or hide labels, set the [CSS custom properties](#css-custom-properties) directly via inline `style` or external CSS — no extra attributes needed.
|
|
259
259
|
|
|
@@ -270,12 +270,12 @@ To customize size, radius, gap, or hide labels, set the [CSS custom properties](
|
|
|
270
270
|
|
|
271
271
|
These tokens are set on `<l-stories>` and cascade to every `<l-story>` child.
|
|
272
272
|
|
|
273
|
-
- `--size` — Thumbnail size (width). Default per appearance.
|
|
274
|
-
- `--radius` — Thumbnail border radius. Default per appearance (`--radius-full` for rounded, `1rem` for portrait).
|
|
275
273
|
- `--gap` (default: `1rem`) — Gap between thumbnails.
|
|
274
|
+
- `--label-color` — Label text color.
|
|
275
|
+
- `--radius` — Thumbnail border radius. Default per appearance (`--radius-full` for rounded, `1rem` for portrait).
|
|
276
276
|
- `--ring-color` — Ring color around fresh thumbnails.
|
|
277
277
|
- `--ring-color-seen` — Ring color for `[seen]` thumbnails.
|
|
278
278
|
- `--ring-width` (default: `2px`) — Ring width.
|
|
279
|
-
- `--
|
|
279
|
+
- `--size` — Thumbnail size (width). Default per appearance.
|
|
280
280
|
|
|
281
281
|
The play-icon disc inside `.l-story-play l-icon` is styled inline (white icon, 35 % black background). Override it directly via standard CSS: `l-story .l-story-play l-icon { background: …; color: … }`.
|
|
@@ -4,7 +4,7 @@ outline: deep
|
|
|
4
4
|
|
|
5
5
|
# Story
|
|
6
6
|
|
|
7
|
-
A single story declaration inside [`<l-stories>`](/elements/stories). Renders the clickable thumbnail; the [viewer](/elements/stories-viewer) reads its `src`, `poster`, `label`, `chapters`, and `tracks` to play it. See [Stories](/elements/stories) for examples and the row layout.
|
|
7
|
+
A single story declaration inside [`<l-stories>`](https://luxen-ui.com/elements/stories). Renders the clickable thumbnail; the [viewer](https://luxen-ui.com/elements/stories-viewer) reads its `src`, `poster`, `label`, `chapters`, and `tracks` to play it. See [Stories](https://luxen-ui.com/elements/stories) for examples and the row layout.
|
|
8
8
|
|
|
9
9
|
**`<l-story>`** — Custom Element (no Shadow DOM)
|
|
10
10
|
|
|
@@ -22,14 +22,14 @@ import 'luxen-ui/story';
|
|
|
22
22
|
|
|
23
23
|
### Attributes & Properties
|
|
24
24
|
|
|
25
|
-
- **
|
|
25
|
+
- **chapters**: `string` — Chapter start times within the video, comma-separated seconds (e.g. `0,5,12,20`). `0` is implicit if omitted. Empty = single chapter spanning the full video.
|
|
26
|
+
- **duration**: `number` (default: `0`) — Override the progress duration in seconds. Defaults to the video's metadata duration.
|
|
27
|
+
- **label**: `string` — Caption shown below the thumbnail (or overlaid, depending on appearance) and used as the trigger `aria-label`.
|
|
26
28
|
- **poster**: `string` — Thumbnail poster image. Falls back to the first video frame.
|
|
27
29
|
- **preview**: `string` — Optional short looping preview video (URL of a small dedicated MP4, typically 2-3s, 480p, no audio). When set, the thumbnail renders this video muted+looped+autoplayed in place of `poster`. Gated by an `IntersectionObserver` so off-screen previews don't play.
|
|
28
|
-
- **label**: `string` — Caption shown below the thumbnail (or overlaid, depending on appearance) and used as the trigger `aria-label`.
|
|
29
|
-
- **duration**: `number` (default: `0`) — Override the progress duration in seconds. Defaults to the video's metadata duration.
|
|
30
|
-
- **seen**: `boolean` (default: `false`) — Mark this story as already viewed (faded ring). Reflected.
|
|
31
30
|
- **pulse**: `boolean` (default: `false`) — Pulse the thumbnail with an animated halo + a subtle scale tap to draw attention. Reflected.
|
|
32
|
-
- **
|
|
31
|
+
- **seen**: `boolean` (default: `false`) — Mark this story as already viewed (faded ring). Reflected.
|
|
32
|
+
- **src**: `string` — Video URL.
|
|
33
33
|
- **tracks**: `string` — Comma-separated VTT track URLs for captions.
|
|
34
34
|
|
|
35
35
|
### Methods
|
|
@@ -43,17 +43,17 @@ import 'luxen-ui/story';
|
|
|
43
43
|
|
|
44
44
|
### CSS classes
|
|
45
45
|
|
|
46
|
-
- `.l-story-trigger` — The clickable thumbnail button wrapper.
|
|
47
|
-
- `.l-story-thumb` — The poster/video thumbnail frame (ring + offset).
|
|
48
|
-
- `.l-story-play` — The centered play-icon overlay.
|
|
49
46
|
- `.l-story-label` — The caption text below the thumbnail.
|
|
47
|
+
- `.l-story-play` — The centered play-icon overlay.
|
|
48
|
+
- `.l-story-thumb` — The poster/video thumbnail frame (ring + offset).
|
|
49
|
+
- `.l-story-trigger` — The clickable thumbnail button wrapper.
|
|
50
50
|
|
|
51
51
|
### CSS custom properties
|
|
52
52
|
|
|
53
|
-
The thumbnail layout tokens (`--size`, `--radius`, `--ring-color`, `--ring-color-seen`, `--ring-width`, `--ring-offset`, `--ring-offset-color`, `--label-color`) are declared on `<l-stories>` and cascade to every story. See [Stories › CSS custom properties](/elements/stories#css-custom-properties). The play-icon disc is styled inline; consumers can override it by targeting `.l-story-play l-icon`.
|
|
53
|
+
The thumbnail layout tokens (`--size`, `--radius`, `--ring-color`, `--ring-color-seen`, `--ring-width`, `--ring-offset`, `--ring-offset-color`, `--label-color`) are declared on `<l-stories>` and cascade to every story. See [Stories › CSS custom properties](https://luxen-ui.com/elements/stories#css-custom-properties). The play-icon disc is styled inline; consumers can override it by targeting `.l-story-play l-icon`.
|
|
54
54
|
|
|
55
55
|
The pulse animation has its own knobs:
|
|
56
56
|
|
|
57
57
|
- `--pulse-color` — Color of the attention pulse ring (only with the `pulse` attribute).
|
|
58
|
-
- `--pulse-scale` (default: `1.2`) — Peak scale of the pulse animation.
|
|
59
58
|
- `--pulse-duration` (default: `1.6s`) — Duration of one pulse cycle.
|
|
59
|
+
- `--pulse-scale` (default: `1.2`) — Peak scale of the pulse animation.
|
|
@@ -19,9 +19,9 @@ Switches toggle a single setting on or off, taking effect immediately.
|
|
|
19
19
|
</l-form-field>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
A switch is a native `<input type="checkbox">` with `role="switch"` — keep the role so assistive tech announces "on/off" instead of "checked". [`l-form-field`](/elements/form-field) auto-styles a bare switch and wires the accessibility (label, hint, error, `aria-*`); standalone, apply `.l-switch` to the input yourself.
|
|
22
|
+
A switch is a native `<input type="checkbox">` with `role="switch"` — keep the role so assistive tech announces "on/off" instead of "checked". [`l-form-field`](https://luxen-ui.com/elements/form-field) auto-styles a bare switch and wires the accessibility (label, hint, error, `aria-*`); standalone, apply `.l-switch` to the input yourself.
|
|
23
23
|
|
|
24
|
-
Use a switch for a setting that applies instantly (no Save step). For an option that only takes effect on form submission, prefer a [checkbox](/elements/checkbox).
|
|
24
|
+
Use a switch for a setting that applies instantly (no Save step). For an option that only takes effect on form submission, prefer a [checkbox](https://luxen-ui.com/elements/checkbox).
|
|
25
25
|
|
|
26
26
|
## Options
|
|
27
27
|
|
|
@@ -189,11 +189,11 @@ In a `dir="rtl"` context the thumb rests at the inline-start (right) and slides
|
|
|
189
189
|
|
|
190
190
|
### Attributes & Properties
|
|
191
191
|
|
|
192
|
-
- **
|
|
192
|
+
- **aria-invalid** — Set to `true` to force the invalid style (otherwise applied via `:user-invalid`). `l-form-field` manages this automatically.
|
|
193
193
|
- **checked** — Whether the switch is on.
|
|
194
194
|
- **disabled** — Disables the switch.
|
|
195
195
|
- **required** — Marks the switch as required for form submission.
|
|
196
|
-
- **
|
|
196
|
+
- **role** — Must be `switch`. Promotes the native checkbox to a switch for assistive tech and triggers the switch skin / inline field layout.
|
|
197
197
|
|
|
198
198
|
### CSS classes
|
|
199
199
|
|
|
@@ -201,5 +201,5 @@ In a `dir="rtl"` context the thumb rests at the inline-start (right) and slides
|
|
|
201
201
|
|
|
202
202
|
### CSS custom properties
|
|
203
203
|
|
|
204
|
-
- `--size` (default: `1.25em`) — Track height; the whole control scales from it.
|
|
205
204
|
- `--accent` (default: `var(--l-form-control-activated-color)`) — Track fill when on.
|
|
205
|
+
- `--size` (default: `1.25em`) — Track height; the whole control scales from it.
|