@signal9/era-ui 1.1.2
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/dev/audit/audits/_helpers.d.ts +5 -0
- package/dist/dev/audit/audits/_helpers.js +11 -0
- package/dist/dev/audit/audits/concentric-inset.d.ts +2 -0
- package/dist/dev/audit/audits/concentric-inset.js +33 -0
- package/dist/dev/audit/audits/index.d.ts +4 -0
- package/dist/dev/audit/audits/index.js +9 -0
- package/dist/dev/audit/audits/uniform-sibling-gaps.d.ts +2 -0
- package/dist/dev/audit/audits/uniform-sibling-gaps.js +29 -0
- package/dist/dev/audit/audits/wall-matches-gap.d.ts +2 -0
- package/dist/dev/audit/audits/wall-matches-gap.js +30 -0
- package/dist/dev/audit/index.d.ts +4 -0
- package/dist/dev/audit/index.js +3 -0
- package/dist/dev/audit/registry.d.ts +13 -0
- package/dist/dev/audit/registry.js +50 -0
- package/dist/dev/audit/runner.d.ts +3 -0
- package/dist/dev/audit/runner.js +27 -0
- package/dist/dev/audit/types.d.ts +28 -0
- package/dist/dev/audit/types.js +7 -0
- package/dist/dev/audit-overlay.svelte +125 -0
- package/dist/dev/audit-overlay.svelte.d.ts +9 -0
- package/dist/dev/index.d.ts +2 -0
- package/dist/dev/index.js +2 -0
- package/dist/docs/badge.md +18 -0
- package/dist/docs/bits-ui-audit.md +58 -0
- package/dist/docs/button.md +18 -0
- package/dist/docs/chip.md +20 -0
- package/dist/docs/component-docs-core.d.ts +8 -0
- package/dist/docs/component-docs-core.js +72 -0
- package/dist/docs/component-docs.d.ts +2 -0
- package/dist/docs/component-docs.js +25 -0
- package/dist/docs/component-source-scanners.d.ts +18 -0
- package/dist/docs/component-source-scanners.js +46 -0
- package/dist/docs/extract-props.d.ts +13 -0
- package/dist/docs/extract-props.js +324 -0
- package/dist/docs/generated-docs.d.ts +4 -0
- package/dist/docs/generated-docs.js +23 -0
- package/dist/docs/index.d.ts +5 -0
- package/dist/docs/index.js +62 -0
- package/dist/docs/llms-txt.d.ts +2 -0
- package/dist/docs/llms-txt.js +84 -0
- package/dist/docs/quickstart.md +43 -0
- package/dist/docs/separator.md +20 -0
- package/dist/docs/table.md +35 -0
- package/dist/era-ui.css +2 -0
- package/dist/generated-docs/accordion.md +57 -0
- package/dist/generated-docs/alert-dialog.md +81 -0
- package/dist/generated-docs/aspect-ratio.md +17 -0
- package/dist/generated-docs/avatar.md +39 -0
- package/dist/generated-docs/badge.md +38 -0
- package/dist/generated-docs/bar.md +19 -0
- package/dist/generated-docs/button-group.md +19 -0
- package/dist/generated-docs/button.md +46 -0
- package/dist/generated-docs/calendar.md +126 -0
- package/dist/generated-docs/card.md +26 -0
- package/dist/generated-docs/checkbox.md +42 -0
- package/dist/generated-docs/chip.md +40 -0
- package/dist/generated-docs/code-block.md +20 -0
- package/dist/generated-docs/collapsible.md +30 -0
- package/dist/generated-docs/combobox.md +74 -0
- package/dist/generated-docs/command.md +123 -0
- package/dist/generated-docs/context-menu.md +94 -0
- package/dist/generated-docs/date-field.md +49 -0
- package/dist/generated-docs/date-picker.md +180 -0
- package/dist/generated-docs/date-range-field.md +50 -0
- package/dist/generated-docs/date-range-picker.md +180 -0
- package/dist/generated-docs/dialog.md +70 -0
- package/dist/generated-docs/draggable.md +3 -0
- package/dist/generated-docs/dropdown-menu.md +94 -0
- package/dist/generated-docs/file-upload.md +18 -0
- package/dist/generated-docs/input.md +18 -0
- package/dist/generated-docs/kv.md +20 -0
- package/dist/generated-docs/label.md +17 -0
- package/dist/generated-docs/link-preview.md +30 -0
- package/dist/generated-docs/llms-full.txt +3104 -0
- package/dist/generated-docs/llms.txt +34 -0
- package/dist/generated-docs/manifest.json +812 -0
- package/dist/generated-docs/menu.md +11 -0
- package/dist/generated-docs/menubar.md +103 -0
- package/dist/generated-docs/meter.md +17 -0
- package/dist/generated-docs/mode.md +24 -0
- package/dist/generated-docs/navigation-menu.md +11 -0
- package/dist/generated-docs/pagination.md +55 -0
- package/dist/generated-docs/pane.md +30 -0
- package/dist/generated-docs/pin-input.md +31 -0
- package/dist/generated-docs/popover.md +43 -0
- package/dist/generated-docs/progress.md +17 -0
- package/dist/generated-docs/quickstart.md +47 -0
- package/dist/generated-docs/radio-group.md +31 -0
- package/dist/generated-docs/range-calendar.md +11 -0
- package/dist/generated-docs/rating-group.md +31 -0
- package/dist/generated-docs/scroll-area.md +57 -0
- package/dist/generated-docs/select.md +49 -0
- package/dist/generated-docs/separator.md +39 -0
- package/dist/generated-docs/sheet.md +11 -0
- package/dist/generated-docs/skeleton.md +18 -0
- package/dist/generated-docs/slider.md +71 -0
- package/dist/generated-docs/surfaces.md +3 -0
- package/dist/generated-docs/switch.md +18 -0
- package/dist/generated-docs/table.md +113 -0
- package/dist/generated-docs/tabs.md +48 -0
- package/dist/generated-docs/time-field.md +49 -0
- package/dist/generated-docs/time-range-field.md +50 -0
- package/dist/generated-docs/toggle-group.md +30 -0
- package/dist/generated-docs/toggle.md +20 -0
- package/dist/generated-docs/toolbar.md +11 -0
- package/dist/generated-docs/tooltip.md +30 -0
- package/dist/generated-docs/video-player.md +73 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/styles/density.css +274 -0
- package/dist/styles/index.css +77 -0
- package/dist/styles/motion.css +56 -0
- package/dist/styles/surfaces/base.css +103 -0
- package/dist/styles/surfaces/bevel.css +71 -0
- package/dist/styles/surfaces/cartoon.css +27 -0
- package/dist/styles/surfaces/glass.css +127 -0
- package/dist/styles/themes.css +351 -0
- package/dist/styles/typography.css +28 -0
- package/dist/ui/accordion/accordion-content.svelte +15 -0
- package/dist/ui/accordion/accordion-content.svelte.d.ts +4 -0
- package/dist/ui/accordion/accordion-header.svelte +8 -0
- package/dist/ui/accordion/accordion-header.svelte.d.ts +4 -0
- package/dist/ui/accordion/accordion-item.svelte +12 -0
- package/dist/ui/accordion/accordion-item.svelte.d.ts +4 -0
- package/dist/ui/accordion/accordion-trigger.svelte +24 -0
- package/dist/ui/accordion/accordion-trigger.svelte.d.ts +5 -0
- package/dist/ui/accordion/accordion.svelte +8 -0
- package/dist/ui/accordion/accordion.svelte.d.ts +4 -0
- package/dist/ui/accordion/index.d.ts +5 -0
- package/dist/ui/accordion/index.js +5 -0
- package/dist/ui/alert-dialog/alert-dialog-action.svelte +41 -0
- package/dist/ui/alert-dialog/alert-dialog-action.svelte.d.ts +9 -0
- package/dist/ui/alert-dialog/alert-dialog-cancel.svelte +39 -0
- package/dist/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +9 -0
- package/dist/ui/alert-dialog/alert-dialog-content.svelte +25 -0
- package/dist/ui/alert-dialog/alert-dialog-content.svelte.d.ts +4 -0
- package/dist/ui/alert-dialog/alert-dialog-description.svelte +16 -0
- package/dist/ui/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
- package/dist/ui/alert-dialog/alert-dialog-overlay.svelte +16 -0
- package/dist/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
- package/dist/ui/alert-dialog/alert-dialog-title.svelte +12 -0
- package/dist/ui/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
- package/dist/ui/alert-dialog/alert-dialog-trigger.svelte +28 -0
- package/dist/ui/alert-dialog/alert-dialog-trigger.svelte.d.ts +9 -0
- package/dist/ui/alert-dialog/index.d.ts +10 -0
- package/dist/ui/alert-dialog/index.js +10 -0
- package/dist/ui/aspect-ratio/aspect-ratio.svelte +19 -0
- package/dist/ui/aspect-ratio/aspect-ratio.svelte.d.ts +5 -0
- package/dist/ui/aspect-ratio/index.d.ts +1 -0
- package/dist/ui/aspect-ratio/index.js +1 -0
- package/dist/ui/avatar/avatar-fallback.svelte +22 -0
- package/dist/ui/avatar/avatar-fallback.svelte.d.ts +5 -0
- package/dist/ui/avatar/avatar-image.svelte +8 -0
- package/dist/ui/avatar/avatar-image.svelte.d.ts +4 -0
- package/dist/ui/avatar/avatar-root.svelte +22 -0
- package/dist/ui/avatar/avatar-root.svelte.d.ts +5 -0
- package/dist/ui/avatar/index.d.ts +3 -0
- package/dist/ui/avatar/index.js +3 -0
- package/dist/ui/badge/badge.svelte +40 -0
- package/dist/ui/badge/badge.svelte.d.ts +32 -0
- package/dist/ui/badge/index.d.ts +1 -0
- package/dist/ui/badge/index.js +1 -0
- package/dist/ui/bar/bar.svelte +45 -0
- package/dist/ui/bar/bar.svelte.d.ts +30 -0
- package/dist/ui/bar/index.d.ts +1 -0
- package/dist/ui/bar/index.js +1 -0
- package/dist/ui/button/button.svelte +53 -0
- package/dist/ui/button/button.svelte.d.ts +21 -0
- package/dist/ui/button/index.d.ts +12 -0
- package/dist/ui/button/index.js +3 -0
- package/dist/ui/button/variants.d.ts +70 -0
- package/dist/ui/button/variants.js +97 -0
- package/dist/ui/button-group/button-group.svelte +31 -0
- package/dist/ui/button-group/button-group.svelte.d.ts +10 -0
- package/dist/ui/button-group/index.d.ts +1 -0
- package/dist/ui/button-group/index.js +1 -0
- package/dist/ui/calendar/calendar-cell.svelte +8 -0
- package/dist/ui/calendar/calendar-cell.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-day.svelte +15 -0
- package/dist/ui/calendar/calendar-day.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-grid-body.svelte +7 -0
- package/dist/ui/calendar/calendar-grid-body.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-grid-head.svelte +7 -0
- package/dist/ui/calendar/calendar-grid-head.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-grid-row.svelte +8 -0
- package/dist/ui/calendar/calendar-grid-row.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-grid.svelte +8 -0
- package/dist/ui/calendar/calendar-grid.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-head-cell.svelte +15 -0
- package/dist/ui/calendar/calendar-head-cell.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-header.svelte +12 -0
- package/dist/ui/calendar/calendar-header.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-heading.svelte +8 -0
- package/dist/ui/calendar/calendar-heading.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-next-button.svelte +30 -0
- package/dist/ui/calendar/calendar-next-button.svelte.d.ts +9 -0
- package/dist/ui/calendar/calendar-prev-button.svelte +30 -0
- package/dist/ui/calendar/calendar-prev-button.svelte.d.ts +9 -0
- package/dist/ui/calendar/calendar-root.svelte +30 -0
- package/dist/ui/calendar/calendar-root.svelte.d.ts +4 -0
- package/dist/ui/calendar/index.d.ts +12 -0
- package/dist/ui/calendar/index.js +12 -0
- package/dist/ui/card/card.svelte +159 -0
- package/dist/ui/card/card.svelte.d.ts +63 -0
- package/dist/ui/card/index.d.ts +1 -0
- package/dist/ui/card/index.js +1 -0
- package/dist/ui/checkbox/checkbox-group-label.svelte +12 -0
- package/dist/ui/checkbox/checkbox-group-label.svelte.d.ts +4 -0
- package/dist/ui/checkbox/checkbox-group.svelte +18 -0
- package/dist/ui/checkbox/checkbox-group.svelte.d.ts +4 -0
- package/dist/ui/checkbox/checkbox.svelte +33 -0
- package/dist/ui/checkbox/checkbox.svelte.d.ts +4 -0
- package/dist/ui/checkbox/index.d.ts +3 -0
- package/dist/ui/checkbox/index.js +3 -0
- package/dist/ui/chip/chip.svelte +66 -0
- package/dist/ui/chip/chip.svelte.d.ts +26 -0
- package/dist/ui/chip/index.d.ts +1 -0
- package/dist/ui/chip/index.js +1 -0
- package/dist/ui/code-block/code-block.svelte +58 -0
- package/dist/ui/code-block/code-block.svelte.d.ts +11 -0
- package/dist/ui/code-block/index.d.ts +1 -0
- package/dist/ui/code-block/index.js +1 -0
- package/dist/ui/collapsible/collapsible-content.svelte +15 -0
- package/dist/ui/collapsible/collapsible-content.svelte.d.ts +5 -0
- package/dist/ui/collapsible/collapsible-trigger.svelte +22 -0
- package/dist/ui/collapsible/collapsible-trigger.svelte.d.ts +5 -0
- package/dist/ui/collapsible/index.d.ts +4 -0
- package/dist/ui/collapsible/index.js +4 -0
- package/dist/ui/combobox/combobox-content.svelte +25 -0
- package/dist/ui/combobox/combobox-content.svelte.d.ts +5 -0
- package/dist/ui/combobox/combobox-empty.svelte +22 -0
- package/dist/ui/combobox/combobox-empty.svelte.d.ts +8 -0
- package/dist/ui/combobox/combobox-group-heading.svelte +19 -0
- package/dist/ui/combobox/combobox-group-heading.svelte.d.ts +5 -0
- package/dist/ui/combobox/combobox-group.svelte +8 -0
- package/dist/ui/combobox/combobox-group.svelte.d.ts +4 -0
- package/dist/ui/combobox/combobox-input.svelte +15 -0
- package/dist/ui/combobox/combobox-input.svelte.d.ts +4 -0
- package/dist/ui/combobox/combobox-item.svelte +17 -0
- package/dist/ui/combobox/combobox-item.svelte.d.ts +4 -0
- package/dist/ui/combobox/combobox-trigger.svelte +27 -0
- package/dist/ui/combobox/combobox-trigger.svelte.d.ts +5 -0
- package/dist/ui/combobox/index.d.ts +10 -0
- package/dist/ui/combobox/index.js +10 -0
- package/dist/ui/command/command-empty.svelte +15 -0
- package/dist/ui/command/command-empty.svelte.d.ts +4 -0
- package/dist/ui/command/command-group-heading.svelte +16 -0
- package/dist/ui/command/command-group-heading.svelte.d.ts +4 -0
- package/dist/ui/command/command-group-items.svelte +12 -0
- package/dist/ui/command/command-group-items.svelte.d.ts +4 -0
- package/dist/ui/command/command-group.svelte +7 -0
- package/dist/ui/command/command-group.svelte.d.ts +4 -0
- package/dist/ui/command/command-input.svelte +45 -0
- package/dist/ui/command/command-input.svelte.d.ts +10 -0
- package/dist/ui/command/command-item.svelte +15 -0
- package/dist/ui/command/command-item.svelte.d.ts +4 -0
- package/dist/ui/command/command-link-item.svelte +15 -0
- package/dist/ui/command/command-link-item.svelte.d.ts +4 -0
- package/dist/ui/command/command-list.svelte +12 -0
- package/dist/ui/command/command-list.svelte.d.ts +4 -0
- package/dist/ui/command/command-loading.svelte +15 -0
- package/dist/ui/command/command-loading.svelte.d.ts +4 -0
- package/dist/ui/command/command-root.svelte +21 -0
- package/dist/ui/command/command-root.svelte.d.ts +4 -0
- package/dist/ui/command/command-separator.svelte +12 -0
- package/dist/ui/command/command-separator.svelte.d.ts +4 -0
- package/dist/ui/command/command-viewport.svelte +8 -0
- package/dist/ui/command/command-viewport.svelte.d.ts +4 -0
- package/dist/ui/command/index.d.ts +12 -0
- package/dist/ui/command/index.js +12 -0
- package/dist/ui/context-menu/context-menu-checkbox-item.svelte +21 -0
- package/dist/ui/context-menu/context-menu-checkbox-item.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-content.svelte +27 -0
- package/dist/ui/context-menu/context-menu-content.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-group-heading.svelte +16 -0
- package/dist/ui/context-menu/context-menu-group-heading.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-item.svelte +22 -0
- package/dist/ui/context-menu/context-menu-item.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-radio-item.svelte +19 -0
- package/dist/ui/context-menu/context-menu-radio-item.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-separator.svelte +16 -0
- package/dist/ui/context-menu/context-menu-separator.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-sub-content.svelte +26 -0
- package/dist/ui/context-menu/context-menu-sub-content.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-sub-trigger.svelte +24 -0
- package/dist/ui/context-menu/context-menu-sub-trigger.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-trigger.svelte +12 -0
- package/dist/ui/context-menu/context-menu-trigger.svelte.d.ts +4 -0
- package/dist/ui/context-menu/index.d.ts +14 -0
- package/dist/ui/context-menu/index.js +14 -0
- package/dist/ui/date-field/date-field-input.svelte +15 -0
- package/dist/ui/date-field/date-field-input.svelte.d.ts +4 -0
- package/dist/ui/date-field/date-field-label.svelte +8 -0
- package/dist/ui/date-field/date-field-label.svelte.d.ts +4 -0
- package/dist/ui/date-field/date-field-root.svelte +11 -0
- package/dist/ui/date-field/date-field-root.svelte.d.ts +3 -0
- package/dist/ui/date-field/date-field-segment.svelte +15 -0
- package/dist/ui/date-field/date-field-segment.svelte.d.ts +4 -0
- package/dist/ui/date-field/index.d.ts +4 -0
- package/dist/ui/date-field/index.js +4 -0
- package/dist/ui/date-picker/date-picker-calendar.svelte +16 -0
- package/dist/ui/date-picker/date-picker-calendar.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-cell.svelte +8 -0
- package/dist/ui/date-picker/date-picker-cell.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-content.svelte +25 -0
- package/dist/ui/date-picker/date-picker-content.svelte.d.ts +5 -0
- package/dist/ui/date-picker/date-picker-day.svelte +15 -0
- package/dist/ui/date-picker/date-picker-day.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-grid-body.svelte +11 -0
- package/dist/ui/date-picker/date-picker-grid-body.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-grid-head.svelte +11 -0
- package/dist/ui/date-picker/date-picker-grid-head.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-grid-row.svelte +8 -0
- package/dist/ui/date-picker/date-picker-grid-row.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-grid.svelte +8 -0
- package/dist/ui/date-picker/date-picker-grid.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-head-cell.svelte +19 -0
- package/dist/ui/date-picker/date-picker-head-cell.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-header.svelte +12 -0
- package/dist/ui/date-picker/date-picker-header.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-heading.svelte +12 -0
- package/dist/ui/date-picker/date-picker-heading.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-input.svelte +15 -0
- package/dist/ui/date-picker/date-picker-input.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-label.svelte +8 -0
- package/dist/ui/date-picker/date-picker-label.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-next-button.svelte +30 -0
- package/dist/ui/date-picker/date-picker-next-button.svelte.d.ts +9 -0
- package/dist/ui/date-picker/date-picker-prev-button.svelte +30 -0
- package/dist/ui/date-picker/date-picker-prev-button.svelte.d.ts +9 -0
- package/dist/ui/date-picker/date-picker-root.svelte +19 -0
- package/dist/ui/date-picker/date-picker-root.svelte.d.ts +3 -0
- package/dist/ui/date-picker/date-picker-segment.svelte +15 -0
- package/dist/ui/date-picker/date-picker-segment.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-trigger.svelte +27 -0
- package/dist/ui/date-picker/date-picker-trigger.svelte.d.ts +5 -0
- package/dist/ui/date-picker/index.d.ts +18 -0
- package/dist/ui/date-picker/index.js +18 -0
- package/dist/ui/date-range-field/date-range-field-input.svelte +19 -0
- package/dist/ui/date-range-field/date-range-field-input.svelte.d.ts +4 -0
- package/dist/ui/date-range-field/date-range-field-label.svelte +12 -0
- package/dist/ui/date-range-field/date-range-field-label.svelte.d.ts +4 -0
- package/dist/ui/date-range-field/date-range-field-root.svelte +13 -0
- package/dist/ui/date-range-field/date-range-field-root.svelte.d.ts +4 -0
- package/dist/ui/date-range-field/date-range-field-segment.svelte +19 -0
- package/dist/ui/date-range-field/date-range-field-segment.svelte.d.ts +3 -0
- package/dist/ui/date-range-field/index.d.ts +4 -0
- package/dist/ui/date-range-field/index.js +4 -0
- package/dist/ui/date-range-picker/date-range-picker-calendar.svelte +16 -0
- package/dist/ui/date-range-picker/date-range-picker-calendar.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-cell.svelte +12 -0
- package/dist/ui/date-range-picker/date-range-picker-cell.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-content.svelte +25 -0
- package/dist/ui/date-range-picker/date-range-picker-content.svelte.d.ts +5 -0
- package/dist/ui/date-range-picker/date-range-picker-day.svelte +19 -0
- package/dist/ui/date-range-picker/date-range-picker-day.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-body.svelte +12 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-body.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-head.svelte +12 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-head.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-row.svelte +12 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-row.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-grid.svelte +16 -0
- package/dist/ui/date-range-picker/date-range-picker-grid.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-head-cell.svelte +19 -0
- package/dist/ui/date-range-picker/date-range-picker-head-cell.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-header.svelte +16 -0
- package/dist/ui/date-range-picker/date-range-picker-header.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-heading.svelte +16 -0
- package/dist/ui/date-range-picker/date-range-picker-heading.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-input.svelte +19 -0
- package/dist/ui/date-range-picker/date-range-picker-input.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-label.svelte +12 -0
- package/dist/ui/date-range-picker/date-range-picker-label.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-next-button.svelte +30 -0
- package/dist/ui/date-range-picker/date-range-picker-next-button.svelte.d.ts +9 -0
- package/dist/ui/date-range-picker/date-range-picker-prev-button.svelte +30 -0
- package/dist/ui/date-range-picker/date-range-picker-prev-button.svelte.d.ts +9 -0
- package/dist/ui/date-range-picker/date-range-picker-root.svelte +19 -0
- package/dist/ui/date-range-picker/date-range-picker-root.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-segment.svelte +19 -0
- package/dist/ui/date-range-picker/date-range-picker-segment.svelte.d.ts +3 -0
- package/dist/ui/date-range-picker/date-range-picker-trigger.svelte +27 -0
- package/dist/ui/date-range-picker/date-range-picker-trigger.svelte.d.ts +5 -0
- package/dist/ui/date-range-picker/index.d.ts +18 -0
- package/dist/ui/date-range-picker/index.js +18 -0
- package/dist/ui/dialog/dialog-close.svelte +39 -0
- package/dist/ui/dialog/dialog-close.svelte.d.ts +9 -0
- package/dist/ui/dialog/dialog-content.svelte +25 -0
- package/dist/ui/dialog/dialog-content.svelte.d.ts +5 -0
- package/dist/ui/dialog/dialog-description.svelte +12 -0
- package/dist/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/ui/dialog/dialog-overlay.svelte +12 -0
- package/dist/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/ui/dialog/dialog-title.svelte +8 -0
- package/dist/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/ui/dialog/dialog-trigger.svelte +28 -0
- package/dist/ui/dialog/dialog-trigger.svelte.d.ts +9 -0
- package/dist/ui/dialog/index.d.ts +9 -0
- package/dist/ui/dialog/index.js +9 -0
- package/dist/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +21 -0
- package/dist/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +4 -0
- package/dist/ui/dropdown-menu/dropdown-menu-content.svelte +27 -0
- package/dist/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-group-heading.svelte +16 -0
- package/dist/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +4 -0
- package/dist/ui/dropdown-menu/dropdown-menu-item.svelte +22 -0
- package/dist/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-radio-item.svelte +19 -0
- package/dist/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
- package/dist/ui/dropdown-menu/dropdown-menu-separator.svelte +16 -0
- package/dist/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte +26 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +24 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-trigger.svelte +24 -0
- package/dist/ui/dropdown-menu/dropdown-menu-trigger.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/index.d.ts +14 -0
- package/dist/ui/dropdown-menu/index.js +14 -0
- package/dist/ui/file-upload/file-upload.svelte +98 -0
- package/dist/ui/file-upload/file-upload.svelte.d.ts +8 -0
- package/dist/ui/file-upload/index.d.ts +1 -0
- package/dist/ui/file-upload/index.js +1 -0
- package/dist/ui/index.d.ts +58 -0
- package/dist/ui/index.js +62 -0
- package/dist/ui/input/index.d.ts +2 -0
- package/dist/ui/input/index.js +2 -0
- package/dist/ui/input/input.svelte +23 -0
- package/dist/ui/input/input.svelte.d.ts +7 -0
- package/dist/ui/input/textarea.svelte +23 -0
- package/dist/ui/input/textarea.svelte.d.ts +7 -0
- package/dist/ui/kv/index.d.ts +1 -0
- package/dist/ui/kv/index.js +1 -0
- package/dist/ui/kv/kv.svelte +33 -0
- package/dist/ui/kv/kv.svelte.d.ts +10 -0
- package/dist/ui/label/index.d.ts +1 -0
- package/dist/ui/label/index.js +1 -0
- package/dist/ui/label/label.svelte +15 -0
- package/dist/ui/label/label.svelte.d.ts +5 -0
- package/dist/ui/link-preview/index.d.ts +7 -0
- package/dist/ui/link-preview/index.js +7 -0
- package/dist/ui/link-preview/link-preview-content.svelte +26 -0
- package/dist/ui/link-preview/link-preview-content.svelte.d.ts +5 -0
- package/dist/ui/link-preview/link-preview-trigger.svelte +19 -0
- package/dist/ui/link-preview/link-preview-trigger.svelte.d.ts +5 -0
- package/dist/ui/menu/index.d.ts +1 -0
- package/dist/ui/menu/index.js +3 -0
- package/dist/ui/menubar/index.d.ts +16 -0
- package/dist/ui/menubar/index.js +16 -0
- package/dist/ui/menubar/menubar-checkbox-item.svelte +21 -0
- package/dist/ui/menubar/menubar-checkbox-item.svelte.d.ts +4 -0
- package/dist/ui/menubar/menubar-content.svelte +27 -0
- package/dist/ui/menubar/menubar-content.svelte.d.ts +5 -0
- package/dist/ui/menubar/menubar-group-heading.svelte +16 -0
- package/dist/ui/menubar/menubar-group-heading.svelte.d.ts +4 -0
- package/dist/ui/menubar/menubar-item.svelte +22 -0
- package/dist/ui/menubar/menubar-item.svelte.d.ts +5 -0
- package/dist/ui/menubar/menubar-radio-item.svelte +15 -0
- package/dist/ui/menubar/menubar-radio-item.svelte.d.ts +4 -0
- package/dist/ui/menubar/menubar-root.svelte +15 -0
- package/dist/ui/menubar/menubar-root.svelte.d.ts +4 -0
- package/dist/ui/menubar/menubar-separator.svelte +12 -0
- package/dist/ui/menubar/menubar-separator.svelte.d.ts +4 -0
- package/dist/ui/menubar/menubar-sub-content.svelte +26 -0
- package/dist/ui/menubar/menubar-sub-content.svelte.d.ts +5 -0
- package/dist/ui/menubar/menubar-sub-trigger.svelte +24 -0
- package/dist/ui/menubar/menubar-sub-trigger.svelte.d.ts +5 -0
- package/dist/ui/menubar/menubar-trigger.svelte +22 -0
- package/dist/ui/menubar/menubar-trigger.svelte.d.ts +5 -0
- package/dist/ui/meter/index.d.ts +1 -0
- package/dist/ui/meter/index.js +1 -0
- package/dist/ui/meter/meter.svelte +32 -0
- package/dist/ui/meter/meter.svelte.d.ts +4 -0
- package/dist/ui/mode/index.d.ts +1 -0
- package/dist/ui/mode/index.js +1 -0
- package/dist/ui/mode/mode.svelte +61 -0
- package/dist/ui/mode/mode.svelte.d.ts +18 -0
- package/dist/ui/navigation-menu/index.d.ts +10 -0
- package/dist/ui/navigation-menu/index.js +10 -0
- package/dist/ui/pagination/index.d.ts +4 -0
- package/dist/ui/pagination/index.js +4 -0
- package/dist/ui/pagination/pagination-next-button.svelte +30 -0
- package/dist/ui/pagination/pagination-next-button.svelte.d.ts +9 -0
- package/dist/ui/pagination/pagination-page.svelte +32 -0
- package/dist/ui/pagination/pagination-page.svelte.d.ts +9 -0
- package/dist/ui/pagination/pagination-prev-button.svelte +30 -0
- package/dist/ui/pagination/pagination-prev-button.svelte.d.ts +9 -0
- package/dist/ui/pagination/pagination-root.svelte +18 -0
- package/dist/ui/pagination/pagination-root.svelte.d.ts +4 -0
- package/dist/ui/pane/index.d.ts +1 -0
- package/dist/ui/pane/index.js +1 -0
- package/dist/ui/pane/pane.svelte +145 -0
- package/dist/ui/pane/pane.svelte.d.ts +34 -0
- package/dist/ui/pin-input/index.d.ts +2 -0
- package/dist/ui/pin-input/index.js +2 -0
- package/dist/ui/pin-input/pin-input-cell.svelte +30 -0
- package/dist/ui/pin-input/pin-input-cell.svelte.d.ts +4 -0
- package/dist/ui/pin-input/pin-input-root.svelte +18 -0
- package/dist/ui/pin-input/pin-input-root.svelte.d.ts +4 -0
- package/dist/ui/popover/index.d.ts +7 -0
- package/dist/ui/popover/index.js +7 -0
- package/dist/ui/popover/popover-close.svelte +27 -0
- package/dist/ui/popover/popover-close.svelte.d.ts +9 -0
- package/dist/ui/popover/popover-content.svelte +24 -0
- package/dist/ui/popover/popover-content.svelte.d.ts +5 -0
- package/dist/ui/popover/popover-trigger.svelte +41 -0
- package/dist/ui/popover/popover-trigger.svelte.d.ts +9 -0
- package/dist/ui/progress/index.d.ts +1 -0
- package/dist/ui/progress/index.js +1 -0
- package/dist/ui/progress/progress.svelte +47 -0
- package/dist/ui/progress/progress.svelte.d.ts +4 -0
- package/dist/ui/provider/axes.d.ts +74 -0
- package/dist/ui/provider/axes.js +70 -0
- package/dist/ui/provider/index.d.ts +6 -0
- package/dist/ui/provider/index.js +6 -0
- package/dist/ui/provider/modes.d.ts +12 -0
- package/dist/ui/provider/modes.js +14 -0
- package/dist/ui/provider/surfaces.d.ts +45 -0
- package/dist/ui/provider/surfaces.js +24 -0
- package/dist/ui/radio-group/index.d.ts +2 -0
- package/dist/ui/radio-group/index.js +2 -0
- package/dist/ui/radio-group/radio-group-item.svelte +19 -0
- package/dist/ui/radio-group/radio-group-item.svelte.d.ts +4 -0
- package/dist/ui/radio-group/radio-group-root.svelte +18 -0
- package/dist/ui/radio-group/radio-group-root.svelte.d.ts +4 -0
- package/dist/ui/range-calendar/index.d.ts +15 -0
- package/dist/ui/range-calendar/index.js +15 -0
- package/dist/ui/rating-group/index.d.ts +2 -0
- package/dist/ui/rating-group/index.js +2 -0
- package/dist/ui/rating-group/rating-group-item.svelte +17 -0
- package/dist/ui/rating-group/rating-group-item.svelte.d.ts +4 -0
- package/dist/ui/rating-group/rating-group-root.svelte +20 -0
- package/dist/ui/rating-group/rating-group-root.svelte.d.ts +4 -0
- package/dist/ui/scroll-area/index.d.ts +5 -0
- package/dist/ui/scroll-area/index.js +5 -0
- package/dist/ui/scroll-area/scroll-area-corner.svelte +7 -0
- package/dist/ui/scroll-area/scroll-area-corner.svelte.d.ts +4 -0
- package/dist/ui/scroll-area/scroll-area-scrollbar.svelte +19 -0
- package/dist/ui/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
- package/dist/ui/scroll-area/scroll-area-thumb.svelte +12 -0
- package/dist/ui/scroll-area/scroll-area-thumb.svelte.d.ts +4 -0
- package/dist/ui/scroll-area/scroll-area-viewport.svelte +12 -0
- package/dist/ui/scroll-area/scroll-area-viewport.svelte.d.ts +4 -0
- package/dist/ui/scroll-area/scroll-area.svelte +18 -0
- package/dist/ui/scroll-area/scroll-area.svelte.d.ts +4 -0
- package/dist/ui/select/index.d.ts +6 -0
- package/dist/ui/select/index.js +6 -0
- package/dist/ui/select/select-content.svelte +25 -0
- package/dist/ui/select/select-content.svelte.d.ts +5 -0
- package/dist/ui/select/select-item.svelte +17 -0
- package/dist/ui/select/select-item.svelte.d.ts +4 -0
- package/dist/ui/select/select-trigger.svelte +24 -0
- package/dist/ui/select/select-trigger.svelte.d.ts +5 -0
- package/dist/ui/select/select-value.svelte +71 -0
- package/dist/ui/select/select-value.svelte.d.ts +9 -0
- package/dist/ui/separator/index.d.ts +1 -0
- package/dist/ui/separator/index.js +1 -0
- package/dist/ui/separator/separator.svelte +31 -0
- package/dist/ui/separator/separator.svelte.d.ts +8 -0
- package/dist/ui/sheet/index.d.ts +2 -0
- package/dist/ui/sheet/index.js +5 -0
- package/dist/ui/sheet/sheet-content.svelte +41 -0
- package/dist/ui/sheet/sheet-content.svelte.d.ts +31 -0
- package/dist/ui/skeleton/index.d.ts +1 -0
- package/dist/ui/skeleton/index.js +1 -0
- package/dist/ui/skeleton/skeleton.svelte +43 -0
- package/dist/ui/skeleton/skeleton.svelte.d.ts +27 -0
- package/dist/ui/slider/index.d.ts +6 -0
- package/dist/ui/slider/index.js +6 -0
- package/dist/ui/slider/slider-range.svelte +40 -0
- package/dist/ui/slider/slider-range.svelte.d.ts +13 -0
- package/dist/ui/slider/slider-root.svelte +29 -0
- package/dist/ui/slider/slider-root.svelte.d.ts +4 -0
- package/dist/ui/slider/slider-thumb-label.svelte +12 -0
- package/dist/ui/slider/slider-thumb-label.svelte.d.ts +4 -0
- package/dist/ui/slider/slider-thumb.svelte +15 -0
- package/dist/ui/slider/slider-thumb.svelte.d.ts +4 -0
- package/dist/ui/slider/slider-tick-label.svelte +12 -0
- package/dist/ui/slider/slider-tick-label.svelte.d.ts +4 -0
- package/dist/ui/slider/slider-tick.svelte +15 -0
- package/dist/ui/slider/slider-tick.svelte.d.ts +4 -0
- package/dist/ui/switch/index.d.ts +1 -0
- package/dist/ui/switch/index.js +1 -0
- package/dist/ui/switch/switch.svelte +36 -0
- package/dist/ui/switch/switch.svelte.d.ts +4 -0
- package/dist/ui/table/index.d.ts +6 -0
- package/dist/ui/table/index.js +6 -0
- package/dist/ui/table/table-body.svelte +18 -0
- package/dist/ui/table/table-body.svelte.d.ts +9 -0
- package/dist/ui/table/table-cell.svelte +26 -0
- package/dist/ui/table/table-cell.svelte.d.ts +9 -0
- package/dist/ui/table/table-head-cell.svelte +26 -0
- package/dist/ui/table/table-head-cell.svelte.d.ts +9 -0
- package/dist/ui/table/table-head.svelte +18 -0
- package/dist/ui/table/table-head.svelte.d.ts +9 -0
- package/dist/ui/table/table-root.svelte +36 -0
- package/dist/ui/table/table-root.svelte.d.ts +17 -0
- package/dist/ui/table/table-row.svelte +26 -0
- package/dist/ui/table/table-row.svelte.d.ts +9 -0
- package/dist/ui/tabs/index.d.ts +4 -0
- package/dist/ui/tabs/index.js +4 -0
- package/dist/ui/tabs/tabs-content.svelte +7 -0
- package/dist/ui/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/ui/tabs/tabs-list.svelte +7 -0
- package/dist/ui/tabs/tabs-list.svelte.d.ts +4 -0
- package/dist/ui/tabs/tabs-trigger.svelte +7 -0
- package/dist/ui/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/dist/ui/tabs/tabs.svelte +7 -0
- package/dist/ui/tabs/tabs.svelte.d.ts +4 -0
- package/dist/ui/time-field/index.d.ts +4 -0
- package/dist/ui/time-field/index.js +4 -0
- package/dist/ui/time-field/time-field-input.svelte +15 -0
- package/dist/ui/time-field/time-field-input.svelte.d.ts +4 -0
- package/dist/ui/time-field/time-field-label.svelte +8 -0
- package/dist/ui/time-field/time-field-label.svelte.d.ts +4 -0
- package/dist/ui/time-field/time-field-root.svelte +11 -0
- package/dist/ui/time-field/time-field-root.svelte.d.ts +4 -0
- package/dist/ui/time-field/time-field-segment.svelte +15 -0
- package/dist/ui/time-field/time-field-segment.svelte.d.ts +4 -0
- package/dist/ui/time-range-field/index.d.ts +4 -0
- package/dist/ui/time-range-field/index.js +4 -0
- package/dist/ui/time-range-field/time-range-field-input.svelte +19 -0
- package/dist/ui/time-range-field/time-range-field-input.svelte.d.ts +4 -0
- package/dist/ui/time-range-field/time-range-field-label.svelte +12 -0
- package/dist/ui/time-range-field/time-range-field-label.svelte.d.ts +4 -0
- package/dist/ui/time-range-field/time-range-field-root.svelte +13 -0
- package/dist/ui/time-range-field/time-range-field-root.svelte.d.ts +4 -0
- package/dist/ui/time-range-field/time-range-field-segment.svelte +19 -0
- package/dist/ui/time-range-field/time-range-field-segment.svelte.d.ts +3 -0
- package/dist/ui/toggle/index.d.ts +1 -0
- package/dist/ui/toggle/index.js +1 -0
- package/dist/ui/toggle/toggle.svelte +27 -0
- package/dist/ui/toggle/toggle.svelte.d.ts +9 -0
- package/dist/ui/toggle-group/index.d.ts +2 -0
- package/dist/ui/toggle-group/index.js +2 -0
- package/dist/ui/toggle-group/toggle-group-item.svelte +17 -0
- package/dist/ui/toggle-group/toggle-group-item.svelte.d.ts +4 -0
- package/dist/ui/toggle-group/toggle-group-root.svelte +19 -0
- package/dist/ui/toggle-group/toggle-group-root.svelte.d.ts +5 -0
- package/dist/ui/toolbar/index.d.ts +6 -0
- package/dist/ui/toolbar/index.js +6 -0
- package/dist/ui/tooltip/index.d.ts +7 -0
- package/dist/ui/tooltip/index.js +7 -0
- package/dist/ui/tooltip/tooltip-content.svelte +26 -0
- package/dist/ui/tooltip/tooltip-content.svelte.d.ts +5 -0
- package/dist/ui/tooltip/tooltip-trigger.svelte +7 -0
- package/dist/ui/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/dist/ui/video-player/index.d.ts +1 -0
- package/dist/ui/video-player/index.js +1 -0
- package/dist/ui/video-player/video-player.svelte +1377 -0
- package/dist/ui/video-player/video-player.svelte.d.ts +107 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.js +24 -0
- package/package.json +115 -0
- package/readme +127 -0
|
@@ -0,0 +1,3104 @@
|
|
|
1
|
+
# era-ui
|
|
2
|
+
|
|
3
|
+
> A Svelte 5 + Bits UI component library. Every surface — heights, paddings, radii, gaps — derives from a single spacing atom, so density is a one-attribute override at any scope.
|
|
4
|
+
|
|
5
|
+
## Using the library
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { Button, Table, Select } from "@sig-nine/era-ui";
|
|
9
|
+
import "@sig-nine/era-ui/css";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Named exports wrap a single primitive (`Button`, `Badge`, `Chip`, `Input`, …). Namespace exports compose primitives via sub-components (`Table.Root`, `Table.Row`, `Select.Trigger`, `Dialog.Content`, …). Every wrapper forwards unknown props to its underlying element or bits-ui primitive, so standard HTML attributes (`class`, `style`, event handlers, `aria-*`, `data-*`) work without ceremony.
|
|
13
|
+
|
|
14
|
+
## Scoped overrides
|
|
15
|
+
|
|
16
|
+
Five orthogonal axes are exposed as HTML attributes on any ancestor. The entire subtree re-tiers through CSS inheritance — no JS, no context provider.
|
|
17
|
+
|
|
18
|
+
- `data-mode`: **dense** (default) · balanced · spacious · touch — adjusts the spacing atom (`--era-sp`).
|
|
19
|
+
- `data-surface`: **flat** (default) · glass · bevel · cartoon — swaps the background treatment.
|
|
20
|
+
- `data-corners`: **rounded** (default) · square — scales all radii toward 0.
|
|
21
|
+
- `data-font`: **mono** (default) · sans · serif — switches the font stack.
|
|
22
|
+
- `data-motion`: instant · **normal** (default) · extra — sets animation speed (`--era-duration` / `--era-ease`), independent of density.
|
|
23
|
+
|
|
24
|
+
The `Mode` component is a thin wrapper that applies these attributes plus optional `primary` / `primaryFg` color overrides to a subtree.
|
|
25
|
+
|
|
26
|
+
## Per-component docs
|
|
27
|
+
|
|
28
|
+
Every component has a passive markdown doc at `/<slug>.md`.
|
|
29
|
+
Examples: `/button.md`, `/select.md`, `/table.md`.
|
|
30
|
+
Full concatenated reference: `/llms-full.txt`.
|
|
31
|
+
|
|
32
|
+
<!-- Full component documentation, concatenated. -->
|
|
33
|
+
|
|
34
|
+
<!-- begin: quickstart -->
|
|
35
|
+
|
|
36
|
+
# Quickstart
|
|
37
|
+
|
|
38
|
+
Installation and setup guide.
|
|
39
|
+
|
|
40
|
+
## Hero Template
|
|
41
|
+
|
|
42
|
+
Use a single, pure component import from `$lib/ui` for a clean docs-friendly starter hero.
|
|
43
|
+
|
|
44
|
+
```svelte
|
|
45
|
+
<script lang="ts">
|
|
46
|
+
import { Badge, Bar, Button, ButtonGroup, Card, Separator } from '$lib/ui';
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<section class="mx-auto flex w-full max-w-4xl flex-col gap-(--era-content-p) p-(--era-content-p)">
|
|
50
|
+
<Badge tone="accent">Now shipping v0.8</Badge>
|
|
51
|
+
|
|
52
|
+
<div class="space-y-(--era-gap)">
|
|
53
|
+
<h1 class="font-mono text-[length:calc(var(--era-text)*2)] font-semibold text-bright">
|
|
54
|
+
Era Hero
|
|
55
|
+
</h1>
|
|
56
|
+
<p class="max-w-prose text-muted">
|
|
57
|
+
Build once, then switch feel instantly with density and surface tokens.
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<Bar class="border border-[color:var(--era-border-color)] bg-[var(--era-surface-bg)]">
|
|
62
|
+
<ButtonGroup>
|
|
63
|
+
<Button tone="accent">Get started</Button>
|
|
64
|
+
<Button variant="outline">Live preview</Button>
|
|
65
|
+
</ButtonGroup>
|
|
66
|
+
</Bar>
|
|
67
|
+
|
|
68
|
+
<Separator />
|
|
69
|
+
|
|
70
|
+
<div class="grid gap-(--era-gap) md:grid-cols-3">
|
|
71
|
+
<Card class="p-(--era-gap)">Dense-ready</Card>
|
|
72
|
+
<Card class="p-(--era-gap)">Balanced defaults</Card>
|
|
73
|
+
<Card class="p-(--era-gap)">Spacious polish</Card>
|
|
74
|
+
</div>
|
|
75
|
+
</section>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Why this template
|
|
79
|
+
|
|
80
|
+
- Pure imports keep setup simple for first-time users.
|
|
81
|
+
- Every spacing and size value comes from era tokens.
|
|
82
|
+
- Works in all density modes without rewriting markup.
|
|
83
|
+
|
|
84
|
+
<!-- end: quickstart -->
|
|
85
|
+
|
|
86
|
+
<!-- begin: surfaces -->
|
|
87
|
+
|
|
88
|
+
# Surfaces
|
|
89
|
+
|
|
90
|
+
Every surface × corners rendered live for visual QA.
|
|
91
|
+
|
|
92
|
+
<!-- end: surfaces -->
|
|
93
|
+
|
|
94
|
+
<!-- begin: draggable -->
|
|
95
|
+
|
|
96
|
+
# Draggable
|
|
97
|
+
|
|
98
|
+
Make any element draggable with @neodrag/svelte v3.
|
|
99
|
+
|
|
100
|
+
<!-- end: draggable -->
|
|
101
|
+
|
|
102
|
+
<!-- begin: aspect-ratio -->
|
|
103
|
+
|
|
104
|
+
# Aspect Ratio
|
|
105
|
+
|
|
106
|
+
Maintains a specified aspect ratio for content.
|
|
107
|
+
|
|
108
|
+
## Import
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
import { AspectRatio } from "$lib/ui/aspect-ratio";
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Props
|
|
115
|
+
|
|
116
|
+
Inherits all props from `PartProps<AspectRatio.RootProps>`.
|
|
117
|
+
|
|
118
|
+
| Prop | Type | Default | Notes |
|
|
119
|
+
|------|------|---------|-------|
|
|
120
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
121
|
+
|
|
122
|
+
<!-- end: aspect-ratio -->
|
|
123
|
+
|
|
124
|
+
<!-- begin: badge -->
|
|
125
|
+
|
|
126
|
+
# Badge
|
|
127
|
+
|
|
128
|
+
A small label for status or categorization.
|
|
129
|
+
|
|
130
|
+
## Import
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
import { Badge } from "$lib/ui/badge";
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Props
|
|
137
|
+
|
|
138
|
+
Inherits all props from `HTMLAttributes<HTMLSpanElement>`.
|
|
139
|
+
|
|
140
|
+
| Prop | Type | Default | Notes |
|
|
141
|
+
|------|------|---------|-------|
|
|
142
|
+
| `ref?` | `HTMLSpanElement \| null` | `null` | bindable |
|
|
143
|
+
| `tone?` | `'default' \| 'accent' \| 'destructive' \| 'success'` | `'default'` | — |
|
|
144
|
+
| `children?` | `Snippet` | — | — |
|
|
145
|
+
|
|
146
|
+
## Usage
|
|
147
|
+
|
|
148
|
+
```svelte
|
|
149
|
+
<script>
|
|
150
|
+
import { Badge } from '$lib/ui/badge';
|
|
151
|
+
</script>
|
|
152
|
+
|
|
153
|
+
<Badge>draft</Badge>
|
|
154
|
+
<Badge tone="accent">new</Badge>
|
|
155
|
+
<Badge tone="success">passing</Badge>
|
|
156
|
+
<Badge tone="destructive">failing</Badge>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Notes
|
|
160
|
+
|
|
161
|
+
- Non-interactive. For dismissible tokens use `Chip`. For labelled pairs use `KV`.
|
|
162
|
+
- Uses the `xxs` tier tokens (height, radius, inset).
|
|
163
|
+
- Inter-icon gap tightens to `--era-inset-xxs` when an SVG is present.
|
|
164
|
+
|
|
165
|
+
<!-- end: badge -->
|
|
166
|
+
|
|
167
|
+
<!-- begin: avatar -->
|
|
168
|
+
|
|
169
|
+
# Avatar
|
|
170
|
+
|
|
171
|
+
An image with optional initials/icon fallback.
|
|
172
|
+
|
|
173
|
+
## Import
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
import { Avatar } from "$lib/ui/avatar";
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
180
|
+
|
|
181
|
+
- `Avatar.Root`
|
|
182
|
+
- `Avatar.Image`
|
|
183
|
+
- `Avatar.Fallback`
|
|
184
|
+
|
|
185
|
+
## Avatar.Root
|
|
186
|
+
|
|
187
|
+
Inherits all props from `PartProps<Avatar.RootProps>`.
|
|
188
|
+
|
|
189
|
+
| Prop | Type | Default | Notes |
|
|
190
|
+
|------|------|---------|-------|
|
|
191
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
192
|
+
|
|
193
|
+
## Avatar.Image
|
|
194
|
+
|
|
195
|
+
Inherits all props from `Avatar.ImageProps`.
|
|
196
|
+
|
|
197
|
+
| Prop | Type | Default | Notes |
|
|
198
|
+
|------|------|---------|-------|
|
|
199
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
200
|
+
|
|
201
|
+
## Avatar.Fallback
|
|
202
|
+
|
|
203
|
+
Inherits all props from `PartProps<Avatar.FallbackProps>`.
|
|
204
|
+
|
|
205
|
+
| Prop | Type | Default | Notes |
|
|
206
|
+
|------|------|---------|-------|
|
|
207
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
208
|
+
|
|
209
|
+
<!-- end: avatar -->
|
|
210
|
+
|
|
211
|
+
<!-- begin: bar -->
|
|
212
|
+
|
|
213
|
+
# Bar
|
|
214
|
+
|
|
215
|
+
A flex container for toolbars and headers, in three heights.
|
|
216
|
+
|
|
217
|
+
## Import
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
import { Bar } from "$lib/ui/bar";
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Props
|
|
224
|
+
|
|
225
|
+
Inherits all props from `HTMLAttributes<HTMLDivElement>`.
|
|
226
|
+
|
|
227
|
+
| Prop | Type | Default | Notes |
|
|
228
|
+
|------|------|---------|-------|
|
|
229
|
+
| `ref?` | `HTMLDivElement \| null` | `null` | bindable |
|
|
230
|
+
| `size?` | `'sm' \| 'md' \| 'lg'` | `'lg'` | Height tier (scales with density). Default `lg` — a full toolbar. |
|
|
231
|
+
| `children?` | `Snippet` | — | — |
|
|
232
|
+
|
|
233
|
+
<!-- end: bar -->
|
|
234
|
+
|
|
235
|
+
<!-- begin: button -->
|
|
236
|
+
|
|
237
|
+
# Button
|
|
238
|
+
|
|
239
|
+
A flexible button or link element.
|
|
240
|
+
|
|
241
|
+
## Import
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
import { Button } from "$lib/ui/button";
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Props
|
|
248
|
+
|
|
249
|
+
Inherits all props from `Button.RootProps`.
|
|
250
|
+
|
|
251
|
+
| Prop | Type | Default | Notes |
|
|
252
|
+
|------|------|---------|-------|
|
|
253
|
+
| `tone?` | `'default' \| 'accent' \| 'destructive' \| 'success'` | `'default'` | — |
|
|
254
|
+
| `size?` | `'default' \| 'sm' \| 'xs' \| 'icon'` | `'default'` | — |
|
|
255
|
+
| `variant?` | `'filled' \| 'link'` | `'filled'` | — |
|
|
256
|
+
| `active?` | `boolean` | `false` | — |
|
|
257
|
+
| `icon?` | `boolean` | `false` | — |
|
|
258
|
+
| `loading?` | `boolean` | `false` | When true, disables the button, sets `aria-busy`, and prepends a
|
|
259
|
+
spinner. The existing label stays rendered so focus, click targets,
|
|
260
|
+
and screen-reader accessible names don't change shape mid-flight. |
|
|
261
|
+
| `loadingLabel?` | `string` | — | Screen-reader-only label announced while `loading` is true. |
|
|
262
|
+
| `children?` | `Snippet` | — | — |
|
|
263
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
264
|
+
|
|
265
|
+
## Usage
|
|
266
|
+
|
|
267
|
+
```svelte
|
|
268
|
+
<script>
|
|
269
|
+
import { Button } from '$lib/ui/button';
|
|
270
|
+
</script>
|
|
271
|
+
|
|
272
|
+
<Button onclick={() => console.log('clicked')}>Save</Button>
|
|
273
|
+
<Button tone="accent" size="sm">Confirm</Button>
|
|
274
|
+
<Button tone="destructive" variant="link">Delete</Button>
|
|
275
|
+
<Button icon size="icon" aria-label="Close"><X /></Button>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## Notes
|
|
279
|
+
|
|
280
|
+
- Heights, radii, paddings, and gaps come from density tokens — never hard-code px.
|
|
281
|
+
- `link` variant intentionally does not change color on hover (underline only) so it reads as static prose until confirmed interactive.
|
|
282
|
+
- For a segmented row of buttons, use `ButtonGroup`.
|
|
283
|
+
|
|
284
|
+
<!-- end: button -->
|
|
285
|
+
|
|
286
|
+
<!-- begin: button-group -->
|
|
287
|
+
|
|
288
|
+
# Button Group
|
|
289
|
+
|
|
290
|
+
Groups buttons with consistent spacing.
|
|
291
|
+
|
|
292
|
+
## Import
|
|
293
|
+
|
|
294
|
+
```ts
|
|
295
|
+
import { ButtonGroup } from "$lib/ui/button-group";
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Props
|
|
299
|
+
|
|
300
|
+
Inherits all props from `HTMLAttributes<HTMLDivElement>`.
|
|
301
|
+
|
|
302
|
+
| Prop | Type | Default | Notes |
|
|
303
|
+
|------|------|---------|-------|
|
|
304
|
+
| `ref?` | `HTMLDivElement \| null` | `null` | bindable |
|
|
305
|
+
| `children?` | `Snippet` | — | — |
|
|
306
|
+
| `orientation?` | `'horizontal' \| 'vertical'` | `'horizontal'` | — |
|
|
307
|
+
|
|
308
|
+
<!-- end: button-group -->
|
|
309
|
+
|
|
310
|
+
<!-- begin: pane -->
|
|
311
|
+
|
|
312
|
+
# Pane
|
|
313
|
+
|
|
314
|
+
A draggable floating window with a handle bar.
|
|
315
|
+
|
|
316
|
+
## Import
|
|
317
|
+
|
|
318
|
+
```ts
|
|
319
|
+
import { Pane } from "$lib/ui/pane";
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
## Props
|
|
323
|
+
|
|
324
|
+
Inherits all props from `HTMLAttributes<HTMLDivElement>`.
|
|
325
|
+
|
|
326
|
+
| Prop | Type | Default | Notes |
|
|
327
|
+
|------|------|---------|-------|
|
|
328
|
+
| `ref?` | `HTMLDivElement \| null` | `null` | bindable |
|
|
329
|
+
| `position?` | `{ x: number; y: number }` | `{ x: 0, y: 0 }` | bindable — Offset from the pane's layout position. Bindable and writable —
|
|
330
|
+
assign to move the pane programmatically (e.g. reset to 0,0). |
|
|
331
|
+
| `title?` | `string` | — | Text shown in the handle bar. For richer chrome use `header`. |
|
|
332
|
+
| `icon?` | `Component<IconProps> \| null` | `AppWindow` | Lucide icon rendered left of the title. Pass `null` to omit. |
|
|
333
|
+
| `disabled?` | `boolean` | `false` | Disables dragging (reactive). |
|
|
334
|
+
| `plugins?` | `(Plugin \| Compartment)[] \| (() => (Plugin \| Compartment)[])` | `[]` | Extra neodrag plugins (axis, bounds, grid, threshold, …) appended
|
|
335
|
+
after the pane's own. Pass Compartments for reactive plugin sets. |
|
|
336
|
+
| `onDragStart?` | `(data: DragEventData) => void` | — | — |
|
|
337
|
+
| `onDrag?` | `(data: DragEventData) => void` | — | — |
|
|
338
|
+
| `onDragEnd?` | `(data: DragEventData) => void` | — | — |
|
|
339
|
+
| `onClose?` | `() => void` | — | When set, a close button renders at the right of the handle bar. |
|
|
340
|
+
| `header?` | `Snippet` | — | Extra handle-bar content, rendered after the title. |
|
|
341
|
+
| `children?` | `Snippet` | — | — |
|
|
342
|
+
|
|
343
|
+
<!-- end: pane -->
|
|
344
|
+
|
|
345
|
+
<!-- begin: card -->
|
|
346
|
+
|
|
347
|
+
# Card
|
|
348
|
+
|
|
349
|
+
A surface container that can behave as a link or button.
|
|
350
|
+
|
|
351
|
+
## Import
|
|
352
|
+
|
|
353
|
+
```ts
|
|
354
|
+
import { Card } from "$lib/ui/card";
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
## Props
|
|
358
|
+
|
|
359
|
+
Inherits all props from `HTMLAttributes<HTMLElement>`.
|
|
360
|
+
Inherits all props from `AnchorBits`.
|
|
361
|
+
Inherits all props from `ButtonBits`.
|
|
362
|
+
|
|
363
|
+
| Prop | Type | Default | Notes |
|
|
364
|
+
|------|------|---------|-------|
|
|
365
|
+
| `ref?` | `CardElement \| null` | `null` | bindable |
|
|
366
|
+
| `tone?` | `'elevated' \| 'surface' \| 'flat'` | `'elevated'` | Surface tier the card paints on.
|
|
367
|
+
- `elevated` (default): the lifted surface. Use on the page background.
|
|
368
|
+
- `surface`: the base surface tier. Use when nesting cards inside another elevated container.
|
|
369
|
+
- `flat`: no background; only the rounded/padded shell. For grouping content visually without adding contrast. |
|
|
370
|
+
| `header?` | `Snippet` | — | Rendered above the body with a subtle divider. |
|
|
371
|
+
| `footer?` | `Snippet` | — | Rendered below the body with a subtle divider. |
|
|
372
|
+
| `children?` | `Snippet` | — | — |
|
|
373
|
+
|
|
374
|
+
<!-- end: card -->
|
|
375
|
+
|
|
376
|
+
<!-- begin: chip -->
|
|
377
|
+
|
|
378
|
+
# Chip
|
|
379
|
+
|
|
380
|
+
An interactive, optionally dismissible token.
|
|
381
|
+
|
|
382
|
+
## Import
|
|
383
|
+
|
|
384
|
+
```ts
|
|
385
|
+
import { Chip } from "$lib/ui/chip";
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
## Props
|
|
389
|
+
|
|
390
|
+
Inherits all props from `HTMLAttributes<HTMLDivElement>`.
|
|
391
|
+
|
|
392
|
+
| Prop | Type | Default | Notes |
|
|
393
|
+
|------|------|---------|-------|
|
|
394
|
+
| `ref?` | `HTMLDivElement \| null` | `null` | bindable |
|
|
395
|
+
| `ondismiss?` | `() => void` | — | — |
|
|
396
|
+
| `children?` | `Snippet` | — | — |
|
|
397
|
+
|
|
398
|
+
## Usage
|
|
399
|
+
|
|
400
|
+
```svelte
|
|
401
|
+
<script>
|
|
402
|
+
import { Chip } from '$lib/ui/chip';
|
|
403
|
+
|
|
404
|
+
let tags = $state(['alpha', 'beta', 'gamma']);
|
|
405
|
+
</script>
|
|
406
|
+
|
|
407
|
+
{#each tags as tag}
|
|
408
|
+
<Chip ondismiss={() => (tags = tags.filter((t) => t !== tag))}>
|
|
409
|
+
{tag}
|
|
410
|
+
</Chip>
|
|
411
|
+
{/each}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
## Notes
|
|
415
|
+
|
|
416
|
+
- Internal pointerdown/up events on the dismiss button are stopped from bubbling — this prevents accidental toggling when a Chip is nested inside a Select/Popover trigger.
|
|
417
|
+
- Uses the `xxs` tier tokens (height, radius, inset). Part of the Badge/Chip/KV "tag" family.
|
|
418
|
+
|
|
419
|
+
<!-- end: chip -->
|
|
420
|
+
|
|
421
|
+
<!-- begin: code-block -->
|
|
422
|
+
|
|
423
|
+
# Code Block
|
|
424
|
+
|
|
425
|
+
A code snippet with optional copy button.
|
|
426
|
+
|
|
427
|
+
## Import
|
|
428
|
+
|
|
429
|
+
```ts
|
|
430
|
+
import { CodeBlock } from "$lib/ui/code-block";
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
## Props
|
|
434
|
+
|
|
435
|
+
Inherits all props from `HTMLAttributes<HTMLDivElement>`.
|
|
436
|
+
|
|
437
|
+
| Prop | Type | Default | Notes |
|
|
438
|
+
|------|------|---------|-------|
|
|
439
|
+
| `ref?` | `HTMLDivElement \| null` | `null` | bindable |
|
|
440
|
+
| `code?` | `string` | — | — |
|
|
441
|
+
| `copyable?` | `boolean` | `true` | — |
|
|
442
|
+
| `children?` | `Snippet` | — | — |
|
|
443
|
+
|
|
444
|
+
<!-- end: code-block -->
|
|
445
|
+
|
|
446
|
+
<!-- begin: kv -->
|
|
447
|
+
|
|
448
|
+
# KV
|
|
449
|
+
|
|
450
|
+
A key-value pair display using Badge.
|
|
451
|
+
|
|
452
|
+
## Import
|
|
453
|
+
|
|
454
|
+
```ts
|
|
455
|
+
import { KV } from "$lib/ui/kv";
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
## Props
|
|
459
|
+
|
|
460
|
+
Inherits all props from `HTMLAttributes<HTMLSpanElement>`.
|
|
461
|
+
|
|
462
|
+
| Prop | Type | Default | Notes |
|
|
463
|
+
|------|------|---------|-------|
|
|
464
|
+
| `ref?` | `HTMLSpanElement \| null` | `null` | bindable |
|
|
465
|
+
| `key` | `string` | — | — |
|
|
466
|
+
| `value` | `string` | — | — |
|
|
467
|
+
| `tone?` | `'default' \| 'accent' \| 'destructive' \| 'success'` | `'default'` | — |
|
|
468
|
+
|
|
469
|
+
<!-- end: kv -->
|
|
470
|
+
|
|
471
|
+
<!-- begin: separator -->
|
|
472
|
+
|
|
473
|
+
# Separator
|
|
474
|
+
|
|
475
|
+
A visual divider between content.
|
|
476
|
+
|
|
477
|
+
## Import
|
|
478
|
+
|
|
479
|
+
```ts
|
|
480
|
+
import { Separator } from "$lib/ui/separator";
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
## Props
|
|
484
|
+
|
|
485
|
+
Inherits all props from `Separator.RootProps`.
|
|
486
|
+
|
|
487
|
+
| Prop | Type | Default | Notes |
|
|
488
|
+
|------|------|---------|-------|
|
|
489
|
+
| `variant?` | `'line' \| 'slant'` | `'line'` | Use `slant` for inline dividers in breadcrumbs, titles, and compact metadata. |
|
|
490
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
491
|
+
|
|
492
|
+
## Usage
|
|
493
|
+
|
|
494
|
+
```svelte
|
|
495
|
+
<script>
|
|
496
|
+
import { Separator } from '$lib/ui/separator';
|
|
497
|
+
</script>
|
|
498
|
+
|
|
499
|
+
<p>
|
|
500
|
+
era
|
|
501
|
+
<Separator variant="slant" decorative />
|
|
502
|
+
ui
|
|
503
|
+
<Separator variant="slant" decorative />
|
|
504
|
+
separator
|
|
505
|
+
</p>
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
## Notes
|
|
509
|
+
|
|
510
|
+
- `variant="slant"` is for inline text separators only, such as breadcrumbs, compact metadata, and split titles.
|
|
511
|
+
- Mark slant separators `decorative` unless they communicate a meaningful boundary to assistive technology.
|
|
512
|
+
|
|
513
|
+
<!-- end: separator -->
|
|
514
|
+
|
|
515
|
+
<!-- begin: sheet -->
|
|
516
|
+
|
|
517
|
+
# Sheet
|
|
518
|
+
|
|
519
|
+
A dialog anchored to a screen edge — a mobile drawer.
|
|
520
|
+
|
|
521
|
+
## Import
|
|
522
|
+
|
|
523
|
+
```ts
|
|
524
|
+
import { Sheet } from "$lib/ui/sheet";
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
528
|
+
|
|
529
|
+
<!-- end: sheet -->
|
|
530
|
+
|
|
531
|
+
<!-- begin: skeleton -->
|
|
532
|
+
|
|
533
|
+
# Skeleton
|
|
534
|
+
|
|
535
|
+
A placeholder shimmer for loading states.
|
|
536
|
+
|
|
537
|
+
## Import
|
|
538
|
+
|
|
539
|
+
```ts
|
|
540
|
+
import { Skeleton } from "$lib/ui/skeleton";
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
## Props
|
|
544
|
+
|
|
545
|
+
Inherits all props from `HTMLAttributes<HTMLDivElement>`.
|
|
546
|
+
|
|
547
|
+
| Prop | Type | Default | Notes |
|
|
548
|
+
|------|------|---------|-------|
|
|
549
|
+
| `ref?` | `HTMLDivElement \| null` | `null` | bindable |
|
|
550
|
+
| `variant?` | `'line' \| 'circle' \| 'block'` | `'line'` | — |
|
|
551
|
+
|
|
552
|
+
<!-- end: skeleton -->
|
|
553
|
+
|
|
554
|
+
<!-- begin: switch -->
|
|
555
|
+
|
|
556
|
+
# Switch
|
|
557
|
+
|
|
558
|
+
A toggle switch control.
|
|
559
|
+
|
|
560
|
+
## Import
|
|
561
|
+
|
|
562
|
+
```ts
|
|
563
|
+
import { Switch } from "$lib/ui/switch";
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
## Props
|
|
567
|
+
|
|
568
|
+
Inherits all props from `Switch.RootProps`.
|
|
569
|
+
|
|
570
|
+
| Prop | Type | Default | Notes |
|
|
571
|
+
|------|------|---------|-------|
|
|
572
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
573
|
+
| `checked?` | `(forwarded)` | `false` | bindable |
|
|
574
|
+
|
|
575
|
+
<!-- end: switch -->
|
|
576
|
+
|
|
577
|
+
<!-- begin: toggle -->
|
|
578
|
+
|
|
579
|
+
# Toggle
|
|
580
|
+
|
|
581
|
+
A two-state toggle button.
|
|
582
|
+
|
|
583
|
+
## Import
|
|
584
|
+
|
|
585
|
+
```ts
|
|
586
|
+
import { Toggle } from "$lib/ui/toggle";
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
## Props
|
|
590
|
+
|
|
591
|
+
Inherits all props from `WithoutChildrenOrChild<Toggle.RootProps>`.
|
|
592
|
+
Inherits all props from `Omit<ButtonVariants, 'active'>`.
|
|
593
|
+
|
|
594
|
+
| Prop | Type | Default | Notes |
|
|
595
|
+
|------|------|---------|-------|
|
|
596
|
+
| `children?` | `Snippet` | — | — |
|
|
597
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
598
|
+
| `pressed?` | `(forwarded)` | `false` | bindable |
|
|
599
|
+
|
|
600
|
+
<!-- end: toggle -->
|
|
601
|
+
|
|
602
|
+
<!-- begin: accordion -->
|
|
603
|
+
|
|
604
|
+
# Accordion
|
|
605
|
+
|
|
606
|
+
Collapsible content sections.
|
|
607
|
+
|
|
608
|
+
## Import
|
|
609
|
+
|
|
610
|
+
```ts
|
|
611
|
+
import { Accordion } from "$lib/ui/accordion";
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
615
|
+
|
|
616
|
+
- `Accordion.Root`
|
|
617
|
+
- `Accordion.Item`
|
|
618
|
+
- `Accordion.Header`
|
|
619
|
+
- `Accordion.Trigger`
|
|
620
|
+
- `Accordion.Content`
|
|
621
|
+
|
|
622
|
+
## Accordion.Root
|
|
623
|
+
|
|
624
|
+
Inherits all props from `Accordion.RootProps`.
|
|
625
|
+
|
|
626
|
+
| Prop | Type | Default | Notes |
|
|
627
|
+
|------|------|---------|-------|
|
|
628
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
629
|
+
|
|
630
|
+
## Accordion.Item
|
|
631
|
+
|
|
632
|
+
Inherits all props from `Accordion.ItemProps`.
|
|
633
|
+
|
|
634
|
+
| Prop | Type | Default | Notes |
|
|
635
|
+
|------|------|---------|-------|
|
|
636
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
637
|
+
|
|
638
|
+
## Accordion.Header
|
|
639
|
+
|
|
640
|
+
Inherits all props from `Accordion.HeaderProps`.
|
|
641
|
+
|
|
642
|
+
| Prop | Type | Default | Notes |
|
|
643
|
+
|------|------|---------|-------|
|
|
644
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
645
|
+
|
|
646
|
+
## Accordion.Trigger
|
|
647
|
+
|
|
648
|
+
Inherits all props from `PartProps<Accordion.TriggerProps>`.
|
|
649
|
+
|
|
650
|
+
| Prop | Type | Default | Notes |
|
|
651
|
+
|------|------|---------|-------|
|
|
652
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
653
|
+
|
|
654
|
+
## Accordion.Content
|
|
655
|
+
|
|
656
|
+
Inherits all props from `Accordion.ContentProps`.
|
|
657
|
+
|
|
658
|
+
| Prop | Type | Default | Notes |
|
|
659
|
+
|------|------|---------|-------|
|
|
660
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
661
|
+
|
|
662
|
+
<!-- end: accordion -->
|
|
663
|
+
|
|
664
|
+
<!-- begin: alert-dialog -->
|
|
665
|
+
|
|
666
|
+
# Alert Dialog
|
|
667
|
+
|
|
668
|
+
A modal confirmation before destructive actions.
|
|
669
|
+
|
|
670
|
+
## Import
|
|
671
|
+
|
|
672
|
+
```ts
|
|
673
|
+
import { AlertDialog } from "$lib/ui/alert-dialog";
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
677
|
+
|
|
678
|
+
- `AlertDialog.Trigger`
|
|
679
|
+
- `AlertDialog.Content`
|
|
680
|
+
- `AlertDialog.Overlay`
|
|
681
|
+
- `AlertDialog.Title`
|
|
682
|
+
- `AlertDialog.Description`
|
|
683
|
+
- `AlertDialog.Cancel`
|
|
684
|
+
- `AlertDialog.Action`
|
|
685
|
+
|
|
686
|
+
## AlertDialog.Trigger
|
|
687
|
+
|
|
688
|
+
Inherits all props from `WithoutChildrenOrChild<AlertDialog.TriggerProps>`.
|
|
689
|
+
Inherits all props from `ButtonVariants`.
|
|
690
|
+
|
|
691
|
+
| Prop | Type | Default | Notes |
|
|
692
|
+
|------|------|---------|-------|
|
|
693
|
+
| `children?` | `Snippet` | — | — |
|
|
694
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
695
|
+
|
|
696
|
+
## AlertDialog.Content
|
|
697
|
+
|
|
698
|
+
Inherits all props from `PartProps<AlertDialog.ContentProps>`.
|
|
699
|
+
|
|
700
|
+
| Prop | Type | Default | Notes |
|
|
701
|
+
|------|------|---------|-------|
|
|
702
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
703
|
+
|
|
704
|
+
## AlertDialog.Overlay
|
|
705
|
+
|
|
706
|
+
Inherits all props from `AlertDialog.OverlayProps`.
|
|
707
|
+
|
|
708
|
+
| Prop | Type | Default | Notes |
|
|
709
|
+
|------|------|---------|-------|
|
|
710
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
711
|
+
|
|
712
|
+
## AlertDialog.Title
|
|
713
|
+
|
|
714
|
+
Inherits all props from `AlertDialog.TitleProps`.
|
|
715
|
+
|
|
716
|
+
| Prop | Type | Default | Notes |
|
|
717
|
+
|------|------|---------|-------|
|
|
718
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
719
|
+
|
|
720
|
+
## AlertDialog.Description
|
|
721
|
+
|
|
722
|
+
Inherits all props from `AlertDialog.DescriptionProps`.
|
|
723
|
+
|
|
724
|
+
| Prop | Type | Default | Notes |
|
|
725
|
+
|------|------|---------|-------|
|
|
726
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
727
|
+
|
|
728
|
+
## AlertDialog.Cancel
|
|
729
|
+
|
|
730
|
+
Inherits all props from `WithoutChildrenOrChild<AlertDialog.CancelProps>`.
|
|
731
|
+
Inherits all props from `Omit<ButtonVariants, 'active'>`.
|
|
732
|
+
|
|
733
|
+
| Prop | Type | Default | Notes |
|
|
734
|
+
|------|------|---------|-------|
|
|
735
|
+
| `children?` | `Snippet` | — | — |
|
|
736
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
737
|
+
|
|
738
|
+
## AlertDialog.Action
|
|
739
|
+
|
|
740
|
+
Inherits all props from `WithoutChildrenOrChild<AlertDialog.ActionProps>`.
|
|
741
|
+
Inherits all props from `Omit<ButtonVariants, 'active'>`.
|
|
742
|
+
|
|
743
|
+
| Prop | Type | Default | Notes |
|
|
744
|
+
|------|------|---------|-------|
|
|
745
|
+
| `children?` | `Snippet` | — | — |
|
|
746
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
747
|
+
|
|
748
|
+
<!-- end: alert-dialog -->
|
|
749
|
+
|
|
750
|
+
<!-- begin: calendar -->
|
|
751
|
+
|
|
752
|
+
# Calendar
|
|
753
|
+
|
|
754
|
+
A date picker calendar grid.
|
|
755
|
+
|
|
756
|
+
## Import
|
|
757
|
+
|
|
758
|
+
```ts
|
|
759
|
+
import { Calendar } from "$lib/ui/calendar";
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
763
|
+
|
|
764
|
+
- `Calendar.Root`
|
|
765
|
+
- `Calendar.Header`
|
|
766
|
+
- `Calendar.Heading`
|
|
767
|
+
- `Calendar.PrevButton`
|
|
768
|
+
- `Calendar.NextButton`
|
|
769
|
+
- `Calendar.Grid`
|
|
770
|
+
- `Calendar.GridHead`
|
|
771
|
+
- `Calendar.GridBody`
|
|
772
|
+
- `Calendar.GridRow`
|
|
773
|
+
- `Calendar.HeadCell`
|
|
774
|
+
- `Calendar.Cell`
|
|
775
|
+
- `Calendar.Day`
|
|
776
|
+
|
|
777
|
+
## Calendar.Root
|
|
778
|
+
|
|
779
|
+
Inherits all props from `Calendar.RootProps`.
|
|
780
|
+
|
|
781
|
+
| Prop | Type | Default | Notes |
|
|
782
|
+
|------|------|---------|-------|
|
|
783
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
784
|
+
| `value?` | `(forwarded)` | — | bindable |
|
|
785
|
+
| `placeholder?` | `(forwarded)` | — | bindable |
|
|
786
|
+
|
|
787
|
+
## Calendar.Header
|
|
788
|
+
|
|
789
|
+
Inherits all props from `Calendar.HeaderProps`.
|
|
790
|
+
|
|
791
|
+
| Prop | Type | Default | Notes |
|
|
792
|
+
|------|------|---------|-------|
|
|
793
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
794
|
+
|
|
795
|
+
## Calendar.Heading
|
|
796
|
+
|
|
797
|
+
Inherits all props from `Calendar.HeadingProps`.
|
|
798
|
+
|
|
799
|
+
| Prop | Type | Default | Notes |
|
|
800
|
+
|------|------|---------|-------|
|
|
801
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
802
|
+
|
|
803
|
+
## Calendar.PrevButton
|
|
804
|
+
|
|
805
|
+
Inherits all props from `WithoutChildrenOrChild<Calendar.PrevButtonProps>`.
|
|
806
|
+
Inherits all props from `Pick<ButtonVariants, 'tone' | 'size'>`.
|
|
807
|
+
|
|
808
|
+
| Prop | Type | Default | Notes |
|
|
809
|
+
|------|------|---------|-------|
|
|
810
|
+
| `children?` | `Snippet` | — | — |
|
|
811
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
812
|
+
|
|
813
|
+
## Calendar.NextButton
|
|
814
|
+
|
|
815
|
+
Inherits all props from `WithoutChildrenOrChild<Calendar.NextButtonProps>`.
|
|
816
|
+
Inherits all props from `Pick<ButtonVariants, 'tone' | 'size'>`.
|
|
817
|
+
|
|
818
|
+
| Prop | Type | Default | Notes |
|
|
819
|
+
|------|------|---------|-------|
|
|
820
|
+
| `children?` | `Snippet` | — | — |
|
|
821
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
822
|
+
|
|
823
|
+
## Calendar.Grid
|
|
824
|
+
|
|
825
|
+
Inherits all props from `Calendar.GridProps`.
|
|
826
|
+
|
|
827
|
+
| Prop | Type | Default | Notes |
|
|
828
|
+
|------|------|---------|-------|
|
|
829
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
830
|
+
|
|
831
|
+
## Calendar.GridHead
|
|
832
|
+
|
|
833
|
+
Inherits all props from `Calendar.GridHeadProps`.
|
|
834
|
+
|
|
835
|
+
| Prop | Type | Default | Notes |
|
|
836
|
+
|------|------|---------|-------|
|
|
837
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
838
|
+
|
|
839
|
+
## Calendar.GridBody
|
|
840
|
+
|
|
841
|
+
Inherits all props from `Calendar.GridBodyProps`.
|
|
842
|
+
|
|
843
|
+
| Prop | Type | Default | Notes |
|
|
844
|
+
|------|------|---------|-------|
|
|
845
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
846
|
+
|
|
847
|
+
## Calendar.GridRow
|
|
848
|
+
|
|
849
|
+
Inherits all props from `Calendar.GridRowProps`.
|
|
850
|
+
|
|
851
|
+
| Prop | Type | Default | Notes |
|
|
852
|
+
|------|------|---------|-------|
|
|
853
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
854
|
+
|
|
855
|
+
## Calendar.HeadCell
|
|
856
|
+
|
|
857
|
+
Inherits all props from `Calendar.HeadCellProps`.
|
|
858
|
+
|
|
859
|
+
| Prop | Type | Default | Notes |
|
|
860
|
+
|------|------|---------|-------|
|
|
861
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
862
|
+
|
|
863
|
+
## Calendar.Cell
|
|
864
|
+
|
|
865
|
+
Inherits all props from `Calendar.CellProps`.
|
|
866
|
+
|
|
867
|
+
| Prop | Type | Default | Notes |
|
|
868
|
+
|------|------|---------|-------|
|
|
869
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
870
|
+
|
|
871
|
+
## Calendar.Day
|
|
872
|
+
|
|
873
|
+
Inherits all props from `Calendar.DayProps`.
|
|
874
|
+
|
|
875
|
+
| Prop | Type | Default | Notes |
|
|
876
|
+
|------|------|---------|-------|
|
|
877
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
878
|
+
|
|
879
|
+
<!-- end: calendar -->
|
|
880
|
+
|
|
881
|
+
<!-- begin: checkbox -->
|
|
882
|
+
|
|
883
|
+
# Checkbox
|
|
884
|
+
|
|
885
|
+
Toggleable check with indeterminate support.
|
|
886
|
+
|
|
887
|
+
## Import
|
|
888
|
+
|
|
889
|
+
```ts
|
|
890
|
+
import { Checkbox } from "$lib/ui/checkbox";
|
|
891
|
+
```
|
|
892
|
+
|
|
893
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
894
|
+
|
|
895
|
+
- `Checkbox.Root`
|
|
896
|
+
- `Checkbox.Group`
|
|
897
|
+
- `Checkbox.GroupLabel`
|
|
898
|
+
|
|
899
|
+
## Checkbox.Root
|
|
900
|
+
|
|
901
|
+
Inherits all props from `Checkbox.RootProps`.
|
|
902
|
+
|
|
903
|
+
| Prop | Type | Default | Notes |
|
|
904
|
+
|------|------|---------|-------|
|
|
905
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
906
|
+
| `checked?` | `(forwarded)` | `false` | bindable |
|
|
907
|
+
| `indeterminate?` | `(forwarded)` | `false` | bindable |
|
|
908
|
+
|
|
909
|
+
## Checkbox.Group
|
|
910
|
+
|
|
911
|
+
Inherits all props from `Checkbox.GroupProps`.
|
|
912
|
+
|
|
913
|
+
| Prop | Type | Default | Notes |
|
|
914
|
+
|------|------|---------|-------|
|
|
915
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
916
|
+
| `value?` | `(forwarded)` | `[]` | bindable |
|
|
917
|
+
|
|
918
|
+
## Checkbox.GroupLabel
|
|
919
|
+
|
|
920
|
+
Inherits all props from `Checkbox.GroupLabelProps`.
|
|
921
|
+
|
|
922
|
+
| Prop | Type | Default | Notes |
|
|
923
|
+
|------|------|---------|-------|
|
|
924
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
925
|
+
|
|
926
|
+
<!-- end: checkbox -->
|
|
927
|
+
|
|
928
|
+
<!-- begin: collapsible -->
|
|
929
|
+
|
|
930
|
+
# Collapsible
|
|
931
|
+
|
|
932
|
+
Show and hide content sections with a trigger.
|
|
933
|
+
|
|
934
|
+
## Import
|
|
935
|
+
|
|
936
|
+
```ts
|
|
937
|
+
import { Collapsible } from "$lib/ui/collapsible";
|
|
938
|
+
```
|
|
939
|
+
|
|
940
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
941
|
+
|
|
942
|
+
- `Collapsible.Trigger`
|
|
943
|
+
- `Collapsible.Content`
|
|
944
|
+
|
|
945
|
+
## Collapsible.Trigger
|
|
946
|
+
|
|
947
|
+
Inherits all props from `PartProps<Collapsible.TriggerProps>`.
|
|
948
|
+
|
|
949
|
+
| Prop | Type | Default | Notes |
|
|
950
|
+
|------|------|---------|-------|
|
|
951
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
952
|
+
|
|
953
|
+
## Collapsible.Content
|
|
954
|
+
|
|
955
|
+
Inherits all props from `PartProps<Collapsible.ContentProps>`.
|
|
956
|
+
|
|
957
|
+
| Prop | Type | Default | Notes |
|
|
958
|
+
|------|------|---------|-------|
|
|
959
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
960
|
+
|
|
961
|
+
<!-- end: collapsible -->
|
|
962
|
+
|
|
963
|
+
<!-- begin: combobox -->
|
|
964
|
+
|
|
965
|
+
# Combobox
|
|
966
|
+
|
|
967
|
+
Search and select from a filtered list of options.
|
|
968
|
+
|
|
969
|
+
## Import
|
|
970
|
+
|
|
971
|
+
```ts
|
|
972
|
+
import { Combobox } from "$lib/ui/combobox";
|
|
973
|
+
```
|
|
974
|
+
|
|
975
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
976
|
+
|
|
977
|
+
- `Combobox.Input`
|
|
978
|
+
- `Combobox.Trigger`
|
|
979
|
+
- `Combobox.Content`
|
|
980
|
+
- `Combobox.Item`
|
|
981
|
+
- `Combobox.Empty`
|
|
982
|
+
- `Combobox.Group`
|
|
983
|
+
- `Combobox.GroupHeading`
|
|
984
|
+
|
|
985
|
+
## Combobox.Input
|
|
986
|
+
|
|
987
|
+
Inherits all props from `Combobox.InputProps`.
|
|
988
|
+
|
|
989
|
+
| Prop | Type | Default | Notes |
|
|
990
|
+
|------|------|---------|-------|
|
|
991
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
992
|
+
|
|
993
|
+
## Combobox.Trigger
|
|
994
|
+
|
|
995
|
+
Inherits all props from `PartProps<Combobox.TriggerProps>`.
|
|
996
|
+
|
|
997
|
+
| Prop | Type | Default | Notes |
|
|
998
|
+
|------|------|---------|-------|
|
|
999
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1000
|
+
|
|
1001
|
+
## Combobox.Content
|
|
1002
|
+
|
|
1003
|
+
Inherits all props from `PartProps<Combobox.ContentProps>`.
|
|
1004
|
+
|
|
1005
|
+
| Prop | Type | Default | Notes |
|
|
1006
|
+
|------|------|---------|-------|
|
|
1007
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1008
|
+
|
|
1009
|
+
## Combobox.Item
|
|
1010
|
+
|
|
1011
|
+
Inherits all props from `Combobox.ItemProps`.
|
|
1012
|
+
|
|
1013
|
+
| Prop | Type | Default | Notes |
|
|
1014
|
+
|------|------|---------|-------|
|
|
1015
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1016
|
+
|
|
1017
|
+
## Combobox.Empty
|
|
1018
|
+
|
|
1019
|
+
| Prop | Type | Default | Notes |
|
|
1020
|
+
|------|------|---------|-------|
|
|
1021
|
+
| `children?` | `Snippet` | — | — |
|
|
1022
|
+
| `class?` | `string` | — | — |
|
|
1023
|
+
|
|
1024
|
+
## Combobox.Group
|
|
1025
|
+
|
|
1026
|
+
Inherits all props from `Combobox.GroupProps`.
|
|
1027
|
+
|
|
1028
|
+
| Prop | Type | Default | Notes |
|
|
1029
|
+
|------|------|---------|-------|
|
|
1030
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1031
|
+
|
|
1032
|
+
## Combobox.GroupHeading
|
|
1033
|
+
|
|
1034
|
+
Inherits all props from `PartProps<Combobox.GroupHeadingProps>`.
|
|
1035
|
+
|
|
1036
|
+
| Prop | Type | Default | Notes |
|
|
1037
|
+
|------|------|---------|-------|
|
|
1038
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1039
|
+
|
|
1040
|
+
<!-- end: combobox -->
|
|
1041
|
+
|
|
1042
|
+
<!-- begin: command -->
|
|
1043
|
+
|
|
1044
|
+
# Command
|
|
1045
|
+
|
|
1046
|
+
A searchable command menu for quick navigation.
|
|
1047
|
+
|
|
1048
|
+
## Import
|
|
1049
|
+
|
|
1050
|
+
```ts
|
|
1051
|
+
import { Command } from "$lib/ui/command";
|
|
1052
|
+
```
|
|
1053
|
+
|
|
1054
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
1055
|
+
|
|
1056
|
+
- `Command.Root`
|
|
1057
|
+
- `Command.Input`
|
|
1058
|
+
- `Command.List`
|
|
1059
|
+
- `Command.Viewport`
|
|
1060
|
+
- `Command.Empty`
|
|
1061
|
+
- `Command.Loading`
|
|
1062
|
+
- `Command.Group`
|
|
1063
|
+
- `Command.GroupHeading`
|
|
1064
|
+
- `Command.GroupItems`
|
|
1065
|
+
- `Command.Item`
|
|
1066
|
+
- `Command.LinkItem`
|
|
1067
|
+
- `Command.Separator`
|
|
1068
|
+
|
|
1069
|
+
## Command.Root
|
|
1070
|
+
|
|
1071
|
+
Inherits all props from `Command.RootProps`.
|
|
1072
|
+
|
|
1073
|
+
| Prop | Type | Default | Notes |
|
|
1074
|
+
|------|------|---------|-------|
|
|
1075
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1076
|
+
| `value?` | `(forwarded)` | `''` | bindable |
|
|
1077
|
+
|
|
1078
|
+
## Command.Input
|
|
1079
|
+
|
|
1080
|
+
Inherits all props from `Command.InputProps`.
|
|
1081
|
+
|
|
1082
|
+
| Prop | Type | Default | Notes |
|
|
1083
|
+
|------|------|---------|-------|
|
|
1084
|
+
| `icon?` | `Component<IconProps> \| null` | `null` | Lucide icon rendered inside the field, left of the text (e.g. a search glyph). |
|
|
1085
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1086
|
+
| `value?` | `(forwarded)` | `''` | bindable |
|
|
1087
|
+
|
|
1088
|
+
## Command.List
|
|
1089
|
+
|
|
1090
|
+
Inherits all props from `Command.ListProps`.
|
|
1091
|
+
|
|
1092
|
+
| Prop | Type | Default | Notes |
|
|
1093
|
+
|------|------|---------|-------|
|
|
1094
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1095
|
+
|
|
1096
|
+
## Command.Viewport
|
|
1097
|
+
|
|
1098
|
+
Inherits all props from `Command.ViewportProps`.
|
|
1099
|
+
|
|
1100
|
+
| Prop | Type | Default | Notes |
|
|
1101
|
+
|------|------|---------|-------|
|
|
1102
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1103
|
+
|
|
1104
|
+
## Command.Empty
|
|
1105
|
+
|
|
1106
|
+
Inherits all props from `Command.EmptyProps`.
|
|
1107
|
+
|
|
1108
|
+
| Prop | Type | Default | Notes |
|
|
1109
|
+
|------|------|---------|-------|
|
|
1110
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1111
|
+
|
|
1112
|
+
## Command.Loading
|
|
1113
|
+
|
|
1114
|
+
Inherits all props from `Command.LoadingProps`.
|
|
1115
|
+
|
|
1116
|
+
| Prop | Type | Default | Notes |
|
|
1117
|
+
|------|------|---------|-------|
|
|
1118
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1119
|
+
|
|
1120
|
+
## Command.Group
|
|
1121
|
+
|
|
1122
|
+
Inherits all props from `Command.GroupProps`.
|
|
1123
|
+
|
|
1124
|
+
| Prop | Type | Default | Notes |
|
|
1125
|
+
|------|------|---------|-------|
|
|
1126
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1127
|
+
|
|
1128
|
+
## Command.GroupHeading
|
|
1129
|
+
|
|
1130
|
+
Inherits all props from `Command.GroupHeadingProps`.
|
|
1131
|
+
|
|
1132
|
+
| Prop | Type | Default | Notes |
|
|
1133
|
+
|------|------|---------|-------|
|
|
1134
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1135
|
+
|
|
1136
|
+
## Command.GroupItems
|
|
1137
|
+
|
|
1138
|
+
Inherits all props from `Command.GroupItemsProps`.
|
|
1139
|
+
|
|
1140
|
+
| Prop | Type | Default | Notes |
|
|
1141
|
+
|------|------|---------|-------|
|
|
1142
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1143
|
+
|
|
1144
|
+
## Command.Item
|
|
1145
|
+
|
|
1146
|
+
Inherits all props from `Command.ItemProps`.
|
|
1147
|
+
|
|
1148
|
+
| Prop | Type | Default | Notes |
|
|
1149
|
+
|------|------|---------|-------|
|
|
1150
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1151
|
+
|
|
1152
|
+
## Command.LinkItem
|
|
1153
|
+
|
|
1154
|
+
Inherits all props from `Command.LinkItemProps`.
|
|
1155
|
+
|
|
1156
|
+
| Prop | Type | Default | Notes |
|
|
1157
|
+
|------|------|---------|-------|
|
|
1158
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1159
|
+
|
|
1160
|
+
## Command.Separator
|
|
1161
|
+
|
|
1162
|
+
Inherits all props from `Command.SeparatorProps`.
|
|
1163
|
+
|
|
1164
|
+
| Prop | Type | Default | Notes |
|
|
1165
|
+
|------|------|---------|-------|
|
|
1166
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1167
|
+
|
|
1168
|
+
<!-- end: command -->
|
|
1169
|
+
|
|
1170
|
+
<!-- begin: context-menu -->
|
|
1171
|
+
|
|
1172
|
+
# Context Menu
|
|
1173
|
+
|
|
1174
|
+
Options and actions triggered by right-click.
|
|
1175
|
+
|
|
1176
|
+
## Import
|
|
1177
|
+
|
|
1178
|
+
```ts
|
|
1179
|
+
import { ContextMenu } from "$lib/ui/context-menu";
|
|
1180
|
+
```
|
|
1181
|
+
|
|
1182
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
1183
|
+
|
|
1184
|
+
- `ContextMenu.Trigger`
|
|
1185
|
+
- `ContextMenu.Content`
|
|
1186
|
+
- `ContextMenu.Item`
|
|
1187
|
+
- `ContextMenu.CheckboxItem`
|
|
1188
|
+
- `ContextMenu.RadioItem`
|
|
1189
|
+
- `ContextMenu.Separator`
|
|
1190
|
+
- `ContextMenu.SubTrigger`
|
|
1191
|
+
- `ContextMenu.SubContent`
|
|
1192
|
+
- `ContextMenu.GroupHeading`
|
|
1193
|
+
|
|
1194
|
+
## ContextMenu.Trigger
|
|
1195
|
+
|
|
1196
|
+
Inherits all props from `ContextMenu.TriggerProps`.
|
|
1197
|
+
|
|
1198
|
+
| Prop | Type | Default | Notes |
|
|
1199
|
+
|------|------|---------|-------|
|
|
1200
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1201
|
+
|
|
1202
|
+
## ContextMenu.Content
|
|
1203
|
+
|
|
1204
|
+
Inherits all props from `PartProps<ContextMenu.ContentProps>`.
|
|
1205
|
+
|
|
1206
|
+
| Prop | Type | Default | Notes |
|
|
1207
|
+
|------|------|---------|-------|
|
|
1208
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1209
|
+
|
|
1210
|
+
## ContextMenu.Item
|
|
1211
|
+
|
|
1212
|
+
Inherits all props from `PartProps<ContextMenu.ItemProps>`.
|
|
1213
|
+
|
|
1214
|
+
| Prop | Type | Default | Notes |
|
|
1215
|
+
|------|------|---------|-------|
|
|
1216
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1217
|
+
|
|
1218
|
+
## ContextMenu.CheckboxItem
|
|
1219
|
+
|
|
1220
|
+
Inherits all props from `ContextMenu.CheckboxItemProps`.
|
|
1221
|
+
|
|
1222
|
+
| Prop | Type | Default | Notes |
|
|
1223
|
+
|------|------|---------|-------|
|
|
1224
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1225
|
+
| `checked?` | `(forwarded)` | `false` | bindable |
|
|
1226
|
+
|
|
1227
|
+
## ContextMenu.RadioItem
|
|
1228
|
+
|
|
1229
|
+
Inherits all props from `ContextMenu.RadioItemProps`.
|
|
1230
|
+
|
|
1231
|
+
| Prop | Type | Default | Notes |
|
|
1232
|
+
|------|------|---------|-------|
|
|
1233
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1234
|
+
|
|
1235
|
+
## ContextMenu.Separator
|
|
1236
|
+
|
|
1237
|
+
Inherits all props from `ContextMenu.SeparatorProps`.
|
|
1238
|
+
|
|
1239
|
+
| Prop | Type | Default | Notes |
|
|
1240
|
+
|------|------|---------|-------|
|
|
1241
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1242
|
+
|
|
1243
|
+
## ContextMenu.SubTrigger
|
|
1244
|
+
|
|
1245
|
+
Inherits all props from `PartProps<ContextMenu.SubTriggerProps>`.
|
|
1246
|
+
|
|
1247
|
+
| Prop | Type | Default | Notes |
|
|
1248
|
+
|------|------|---------|-------|
|
|
1249
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1250
|
+
|
|
1251
|
+
## ContextMenu.SubContent
|
|
1252
|
+
|
|
1253
|
+
Inherits all props from `PartProps<ContextMenu.SubContentProps>`.
|
|
1254
|
+
|
|
1255
|
+
| Prop | Type | Default | Notes |
|
|
1256
|
+
|------|------|---------|-------|
|
|
1257
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1258
|
+
|
|
1259
|
+
## ContextMenu.GroupHeading
|
|
1260
|
+
|
|
1261
|
+
Inherits all props from `ContextMenu.GroupHeadingProps`.
|
|
1262
|
+
|
|
1263
|
+
| Prop | Type | Default | Notes |
|
|
1264
|
+
|------|------|---------|-------|
|
|
1265
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1266
|
+
|
|
1267
|
+
<!-- end: context-menu -->
|
|
1268
|
+
|
|
1269
|
+
<!-- begin: date-field -->
|
|
1270
|
+
|
|
1271
|
+
# Date Field
|
|
1272
|
+
|
|
1273
|
+
Segmented date input with keyboard navigation.
|
|
1274
|
+
|
|
1275
|
+
## Import
|
|
1276
|
+
|
|
1277
|
+
```ts
|
|
1278
|
+
import { DateField } from "$lib/ui/date-field";
|
|
1279
|
+
```
|
|
1280
|
+
|
|
1281
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
1282
|
+
|
|
1283
|
+
- `DateField.Root`
|
|
1284
|
+
- `DateField.Input`
|
|
1285
|
+
- `DateField.Segment`
|
|
1286
|
+
- `DateField.Label`
|
|
1287
|
+
|
|
1288
|
+
## DateField.Root
|
|
1289
|
+
|
|
1290
|
+
Inherits all props from `DateField.RootProps`.
|
|
1291
|
+
|
|
1292
|
+
| Prop | Type | Default | Notes |
|
|
1293
|
+
|------|------|---------|-------|
|
|
1294
|
+
| `value?` | `(forwarded)` | — | bindable |
|
|
1295
|
+
| `placeholder?` | `(forwarded)` | — | bindable |
|
|
1296
|
+
|
|
1297
|
+
## DateField.Input
|
|
1298
|
+
|
|
1299
|
+
Inherits all props from `DateField.InputProps`.
|
|
1300
|
+
|
|
1301
|
+
| Prop | Type | Default | Notes |
|
|
1302
|
+
|------|------|---------|-------|
|
|
1303
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1304
|
+
|
|
1305
|
+
## DateField.Segment
|
|
1306
|
+
|
|
1307
|
+
Inherits all props from `DateField.SegmentProps`.
|
|
1308
|
+
|
|
1309
|
+
| Prop | Type | Default | Notes |
|
|
1310
|
+
|------|------|---------|-------|
|
|
1311
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1312
|
+
|
|
1313
|
+
## DateField.Label
|
|
1314
|
+
|
|
1315
|
+
Inherits all props from `DateField.LabelProps`.
|
|
1316
|
+
|
|
1317
|
+
| Prop | Type | Default | Notes |
|
|
1318
|
+
|------|------|---------|-------|
|
|
1319
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1320
|
+
|
|
1321
|
+
<!-- end: date-field -->
|
|
1322
|
+
|
|
1323
|
+
<!-- begin: date-picker -->
|
|
1324
|
+
|
|
1325
|
+
# Date Picker
|
|
1326
|
+
|
|
1327
|
+
Date input with a calendar popover.
|
|
1328
|
+
|
|
1329
|
+
## Import
|
|
1330
|
+
|
|
1331
|
+
```ts
|
|
1332
|
+
import { DatePicker } from "$lib/ui/date-picker";
|
|
1333
|
+
```
|
|
1334
|
+
|
|
1335
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
1336
|
+
|
|
1337
|
+
- `DatePicker.Root`
|
|
1338
|
+
- `DatePicker.Label`
|
|
1339
|
+
- `DatePicker.Input`
|
|
1340
|
+
- `DatePicker.Segment`
|
|
1341
|
+
- `DatePicker.Trigger`
|
|
1342
|
+
- `DatePicker.Content`
|
|
1343
|
+
- `DatePicker.Calendar`
|
|
1344
|
+
- `DatePicker.Header`
|
|
1345
|
+
- `DatePicker.Heading`
|
|
1346
|
+
- `DatePicker.PrevButton`
|
|
1347
|
+
- `DatePicker.NextButton`
|
|
1348
|
+
- `DatePicker.Grid`
|
|
1349
|
+
- `DatePicker.GridHead`
|
|
1350
|
+
- `DatePicker.GridBody`
|
|
1351
|
+
- `DatePicker.GridRow`
|
|
1352
|
+
- `DatePicker.HeadCell`
|
|
1353
|
+
- `DatePicker.Cell`
|
|
1354
|
+
- `DatePicker.Day`
|
|
1355
|
+
|
|
1356
|
+
## DatePicker.Root
|
|
1357
|
+
|
|
1358
|
+
Inherits all props from `DatePicker.RootProps`.
|
|
1359
|
+
|
|
1360
|
+
| Prop | Type | Default | Notes |
|
|
1361
|
+
|------|------|---------|-------|
|
|
1362
|
+
| `value?` | `(forwarded)` | — | bindable |
|
|
1363
|
+
| `placeholder?` | `(forwarded)` | — | bindable |
|
|
1364
|
+
| `open?` | `(forwarded)` | `false` | bindable |
|
|
1365
|
+
|
|
1366
|
+
## DatePicker.Label
|
|
1367
|
+
|
|
1368
|
+
Inherits all props from `DatePicker.LabelProps`.
|
|
1369
|
+
|
|
1370
|
+
| Prop | Type | Default | Notes |
|
|
1371
|
+
|------|------|---------|-------|
|
|
1372
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1373
|
+
|
|
1374
|
+
## DatePicker.Input
|
|
1375
|
+
|
|
1376
|
+
Inherits all props from `DatePicker.InputProps`.
|
|
1377
|
+
|
|
1378
|
+
| Prop | Type | Default | Notes |
|
|
1379
|
+
|------|------|---------|-------|
|
|
1380
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1381
|
+
|
|
1382
|
+
## DatePicker.Segment
|
|
1383
|
+
|
|
1384
|
+
Inherits all props from `DatePicker.SegmentProps`.
|
|
1385
|
+
|
|
1386
|
+
| Prop | Type | Default | Notes |
|
|
1387
|
+
|------|------|---------|-------|
|
|
1388
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1389
|
+
|
|
1390
|
+
## DatePicker.Trigger
|
|
1391
|
+
|
|
1392
|
+
Inherits all props from `PartProps<DatePicker.TriggerProps>`.
|
|
1393
|
+
|
|
1394
|
+
| Prop | Type | Default | Notes |
|
|
1395
|
+
|------|------|---------|-------|
|
|
1396
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1397
|
+
|
|
1398
|
+
## DatePicker.Content
|
|
1399
|
+
|
|
1400
|
+
Inherits all props from `PartProps<DatePicker.ContentProps>`.
|
|
1401
|
+
|
|
1402
|
+
| Prop | Type | Default | Notes |
|
|
1403
|
+
|------|------|---------|-------|
|
|
1404
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1405
|
+
|
|
1406
|
+
## DatePicker.Calendar
|
|
1407
|
+
|
|
1408
|
+
Inherits all props from `DatePicker.CalendarProps`.
|
|
1409
|
+
|
|
1410
|
+
| Prop | Type | Default | Notes |
|
|
1411
|
+
|------|------|---------|-------|
|
|
1412
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1413
|
+
|
|
1414
|
+
## DatePicker.Header
|
|
1415
|
+
|
|
1416
|
+
Inherits all props from `DatePicker.HeaderProps`.
|
|
1417
|
+
|
|
1418
|
+
| Prop | Type | Default | Notes |
|
|
1419
|
+
|------|------|---------|-------|
|
|
1420
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1421
|
+
|
|
1422
|
+
## DatePicker.Heading
|
|
1423
|
+
|
|
1424
|
+
Inherits all props from `DatePicker.HeadingProps`.
|
|
1425
|
+
|
|
1426
|
+
| Prop | Type | Default | Notes |
|
|
1427
|
+
|------|------|---------|-------|
|
|
1428
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1429
|
+
|
|
1430
|
+
## DatePicker.PrevButton
|
|
1431
|
+
|
|
1432
|
+
Inherits all props from `WithoutChildrenOrChild<DatePicker.PrevButtonProps>`.
|
|
1433
|
+
Inherits all props from `Pick<ButtonVariants, 'tone' | 'size'>`.
|
|
1434
|
+
|
|
1435
|
+
| Prop | Type | Default | Notes |
|
|
1436
|
+
|------|------|---------|-------|
|
|
1437
|
+
| `children?` | `Snippet` | — | — |
|
|
1438
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1439
|
+
|
|
1440
|
+
## DatePicker.NextButton
|
|
1441
|
+
|
|
1442
|
+
Inherits all props from `WithoutChildrenOrChild<DatePicker.NextButtonProps>`.
|
|
1443
|
+
Inherits all props from `Pick<ButtonVariants, 'tone' | 'size'>`.
|
|
1444
|
+
|
|
1445
|
+
| Prop | Type | Default | Notes |
|
|
1446
|
+
|------|------|---------|-------|
|
|
1447
|
+
| `children?` | `Snippet` | — | — |
|
|
1448
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1449
|
+
|
|
1450
|
+
## DatePicker.Grid
|
|
1451
|
+
|
|
1452
|
+
Inherits all props from `DatePicker.GridProps`.
|
|
1453
|
+
|
|
1454
|
+
| Prop | Type | Default | Notes |
|
|
1455
|
+
|------|------|---------|-------|
|
|
1456
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1457
|
+
|
|
1458
|
+
## DatePicker.GridHead
|
|
1459
|
+
|
|
1460
|
+
Inherits all props from `DatePicker.GridHeadProps`.
|
|
1461
|
+
|
|
1462
|
+
| Prop | Type | Default | Notes |
|
|
1463
|
+
|------|------|---------|-------|
|
|
1464
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1465
|
+
|
|
1466
|
+
## DatePicker.GridBody
|
|
1467
|
+
|
|
1468
|
+
Inherits all props from `DatePicker.GridBodyProps`.
|
|
1469
|
+
|
|
1470
|
+
| Prop | Type | Default | Notes |
|
|
1471
|
+
|------|------|---------|-------|
|
|
1472
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1473
|
+
|
|
1474
|
+
## DatePicker.GridRow
|
|
1475
|
+
|
|
1476
|
+
Inherits all props from `DatePicker.GridRowProps`.
|
|
1477
|
+
|
|
1478
|
+
| Prop | Type | Default | Notes |
|
|
1479
|
+
|------|------|---------|-------|
|
|
1480
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1481
|
+
|
|
1482
|
+
## DatePicker.HeadCell
|
|
1483
|
+
|
|
1484
|
+
Inherits all props from `DatePicker.HeadCellProps`.
|
|
1485
|
+
|
|
1486
|
+
| Prop | Type | Default | Notes |
|
|
1487
|
+
|------|------|---------|-------|
|
|
1488
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1489
|
+
|
|
1490
|
+
## DatePicker.Cell
|
|
1491
|
+
|
|
1492
|
+
Inherits all props from `DatePicker.CellProps`.
|
|
1493
|
+
|
|
1494
|
+
| Prop | Type | Default | Notes |
|
|
1495
|
+
|------|------|---------|-------|
|
|
1496
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1497
|
+
|
|
1498
|
+
## DatePicker.Day
|
|
1499
|
+
|
|
1500
|
+
Inherits all props from `DatePicker.DayProps`.
|
|
1501
|
+
|
|
1502
|
+
| Prop | Type | Default | Notes |
|
|
1503
|
+
|------|------|---------|-------|
|
|
1504
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1505
|
+
|
|
1506
|
+
<!-- end: date-picker -->
|
|
1507
|
+
|
|
1508
|
+
<!-- begin: date-range-field -->
|
|
1509
|
+
|
|
1510
|
+
# Date Range Field
|
|
1511
|
+
|
|
1512
|
+
Segmented start/end date input.
|
|
1513
|
+
|
|
1514
|
+
## Import
|
|
1515
|
+
|
|
1516
|
+
```ts
|
|
1517
|
+
import { DateRangeField } from "$lib/ui/date-range-field";
|
|
1518
|
+
```
|
|
1519
|
+
|
|
1520
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
1521
|
+
|
|
1522
|
+
- `DateRangeField.Root`
|
|
1523
|
+
- `DateRangeField.Input`
|
|
1524
|
+
- `DateRangeField.Segment`
|
|
1525
|
+
- `DateRangeField.Label`
|
|
1526
|
+
|
|
1527
|
+
## DateRangeField.Root
|
|
1528
|
+
|
|
1529
|
+
Inherits all props from `DateRangeField.RootProps`.
|
|
1530
|
+
|
|
1531
|
+
| Prop | Type | Default | Notes |
|
|
1532
|
+
|------|------|---------|-------|
|
|
1533
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1534
|
+
| `value?` | `(forwarded)` | — | bindable |
|
|
1535
|
+
| `placeholder?` | `(forwarded)` | — | bindable |
|
|
1536
|
+
|
|
1537
|
+
## DateRangeField.Input
|
|
1538
|
+
|
|
1539
|
+
Inherits all props from `DateRangeField.InputProps`.
|
|
1540
|
+
|
|
1541
|
+
| Prop | Type | Default | Notes |
|
|
1542
|
+
|------|------|---------|-------|
|
|
1543
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1544
|
+
|
|
1545
|
+
## DateRangeField.Segment
|
|
1546
|
+
|
|
1547
|
+
Inherits all props from `DateRangeField.SegmentProps`.
|
|
1548
|
+
|
|
1549
|
+
| Prop | Type | Default | Notes |
|
|
1550
|
+
|------|------|---------|-------|
|
|
1551
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1552
|
+
|
|
1553
|
+
## DateRangeField.Label
|
|
1554
|
+
|
|
1555
|
+
Inherits all props from `DateRangeField.LabelProps`.
|
|
1556
|
+
|
|
1557
|
+
| Prop | Type | Default | Notes |
|
|
1558
|
+
|------|------|---------|-------|
|
|
1559
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1560
|
+
|
|
1561
|
+
<!-- end: date-range-field -->
|
|
1562
|
+
|
|
1563
|
+
<!-- begin: date-range-picker -->
|
|
1564
|
+
|
|
1565
|
+
# Date Range Picker
|
|
1566
|
+
|
|
1567
|
+
Date range input with a calendar popover.
|
|
1568
|
+
|
|
1569
|
+
## Import
|
|
1570
|
+
|
|
1571
|
+
```ts
|
|
1572
|
+
import { DateRangePicker } from "$lib/ui/date-range-picker";
|
|
1573
|
+
```
|
|
1574
|
+
|
|
1575
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
1576
|
+
|
|
1577
|
+
- `DateRangePicker.Root`
|
|
1578
|
+
- `DateRangePicker.Label`
|
|
1579
|
+
- `DateRangePicker.Input`
|
|
1580
|
+
- `DateRangePicker.Segment`
|
|
1581
|
+
- `DateRangePicker.Trigger`
|
|
1582
|
+
- `DateRangePicker.Content`
|
|
1583
|
+
- `DateRangePicker.Calendar`
|
|
1584
|
+
- `DateRangePicker.Header`
|
|
1585
|
+
- `DateRangePicker.Heading`
|
|
1586
|
+
- `DateRangePicker.PrevButton`
|
|
1587
|
+
- `DateRangePicker.NextButton`
|
|
1588
|
+
- `DateRangePicker.Grid`
|
|
1589
|
+
- `DateRangePicker.GridHead`
|
|
1590
|
+
- `DateRangePicker.GridBody`
|
|
1591
|
+
- `DateRangePicker.GridRow`
|
|
1592
|
+
- `DateRangePicker.HeadCell`
|
|
1593
|
+
- `DateRangePicker.Cell`
|
|
1594
|
+
- `DateRangePicker.Day`
|
|
1595
|
+
|
|
1596
|
+
## DateRangePicker.Root
|
|
1597
|
+
|
|
1598
|
+
Inherits all props from `DateRangePicker.RootProps`.
|
|
1599
|
+
|
|
1600
|
+
| Prop | Type | Default | Notes |
|
|
1601
|
+
|------|------|---------|-------|
|
|
1602
|
+
| `value?` | `(forwarded)` | — | bindable |
|
|
1603
|
+
| `placeholder?` | `(forwarded)` | — | bindable |
|
|
1604
|
+
| `open?` | `(forwarded)` | `false` | bindable |
|
|
1605
|
+
|
|
1606
|
+
## DateRangePicker.Label
|
|
1607
|
+
|
|
1608
|
+
Inherits all props from `DateRangePicker.LabelProps`.
|
|
1609
|
+
|
|
1610
|
+
| Prop | Type | Default | Notes |
|
|
1611
|
+
|------|------|---------|-------|
|
|
1612
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1613
|
+
|
|
1614
|
+
## DateRangePicker.Input
|
|
1615
|
+
|
|
1616
|
+
Inherits all props from `DateRangePicker.InputProps`.
|
|
1617
|
+
|
|
1618
|
+
| Prop | Type | Default | Notes |
|
|
1619
|
+
|------|------|---------|-------|
|
|
1620
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1621
|
+
|
|
1622
|
+
## DateRangePicker.Segment
|
|
1623
|
+
|
|
1624
|
+
Inherits all props from `DateRangePicker.SegmentProps`.
|
|
1625
|
+
|
|
1626
|
+
| Prop | Type | Default | Notes |
|
|
1627
|
+
|------|------|---------|-------|
|
|
1628
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1629
|
+
|
|
1630
|
+
## DateRangePicker.Trigger
|
|
1631
|
+
|
|
1632
|
+
Inherits all props from `PartProps<DateRangePicker.TriggerProps>`.
|
|
1633
|
+
|
|
1634
|
+
| Prop | Type | Default | Notes |
|
|
1635
|
+
|------|------|---------|-------|
|
|
1636
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1637
|
+
|
|
1638
|
+
## DateRangePicker.Content
|
|
1639
|
+
|
|
1640
|
+
Inherits all props from `PartProps<DateRangePicker.ContentProps>`.
|
|
1641
|
+
|
|
1642
|
+
| Prop | Type | Default | Notes |
|
|
1643
|
+
|------|------|---------|-------|
|
|
1644
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1645
|
+
|
|
1646
|
+
## DateRangePicker.Calendar
|
|
1647
|
+
|
|
1648
|
+
Inherits all props from `DateRangePicker.CalendarProps`.
|
|
1649
|
+
|
|
1650
|
+
| Prop | Type | Default | Notes |
|
|
1651
|
+
|------|------|---------|-------|
|
|
1652
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1653
|
+
|
|
1654
|
+
## DateRangePicker.Header
|
|
1655
|
+
|
|
1656
|
+
Inherits all props from `DateRangePicker.HeaderProps`.
|
|
1657
|
+
|
|
1658
|
+
| Prop | Type | Default | Notes |
|
|
1659
|
+
|------|------|---------|-------|
|
|
1660
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1661
|
+
|
|
1662
|
+
## DateRangePicker.Heading
|
|
1663
|
+
|
|
1664
|
+
Inherits all props from `DateRangePicker.HeadingProps`.
|
|
1665
|
+
|
|
1666
|
+
| Prop | Type | Default | Notes |
|
|
1667
|
+
|------|------|---------|-------|
|
|
1668
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1669
|
+
|
|
1670
|
+
## DateRangePicker.PrevButton
|
|
1671
|
+
|
|
1672
|
+
Inherits all props from `WithoutChildrenOrChild<DateRangePicker.PrevButtonProps>`.
|
|
1673
|
+
Inherits all props from `Pick<ButtonVariants, 'tone' | 'size'>`.
|
|
1674
|
+
|
|
1675
|
+
| Prop | Type | Default | Notes |
|
|
1676
|
+
|------|------|---------|-------|
|
|
1677
|
+
| `children?` | `Snippet` | — | — |
|
|
1678
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1679
|
+
|
|
1680
|
+
## DateRangePicker.NextButton
|
|
1681
|
+
|
|
1682
|
+
Inherits all props from `WithoutChildrenOrChild<DateRangePicker.NextButtonProps>`.
|
|
1683
|
+
Inherits all props from `Pick<ButtonVariants, 'tone' | 'size'>`.
|
|
1684
|
+
|
|
1685
|
+
| Prop | Type | Default | Notes |
|
|
1686
|
+
|------|------|---------|-------|
|
|
1687
|
+
| `children?` | `Snippet` | — | — |
|
|
1688
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1689
|
+
|
|
1690
|
+
## DateRangePicker.Grid
|
|
1691
|
+
|
|
1692
|
+
Inherits all props from `DateRangePicker.GridProps`.
|
|
1693
|
+
|
|
1694
|
+
| Prop | Type | Default | Notes |
|
|
1695
|
+
|------|------|---------|-------|
|
|
1696
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1697
|
+
|
|
1698
|
+
## DateRangePicker.GridHead
|
|
1699
|
+
|
|
1700
|
+
Inherits all props from `DateRangePicker.GridHeadProps`.
|
|
1701
|
+
|
|
1702
|
+
| Prop | Type | Default | Notes |
|
|
1703
|
+
|------|------|---------|-------|
|
|
1704
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1705
|
+
|
|
1706
|
+
## DateRangePicker.GridBody
|
|
1707
|
+
|
|
1708
|
+
Inherits all props from `DateRangePicker.GridBodyProps`.
|
|
1709
|
+
|
|
1710
|
+
| Prop | Type | Default | Notes |
|
|
1711
|
+
|------|------|---------|-------|
|
|
1712
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1713
|
+
|
|
1714
|
+
## DateRangePicker.GridRow
|
|
1715
|
+
|
|
1716
|
+
Inherits all props from `DateRangePicker.GridRowProps`.
|
|
1717
|
+
|
|
1718
|
+
| Prop | Type | Default | Notes |
|
|
1719
|
+
|------|------|---------|-------|
|
|
1720
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1721
|
+
|
|
1722
|
+
## DateRangePicker.HeadCell
|
|
1723
|
+
|
|
1724
|
+
Inherits all props from `DateRangePicker.HeadCellProps`.
|
|
1725
|
+
|
|
1726
|
+
| Prop | Type | Default | Notes |
|
|
1727
|
+
|------|------|---------|-------|
|
|
1728
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1729
|
+
|
|
1730
|
+
## DateRangePicker.Cell
|
|
1731
|
+
|
|
1732
|
+
Inherits all props from `DateRangePicker.CellProps`.
|
|
1733
|
+
|
|
1734
|
+
| Prop | Type | Default | Notes |
|
|
1735
|
+
|------|------|---------|-------|
|
|
1736
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1737
|
+
|
|
1738
|
+
## DateRangePicker.Day
|
|
1739
|
+
|
|
1740
|
+
Inherits all props from `DateRangePicker.DayProps`.
|
|
1741
|
+
|
|
1742
|
+
| Prop | Type | Default | Notes |
|
|
1743
|
+
|------|------|---------|-------|
|
|
1744
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1745
|
+
|
|
1746
|
+
<!-- end: date-range-picker -->
|
|
1747
|
+
|
|
1748
|
+
<!-- begin: dialog -->
|
|
1749
|
+
|
|
1750
|
+
# Dialog
|
|
1751
|
+
|
|
1752
|
+
A modal window for content or user input.
|
|
1753
|
+
|
|
1754
|
+
## Import
|
|
1755
|
+
|
|
1756
|
+
```ts
|
|
1757
|
+
import { Dialog } from "$lib/ui/dialog";
|
|
1758
|
+
```
|
|
1759
|
+
|
|
1760
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
1761
|
+
|
|
1762
|
+
- `Dialog.Trigger`
|
|
1763
|
+
- `Dialog.Content`
|
|
1764
|
+
- `Dialog.Overlay`
|
|
1765
|
+
- `Dialog.Title`
|
|
1766
|
+
- `Dialog.Description`
|
|
1767
|
+
- `Dialog.Close`
|
|
1768
|
+
|
|
1769
|
+
## Dialog.Trigger
|
|
1770
|
+
|
|
1771
|
+
Inherits all props from `WithoutChildrenOrChild<Dialog.TriggerProps>`.
|
|
1772
|
+
Inherits all props from `ButtonVariants`.
|
|
1773
|
+
|
|
1774
|
+
| Prop | Type | Default | Notes |
|
|
1775
|
+
|------|------|---------|-------|
|
|
1776
|
+
| `children?` | `Snippet` | — | — |
|
|
1777
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1778
|
+
|
|
1779
|
+
## Dialog.Content
|
|
1780
|
+
|
|
1781
|
+
Inherits all props from `PartProps<Dialog.ContentProps>`.
|
|
1782
|
+
|
|
1783
|
+
| Prop | Type | Default | Notes |
|
|
1784
|
+
|------|------|---------|-------|
|
|
1785
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1786
|
+
|
|
1787
|
+
## Dialog.Overlay
|
|
1788
|
+
|
|
1789
|
+
Inherits all props from `Dialog.OverlayProps`.
|
|
1790
|
+
|
|
1791
|
+
| Prop | Type | Default | Notes |
|
|
1792
|
+
|------|------|---------|-------|
|
|
1793
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1794
|
+
|
|
1795
|
+
## Dialog.Title
|
|
1796
|
+
|
|
1797
|
+
Inherits all props from `Dialog.TitleProps`.
|
|
1798
|
+
|
|
1799
|
+
| Prop | Type | Default | Notes |
|
|
1800
|
+
|------|------|---------|-------|
|
|
1801
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1802
|
+
|
|
1803
|
+
## Dialog.Description
|
|
1804
|
+
|
|
1805
|
+
Inherits all props from `Dialog.DescriptionProps`.
|
|
1806
|
+
|
|
1807
|
+
| Prop | Type | Default | Notes |
|
|
1808
|
+
|------|------|---------|-------|
|
|
1809
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1810
|
+
|
|
1811
|
+
## Dialog.Close
|
|
1812
|
+
|
|
1813
|
+
Inherits all props from `WithoutChildrenOrChild<Dialog.CloseProps>`.
|
|
1814
|
+
Inherits all props from `Omit<ButtonVariants, 'active'>`.
|
|
1815
|
+
|
|
1816
|
+
| Prop | Type | Default | Notes |
|
|
1817
|
+
|------|------|---------|-------|
|
|
1818
|
+
| `children?` | `Snippet` | — | — |
|
|
1819
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1820
|
+
|
|
1821
|
+
<!-- end: dialog -->
|
|
1822
|
+
|
|
1823
|
+
<!-- begin: dropdown-menu -->
|
|
1824
|
+
|
|
1825
|
+
# Dropdown Menu
|
|
1826
|
+
|
|
1827
|
+
A menu of selectable items.
|
|
1828
|
+
|
|
1829
|
+
## Import
|
|
1830
|
+
|
|
1831
|
+
```ts
|
|
1832
|
+
import { DropdownMenu } from "$lib/ui/dropdown-menu";
|
|
1833
|
+
```
|
|
1834
|
+
|
|
1835
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
1836
|
+
|
|
1837
|
+
- `DropdownMenu.Trigger`
|
|
1838
|
+
- `DropdownMenu.Content`
|
|
1839
|
+
- `DropdownMenu.Item`
|
|
1840
|
+
- `DropdownMenu.CheckboxItem`
|
|
1841
|
+
- `DropdownMenu.RadioItem`
|
|
1842
|
+
- `DropdownMenu.Separator`
|
|
1843
|
+
- `DropdownMenu.SubTrigger`
|
|
1844
|
+
- `DropdownMenu.SubContent`
|
|
1845
|
+
- `DropdownMenu.GroupHeading`
|
|
1846
|
+
|
|
1847
|
+
## DropdownMenu.Trigger
|
|
1848
|
+
|
|
1849
|
+
Inherits all props from `PartProps<DropdownMenu.TriggerProps>`.
|
|
1850
|
+
|
|
1851
|
+
| Prop | Type | Default | Notes |
|
|
1852
|
+
|------|------|---------|-------|
|
|
1853
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1854
|
+
|
|
1855
|
+
## DropdownMenu.Content
|
|
1856
|
+
|
|
1857
|
+
Inherits all props from `PartProps<DropdownMenu.ContentProps>`.
|
|
1858
|
+
|
|
1859
|
+
| Prop | Type | Default | Notes |
|
|
1860
|
+
|------|------|---------|-------|
|
|
1861
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1862
|
+
|
|
1863
|
+
## DropdownMenu.Item
|
|
1864
|
+
|
|
1865
|
+
Inherits all props from `PartProps<DropdownMenu.ItemProps>`.
|
|
1866
|
+
|
|
1867
|
+
| Prop | Type | Default | Notes |
|
|
1868
|
+
|------|------|---------|-------|
|
|
1869
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1870
|
+
|
|
1871
|
+
## DropdownMenu.CheckboxItem
|
|
1872
|
+
|
|
1873
|
+
Inherits all props from `DropdownMenu.CheckboxItemProps`.
|
|
1874
|
+
|
|
1875
|
+
| Prop | Type | Default | Notes |
|
|
1876
|
+
|------|------|---------|-------|
|
|
1877
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1878
|
+
| `checked?` | `(forwarded)` | `false` | bindable |
|
|
1879
|
+
|
|
1880
|
+
## DropdownMenu.RadioItem
|
|
1881
|
+
|
|
1882
|
+
Inherits all props from `DropdownMenu.RadioItemProps`.
|
|
1883
|
+
|
|
1884
|
+
| Prop | Type | Default | Notes |
|
|
1885
|
+
|------|------|---------|-------|
|
|
1886
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1887
|
+
|
|
1888
|
+
## DropdownMenu.Separator
|
|
1889
|
+
|
|
1890
|
+
Inherits all props from `DropdownMenu.SeparatorProps`.
|
|
1891
|
+
|
|
1892
|
+
| Prop | Type | Default | Notes |
|
|
1893
|
+
|------|------|---------|-------|
|
|
1894
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1895
|
+
|
|
1896
|
+
## DropdownMenu.SubTrigger
|
|
1897
|
+
|
|
1898
|
+
Inherits all props from `PartProps<DropdownMenu.SubTriggerProps>`.
|
|
1899
|
+
|
|
1900
|
+
| Prop | Type | Default | Notes |
|
|
1901
|
+
|------|------|---------|-------|
|
|
1902
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1903
|
+
|
|
1904
|
+
## DropdownMenu.SubContent
|
|
1905
|
+
|
|
1906
|
+
Inherits all props from `PartProps<DropdownMenu.SubContentProps>`.
|
|
1907
|
+
|
|
1908
|
+
| Prop | Type | Default | Notes |
|
|
1909
|
+
|------|------|---------|-------|
|
|
1910
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1911
|
+
|
|
1912
|
+
## DropdownMenu.GroupHeading
|
|
1913
|
+
|
|
1914
|
+
Inherits all props from `DropdownMenu.GroupHeadingProps`.
|
|
1915
|
+
|
|
1916
|
+
| Prop | Type | Default | Notes |
|
|
1917
|
+
|------|------|---------|-------|
|
|
1918
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1919
|
+
|
|
1920
|
+
<!-- end: dropdown-menu -->
|
|
1921
|
+
|
|
1922
|
+
<!-- begin: file-upload -->
|
|
1923
|
+
|
|
1924
|
+
# File Upload
|
|
1925
|
+
|
|
1926
|
+
A file input with click-to-browse and drag-and-drop.
|
|
1927
|
+
|
|
1928
|
+
## Import
|
|
1929
|
+
|
|
1930
|
+
```ts
|
|
1931
|
+
import { FileUpload } from "$lib/ui/file-upload";
|
|
1932
|
+
```
|
|
1933
|
+
|
|
1934
|
+
## Props
|
|
1935
|
+
|
|
1936
|
+
Inherits all props from `Omit<HTMLInputAttributes, 'type' | 'files'>`.
|
|
1937
|
+
|
|
1938
|
+
| Prop | Type | Default | Notes |
|
|
1939
|
+
|------|------|---------|-------|
|
|
1940
|
+
| `ref?` | `HTMLInputElement \| null` | `null` | bindable |
|
|
1941
|
+
| `files?` | `FileList \| null` | `null` | bindable |
|
|
1942
|
+
|
|
1943
|
+
<!-- end: file-upload -->
|
|
1944
|
+
|
|
1945
|
+
<!-- begin: scroll-area -->
|
|
1946
|
+
|
|
1947
|
+
# Scroll Area
|
|
1948
|
+
|
|
1949
|
+
A cross-platform scroll container.
|
|
1950
|
+
|
|
1951
|
+
## Import
|
|
1952
|
+
|
|
1953
|
+
```ts
|
|
1954
|
+
import { ScrollArea } from "$lib/ui/scroll-area";
|
|
1955
|
+
```
|
|
1956
|
+
|
|
1957
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
1958
|
+
|
|
1959
|
+
- `ScrollArea.Root`
|
|
1960
|
+
- `ScrollArea.Viewport`
|
|
1961
|
+
- `ScrollArea.Scrollbar`
|
|
1962
|
+
- `ScrollArea.Thumb`
|
|
1963
|
+
- `ScrollArea.Corner`
|
|
1964
|
+
|
|
1965
|
+
## ScrollArea.Root
|
|
1966
|
+
|
|
1967
|
+
Inherits all props from `ScrollArea.RootProps`.
|
|
1968
|
+
|
|
1969
|
+
| Prop | Type | Default | Notes |
|
|
1970
|
+
|------|------|---------|-------|
|
|
1971
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1972
|
+
|
|
1973
|
+
## ScrollArea.Viewport
|
|
1974
|
+
|
|
1975
|
+
Inherits all props from `ScrollArea.ViewportProps`.
|
|
1976
|
+
|
|
1977
|
+
| Prop | Type | Default | Notes |
|
|
1978
|
+
|------|------|---------|-------|
|
|
1979
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1980
|
+
|
|
1981
|
+
## ScrollArea.Scrollbar
|
|
1982
|
+
|
|
1983
|
+
Inherits all props from `ScrollArea.ScrollbarProps`.
|
|
1984
|
+
|
|
1985
|
+
| Prop | Type | Default | Notes |
|
|
1986
|
+
|------|------|---------|-------|
|
|
1987
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1988
|
+
|
|
1989
|
+
## ScrollArea.Thumb
|
|
1990
|
+
|
|
1991
|
+
Inherits all props from `ScrollArea.ThumbProps`.
|
|
1992
|
+
|
|
1993
|
+
| Prop | Type | Default | Notes |
|
|
1994
|
+
|------|------|---------|-------|
|
|
1995
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
1996
|
+
|
|
1997
|
+
## ScrollArea.Corner
|
|
1998
|
+
|
|
1999
|
+
Inherits all props from `ScrollArea.CornerProps`.
|
|
2000
|
+
|
|
2001
|
+
| Prop | Type | Default | Notes |
|
|
2002
|
+
|------|------|---------|-------|
|
|
2003
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2004
|
+
|
|
2005
|
+
<!-- end: scroll-area -->
|
|
2006
|
+
|
|
2007
|
+
<!-- begin: input -->
|
|
2008
|
+
|
|
2009
|
+
# Input
|
|
2010
|
+
|
|
2011
|
+
A text input field, with textarea variant.
|
|
2012
|
+
|
|
2013
|
+
## Import
|
|
2014
|
+
|
|
2015
|
+
```ts
|
|
2016
|
+
import { Input } from "$lib/ui/input";
|
|
2017
|
+
```
|
|
2018
|
+
|
|
2019
|
+
## Props
|
|
2020
|
+
|
|
2021
|
+
Inherits all props from `HTMLInputAttributes`.
|
|
2022
|
+
|
|
2023
|
+
| Prop | Type | Default | Notes |
|
|
2024
|
+
|------|------|---------|-------|
|
|
2025
|
+
| `ref?` | `HTMLInputElement \| null` | `null` | bindable |
|
|
2026
|
+
| `value?` | `(forwarded)` | `''` | bindable |
|
|
2027
|
+
|
|
2028
|
+
<!-- end: input -->
|
|
2029
|
+
|
|
2030
|
+
<!-- begin: link-preview -->
|
|
2031
|
+
|
|
2032
|
+
# Link Preview
|
|
2033
|
+
|
|
2034
|
+
Shows rich preview content when hovering a link.
|
|
2035
|
+
|
|
2036
|
+
## Import
|
|
2037
|
+
|
|
2038
|
+
```ts
|
|
2039
|
+
import { LinkPreview } from "$lib/ui/link-preview";
|
|
2040
|
+
```
|
|
2041
|
+
|
|
2042
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2043
|
+
|
|
2044
|
+
- `LinkPreview.Trigger`
|
|
2045
|
+
- `LinkPreview.Content`
|
|
2046
|
+
|
|
2047
|
+
## LinkPreview.Trigger
|
|
2048
|
+
|
|
2049
|
+
Inherits all props from `PartProps<LinkPreview.TriggerProps>`.
|
|
2050
|
+
|
|
2051
|
+
| Prop | Type | Default | Notes |
|
|
2052
|
+
|------|------|---------|-------|
|
|
2053
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2054
|
+
|
|
2055
|
+
## LinkPreview.Content
|
|
2056
|
+
|
|
2057
|
+
Inherits all props from `PartProps<LinkPreview.ContentProps>`.
|
|
2058
|
+
|
|
2059
|
+
| Prop | Type | Default | Notes |
|
|
2060
|
+
|------|------|---------|-------|
|
|
2061
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2062
|
+
|
|
2063
|
+
<!-- end: link-preview -->
|
|
2064
|
+
|
|
2065
|
+
<!-- begin: label -->
|
|
2066
|
+
|
|
2067
|
+
# Label
|
|
2068
|
+
|
|
2069
|
+
Identifies or describes associated UI elements.
|
|
2070
|
+
|
|
2071
|
+
## Import
|
|
2072
|
+
|
|
2073
|
+
```ts
|
|
2074
|
+
import { Label } from "$lib/ui/label";
|
|
2075
|
+
```
|
|
2076
|
+
|
|
2077
|
+
## Props
|
|
2078
|
+
|
|
2079
|
+
Inherits all props from `PartProps<Label.RootProps>`.
|
|
2080
|
+
|
|
2081
|
+
| Prop | Type | Default | Notes |
|
|
2082
|
+
|------|------|---------|-------|
|
|
2083
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2084
|
+
|
|
2085
|
+
<!-- end: label -->
|
|
2086
|
+
|
|
2087
|
+
<!-- begin: menu -->
|
|
2088
|
+
|
|
2089
|
+
# Menu
|
|
2090
|
+
|
|
2091
|
+
Headless menu primitives re-exported from bits-ui.
|
|
2092
|
+
|
|
2093
|
+
## Import
|
|
2094
|
+
|
|
2095
|
+
```ts
|
|
2096
|
+
import { Menu } from "$lib/ui/menu";
|
|
2097
|
+
```
|
|
2098
|
+
|
|
2099
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2100
|
+
|
|
2101
|
+
<!-- end: menu -->
|
|
2102
|
+
|
|
2103
|
+
<!-- begin: menubar -->
|
|
2104
|
+
|
|
2105
|
+
# Menubar
|
|
2106
|
+
|
|
2107
|
+
A horizontal bar of dropdown menus.
|
|
2108
|
+
|
|
2109
|
+
## Import
|
|
2110
|
+
|
|
2111
|
+
```ts
|
|
2112
|
+
import { Menubar } from "$lib/ui/menubar";
|
|
2113
|
+
```
|
|
2114
|
+
|
|
2115
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2116
|
+
|
|
2117
|
+
- `Menubar.Root`
|
|
2118
|
+
- `Menubar.Trigger`
|
|
2119
|
+
- `Menubar.Content`
|
|
2120
|
+
- `Menubar.Item`
|
|
2121
|
+
- `Menubar.CheckboxItem`
|
|
2122
|
+
- `Menubar.RadioItem`
|
|
2123
|
+
- `Menubar.Separator`
|
|
2124
|
+
- `Menubar.SubTrigger`
|
|
2125
|
+
- `Menubar.SubContent`
|
|
2126
|
+
- `Menubar.GroupHeading`
|
|
2127
|
+
|
|
2128
|
+
## Menubar.Root
|
|
2129
|
+
|
|
2130
|
+
Inherits all props from `Menubar.RootProps`.
|
|
2131
|
+
|
|
2132
|
+
| Prop | Type | Default | Notes |
|
|
2133
|
+
|------|------|---------|-------|
|
|
2134
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2135
|
+
|
|
2136
|
+
## Menubar.Trigger
|
|
2137
|
+
|
|
2138
|
+
Inherits all props from `PartProps<Menubar.TriggerProps>`.
|
|
2139
|
+
|
|
2140
|
+
| Prop | Type | Default | Notes |
|
|
2141
|
+
|------|------|---------|-------|
|
|
2142
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2143
|
+
|
|
2144
|
+
## Menubar.Content
|
|
2145
|
+
|
|
2146
|
+
Inherits all props from `PartProps<Menubar.ContentProps>`.
|
|
2147
|
+
|
|
2148
|
+
| Prop | Type | Default | Notes |
|
|
2149
|
+
|------|------|---------|-------|
|
|
2150
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2151
|
+
|
|
2152
|
+
## Menubar.Item
|
|
2153
|
+
|
|
2154
|
+
Inherits all props from `PartProps<Menubar.ItemProps>`.
|
|
2155
|
+
|
|
2156
|
+
| Prop | Type | Default | Notes |
|
|
2157
|
+
|------|------|---------|-------|
|
|
2158
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2159
|
+
|
|
2160
|
+
## Menubar.CheckboxItem
|
|
2161
|
+
|
|
2162
|
+
Inherits all props from `Menubar.CheckboxItemProps`.
|
|
2163
|
+
|
|
2164
|
+
| Prop | Type | Default | Notes |
|
|
2165
|
+
|------|------|---------|-------|
|
|
2166
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2167
|
+
| `checked?` | `(forwarded)` | `false` | bindable |
|
|
2168
|
+
|
|
2169
|
+
## Menubar.RadioItem
|
|
2170
|
+
|
|
2171
|
+
Inherits all props from `Menubar.RadioItemProps`.
|
|
2172
|
+
|
|
2173
|
+
| Prop | Type | Default | Notes |
|
|
2174
|
+
|------|------|---------|-------|
|
|
2175
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2176
|
+
|
|
2177
|
+
## Menubar.Separator
|
|
2178
|
+
|
|
2179
|
+
Inherits all props from `Menubar.SeparatorProps`.
|
|
2180
|
+
|
|
2181
|
+
| Prop | Type | Default | Notes |
|
|
2182
|
+
|------|------|---------|-------|
|
|
2183
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2184
|
+
|
|
2185
|
+
## Menubar.SubTrigger
|
|
2186
|
+
|
|
2187
|
+
Inherits all props from `PartProps<Menubar.SubTriggerProps>`.
|
|
2188
|
+
|
|
2189
|
+
| Prop | Type | Default | Notes |
|
|
2190
|
+
|------|------|---------|-------|
|
|
2191
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2192
|
+
|
|
2193
|
+
## Menubar.SubContent
|
|
2194
|
+
|
|
2195
|
+
Inherits all props from `PartProps<Menubar.SubContentProps>`.
|
|
2196
|
+
|
|
2197
|
+
| Prop | Type | Default | Notes |
|
|
2198
|
+
|------|------|---------|-------|
|
|
2199
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2200
|
+
|
|
2201
|
+
## Menubar.GroupHeading
|
|
2202
|
+
|
|
2203
|
+
Inherits all props from `Menubar.GroupHeadingProps`.
|
|
2204
|
+
|
|
2205
|
+
| Prop | Type | Default | Notes |
|
|
2206
|
+
|------|------|---------|-------|
|
|
2207
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2208
|
+
|
|
2209
|
+
<!-- end: menubar -->
|
|
2210
|
+
|
|
2211
|
+
<!-- begin: meter -->
|
|
2212
|
+
|
|
2213
|
+
# Meter
|
|
2214
|
+
|
|
2215
|
+
Displays a value within a known range.
|
|
2216
|
+
|
|
2217
|
+
## Import
|
|
2218
|
+
|
|
2219
|
+
```ts
|
|
2220
|
+
import { Meter } from "$lib/ui/meter";
|
|
2221
|
+
```
|
|
2222
|
+
|
|
2223
|
+
## Props
|
|
2224
|
+
|
|
2225
|
+
Inherits all props from `Meter.RootProps`.
|
|
2226
|
+
|
|
2227
|
+
| Prop | Type | Default | Notes |
|
|
2228
|
+
|------|------|---------|-------|
|
|
2229
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2230
|
+
|
|
2231
|
+
<!-- end: meter -->
|
|
2232
|
+
|
|
2233
|
+
<!-- begin: navigation-menu -->
|
|
2234
|
+
|
|
2235
|
+
# Navigation Menu
|
|
2236
|
+
|
|
2237
|
+
Headless navigation-menu primitives re-exported from bits-ui.
|
|
2238
|
+
|
|
2239
|
+
## Import
|
|
2240
|
+
|
|
2241
|
+
```ts
|
|
2242
|
+
import { NavigationMenu } from "$lib/ui/navigation-menu";
|
|
2243
|
+
```
|
|
2244
|
+
|
|
2245
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2246
|
+
|
|
2247
|
+
<!-- end: navigation-menu -->
|
|
2248
|
+
|
|
2249
|
+
<!-- begin: mode -->
|
|
2250
|
+
|
|
2251
|
+
# Mode
|
|
2252
|
+
|
|
2253
|
+
Scoped density / surface / corners override for any subtree.
|
|
2254
|
+
|
|
2255
|
+
## Import
|
|
2256
|
+
|
|
2257
|
+
```ts
|
|
2258
|
+
import { Mode } from "$lib/ui/mode";
|
|
2259
|
+
```
|
|
2260
|
+
|
|
2261
|
+
## Props
|
|
2262
|
+
|
|
2263
|
+
Inherits all props from `HTMLAttributes<HTMLDivElement>`.
|
|
2264
|
+
|
|
2265
|
+
| Prop | Type | Default | Notes |
|
|
2266
|
+
|------|------|---------|-------|
|
|
2267
|
+
| `mode?` | `ProviderMode` | — | — |
|
|
2268
|
+
| `surface?` | `Surface` | — | — |
|
|
2269
|
+
| `corners?` | `Corners` | — | — |
|
|
2270
|
+
| `font?` | `Font` | — | — |
|
|
2271
|
+
| `motion?` | `Motion` | — | — |
|
|
2272
|
+
| `primary?` | `string` | — | Any CSS color — sets --color-primary for this subtree. |
|
|
2273
|
+
| `primaryFg?` | `string` | — | Foreground against `primary` — sets --color-primary-fg. |
|
|
2274
|
+
| `children?` | `Snippet` | — | — |
|
|
2275
|
+
|
|
2276
|
+
<!-- end: mode -->
|
|
2277
|
+
|
|
2278
|
+
<!-- begin: pagination -->
|
|
2279
|
+
|
|
2280
|
+
# Pagination
|
|
2281
|
+
|
|
2282
|
+
Enables users to navigate through a series of pages.
|
|
2283
|
+
|
|
2284
|
+
## Import
|
|
2285
|
+
|
|
2286
|
+
```ts
|
|
2287
|
+
import { Pagination } from "$lib/ui/pagination";
|
|
2288
|
+
```
|
|
2289
|
+
|
|
2290
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2291
|
+
|
|
2292
|
+
- `Pagination.Root`
|
|
2293
|
+
- `Pagination.Page`
|
|
2294
|
+
- `Pagination.PrevButton`
|
|
2295
|
+
- `Pagination.NextButton`
|
|
2296
|
+
|
|
2297
|
+
## Pagination.Root
|
|
2298
|
+
|
|
2299
|
+
Inherits all props from `Pagination.RootProps`.
|
|
2300
|
+
|
|
2301
|
+
| Prop | Type | Default | Notes |
|
|
2302
|
+
|------|------|---------|-------|
|
|
2303
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2304
|
+
| `page?` | `(forwarded)` | `1` | bindable |
|
|
2305
|
+
|
|
2306
|
+
## Pagination.Page
|
|
2307
|
+
|
|
2308
|
+
Inherits all props from `WithoutChildrenOrChild<Pagination.PageProps>`.
|
|
2309
|
+
Inherits all props from `Pick<ButtonVariants, 'tone' | 'size'>`.
|
|
2310
|
+
|
|
2311
|
+
| Prop | Type | Default | Notes |
|
|
2312
|
+
|------|------|---------|-------|
|
|
2313
|
+
| `children?` | `Snippet` | — | — |
|
|
2314
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2315
|
+
|
|
2316
|
+
## Pagination.PrevButton
|
|
2317
|
+
|
|
2318
|
+
Inherits all props from `WithoutChildrenOrChild<Pagination.PrevButtonProps>`.
|
|
2319
|
+
Inherits all props from `Pick<ButtonVariants, 'tone' | 'size'>`.
|
|
2320
|
+
|
|
2321
|
+
| Prop | Type | Default | Notes |
|
|
2322
|
+
|------|------|---------|-------|
|
|
2323
|
+
| `children?` | `Snippet` | — | — |
|
|
2324
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2325
|
+
|
|
2326
|
+
## Pagination.NextButton
|
|
2327
|
+
|
|
2328
|
+
Inherits all props from `WithoutChildrenOrChild<Pagination.NextButtonProps>`.
|
|
2329
|
+
Inherits all props from `Pick<ButtonVariants, 'tone' | 'size'>`.
|
|
2330
|
+
|
|
2331
|
+
| Prop | Type | Default | Notes |
|
|
2332
|
+
|------|------|---------|-------|
|
|
2333
|
+
| `children?` | `Snippet` | — | — |
|
|
2334
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2335
|
+
|
|
2336
|
+
<!-- end: pagination -->
|
|
2337
|
+
|
|
2338
|
+
<!-- begin: pin-input -->
|
|
2339
|
+
|
|
2340
|
+
# PIN Input
|
|
2341
|
+
|
|
2342
|
+
Enables users to input a sequence of one-character inputs.
|
|
2343
|
+
|
|
2344
|
+
## Import
|
|
2345
|
+
|
|
2346
|
+
```ts
|
|
2347
|
+
import { PinInput } from "$lib/ui/pin-input";
|
|
2348
|
+
```
|
|
2349
|
+
|
|
2350
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2351
|
+
|
|
2352
|
+
- `PinInput.Root`
|
|
2353
|
+
- `PinInput.Cell`
|
|
2354
|
+
|
|
2355
|
+
## PinInput.Root
|
|
2356
|
+
|
|
2357
|
+
Inherits all props from `PinInput.RootProps`.
|
|
2358
|
+
|
|
2359
|
+
| Prop | Type | Default | Notes |
|
|
2360
|
+
|------|------|---------|-------|
|
|
2361
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2362
|
+
| `value?` | `(forwarded)` | `''` | bindable |
|
|
2363
|
+
|
|
2364
|
+
## PinInput.Cell
|
|
2365
|
+
|
|
2366
|
+
Inherits all props from `WithoutChildrenOrChild<PinInput.CellProps>`.
|
|
2367
|
+
|
|
2368
|
+
| Prop | Type | Default | Notes |
|
|
2369
|
+
|------|------|---------|-------|
|
|
2370
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2371
|
+
|
|
2372
|
+
<!-- end: pin-input -->
|
|
2373
|
+
|
|
2374
|
+
<!-- begin: popover -->
|
|
2375
|
+
|
|
2376
|
+
# Popover
|
|
2377
|
+
|
|
2378
|
+
A floating panel anchored to a trigger.
|
|
2379
|
+
|
|
2380
|
+
## Import
|
|
2381
|
+
|
|
2382
|
+
```ts
|
|
2383
|
+
import { Popover } from "$lib/ui/popover";
|
|
2384
|
+
```
|
|
2385
|
+
|
|
2386
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2387
|
+
|
|
2388
|
+
- `Popover.Trigger`
|
|
2389
|
+
- `Popover.Content`
|
|
2390
|
+
- `Popover.Close`
|
|
2391
|
+
|
|
2392
|
+
## Popover.Trigger
|
|
2393
|
+
|
|
2394
|
+
Inherits all props from `WithoutChildrenOrChild<Popover.TriggerProps>`.
|
|
2395
|
+
Inherits all props from `ButtonVariants`.
|
|
2396
|
+
|
|
2397
|
+
| Prop | Type | Default | Notes |
|
|
2398
|
+
|------|------|---------|-------|
|
|
2399
|
+
| `children?` | `Snippet` | — | — |
|
|
2400
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2401
|
+
|
|
2402
|
+
## Popover.Content
|
|
2403
|
+
|
|
2404
|
+
Inherits all props from `PartProps<Popover.ContentProps>`.
|
|
2405
|
+
|
|
2406
|
+
| Prop | Type | Default | Notes |
|
|
2407
|
+
|------|------|---------|-------|
|
|
2408
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2409
|
+
|
|
2410
|
+
## Popover.Close
|
|
2411
|
+
|
|
2412
|
+
Inherits all props from `WithoutChildrenOrChild<Popover.CloseProps>`.
|
|
2413
|
+
Inherits all props from `Omit<ButtonVariants, 'active'>`.
|
|
2414
|
+
|
|
2415
|
+
| Prop | Type | Default | Notes |
|
|
2416
|
+
|------|------|---------|-------|
|
|
2417
|
+
| `children?` | `Snippet` | — | — |
|
|
2418
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2419
|
+
|
|
2420
|
+
<!-- end: popover -->
|
|
2421
|
+
|
|
2422
|
+
<!-- begin: progress -->
|
|
2423
|
+
|
|
2424
|
+
# Progress
|
|
2425
|
+
|
|
2426
|
+
Shows the completion status of a task.
|
|
2427
|
+
|
|
2428
|
+
## Import
|
|
2429
|
+
|
|
2430
|
+
```ts
|
|
2431
|
+
import { Progress } from "$lib/ui/progress";
|
|
2432
|
+
```
|
|
2433
|
+
|
|
2434
|
+
## Props
|
|
2435
|
+
|
|
2436
|
+
Inherits all props from `Progress.RootProps`.
|
|
2437
|
+
|
|
2438
|
+
| Prop | Type | Default | Notes |
|
|
2439
|
+
|------|------|---------|-------|
|
|
2440
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2441
|
+
|
|
2442
|
+
<!-- end: progress -->
|
|
2443
|
+
|
|
2444
|
+
<!-- begin: range-calendar -->
|
|
2445
|
+
|
|
2446
|
+
# Range Calendar
|
|
2447
|
+
|
|
2448
|
+
Headless range-calendar primitives re-exported from bits-ui.
|
|
2449
|
+
|
|
2450
|
+
## Import
|
|
2451
|
+
|
|
2452
|
+
```ts
|
|
2453
|
+
import { RangeCalendar } from "$lib/ui/range-calendar";
|
|
2454
|
+
```
|
|
2455
|
+
|
|
2456
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2457
|
+
|
|
2458
|
+
<!-- end: range-calendar -->
|
|
2459
|
+
|
|
2460
|
+
<!-- begin: radio-group -->
|
|
2461
|
+
|
|
2462
|
+
# Radio Group
|
|
2463
|
+
|
|
2464
|
+
Groups radio items for single selection.
|
|
2465
|
+
|
|
2466
|
+
## Import
|
|
2467
|
+
|
|
2468
|
+
```ts
|
|
2469
|
+
import { RadioGroup } from "$lib/ui/radio-group";
|
|
2470
|
+
```
|
|
2471
|
+
|
|
2472
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2473
|
+
|
|
2474
|
+
- `RadioGroup.Root`
|
|
2475
|
+
- `RadioGroup.Item`
|
|
2476
|
+
|
|
2477
|
+
## RadioGroup.Root
|
|
2478
|
+
|
|
2479
|
+
Inherits all props from `RadioGroup.RootProps`.
|
|
2480
|
+
|
|
2481
|
+
| Prop | Type | Default | Notes |
|
|
2482
|
+
|------|------|---------|-------|
|
|
2483
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2484
|
+
| `value?` | `(forwarded)` | `''` | bindable |
|
|
2485
|
+
|
|
2486
|
+
## RadioGroup.Item
|
|
2487
|
+
|
|
2488
|
+
Inherits all props from `RadioGroup.ItemProps`.
|
|
2489
|
+
|
|
2490
|
+
| Prop | Type | Default | Notes |
|
|
2491
|
+
|------|------|---------|-------|
|
|
2492
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2493
|
+
|
|
2494
|
+
<!-- end: radio-group -->
|
|
2495
|
+
|
|
2496
|
+
<!-- begin: rating-group -->
|
|
2497
|
+
|
|
2498
|
+
# Rating Group
|
|
2499
|
+
|
|
2500
|
+
A star-style single-choice rating input.
|
|
2501
|
+
|
|
2502
|
+
## Import
|
|
2503
|
+
|
|
2504
|
+
```ts
|
|
2505
|
+
import { RatingGroup } from "$lib/ui/rating-group";
|
|
2506
|
+
```
|
|
2507
|
+
|
|
2508
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2509
|
+
|
|
2510
|
+
- `RatingGroup.Root`
|
|
2511
|
+
- `RatingGroup.Item`
|
|
2512
|
+
|
|
2513
|
+
## RatingGroup.Root
|
|
2514
|
+
|
|
2515
|
+
Inherits all props from `RatingGroup.RootProps`.
|
|
2516
|
+
|
|
2517
|
+
| Prop | Type | Default | Notes |
|
|
2518
|
+
|------|------|---------|-------|
|
|
2519
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2520
|
+
| `value?` | `(forwarded)` | `0` | bindable |
|
|
2521
|
+
|
|
2522
|
+
## RatingGroup.Item
|
|
2523
|
+
|
|
2524
|
+
Inherits all props from `RatingGroup.ItemProps`.
|
|
2525
|
+
|
|
2526
|
+
| Prop | Type | Default | Notes |
|
|
2527
|
+
|------|------|---------|-------|
|
|
2528
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2529
|
+
|
|
2530
|
+
<!-- end: rating-group -->
|
|
2531
|
+
|
|
2532
|
+
<!-- begin: select -->
|
|
2533
|
+
|
|
2534
|
+
# Select
|
|
2535
|
+
|
|
2536
|
+
A dropdown select menu.
|
|
2537
|
+
|
|
2538
|
+
## Import
|
|
2539
|
+
|
|
2540
|
+
```ts
|
|
2541
|
+
import { Select } from "$lib/ui/select";
|
|
2542
|
+
```
|
|
2543
|
+
|
|
2544
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2545
|
+
|
|
2546
|
+
- `Select.Trigger`
|
|
2547
|
+
- `Select.Value`
|
|
2548
|
+
- `Select.Content`
|
|
2549
|
+
- `Select.Item`
|
|
2550
|
+
|
|
2551
|
+
## Select.Trigger
|
|
2552
|
+
|
|
2553
|
+
Inherits all props from `PartProps<Select.TriggerProps>`.
|
|
2554
|
+
|
|
2555
|
+
| Prop | Type | Default | Notes |
|
|
2556
|
+
|------|------|---------|-------|
|
|
2557
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2558
|
+
|
|
2559
|
+
## Select.Value
|
|
2560
|
+
|
|
2561
|
+
Inherits all props from `WithoutChildrenOrChild<Select.ValueProps>`.
|
|
2562
|
+
|
|
2563
|
+
| Prop | Type | Default | Notes |
|
|
2564
|
+
|------|------|---------|-------|
|
|
2565
|
+
| `children?` | `Snippet<[SnippetProps]>` | — | — |
|
|
2566
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2567
|
+
|
|
2568
|
+
## Select.Content
|
|
2569
|
+
|
|
2570
|
+
Inherits all props from `PartProps<Select.ContentProps>`.
|
|
2571
|
+
|
|
2572
|
+
| Prop | Type | Default | Notes |
|
|
2573
|
+
|------|------|---------|-------|
|
|
2574
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2575
|
+
|
|
2576
|
+
## Select.Item
|
|
2577
|
+
|
|
2578
|
+
Inherits all props from `Select.ItemProps`.
|
|
2579
|
+
|
|
2580
|
+
| Prop | Type | Default | Notes |
|
|
2581
|
+
|------|------|---------|-------|
|
|
2582
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2583
|
+
|
|
2584
|
+
<!-- end: select -->
|
|
2585
|
+
|
|
2586
|
+
<!-- begin: slider -->
|
|
2587
|
+
|
|
2588
|
+
# Slider
|
|
2589
|
+
|
|
2590
|
+
Enables value selection from a continuous range.
|
|
2591
|
+
|
|
2592
|
+
## Import
|
|
2593
|
+
|
|
2594
|
+
```ts
|
|
2595
|
+
import { Slider } from "$lib/ui/slider";
|
|
2596
|
+
```
|
|
2597
|
+
|
|
2598
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2599
|
+
|
|
2600
|
+
- `Slider.Root`
|
|
2601
|
+
- `Slider.Range`
|
|
2602
|
+
- `Slider.Thumb`
|
|
2603
|
+
- `Slider.Tick`
|
|
2604
|
+
- `Slider.TickLabel`
|
|
2605
|
+
- `Slider.ThumbLabel`
|
|
2606
|
+
|
|
2607
|
+
## Slider.Root
|
|
2608
|
+
|
|
2609
|
+
Inherits all props from `Slider.RootProps`.
|
|
2610
|
+
|
|
2611
|
+
| Prop | Type | Default | Notes |
|
|
2612
|
+
|------|------|---------|-------|
|
|
2613
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2614
|
+
| `value?` | `(forwarded)` | `0` | bindable |
|
|
2615
|
+
|
|
2616
|
+
## Slider.Range
|
|
2617
|
+
|
|
2618
|
+
Inherits all props from `Slider.RangeProps`.
|
|
2619
|
+
|
|
2620
|
+
| Prop | Type | Default | Notes |
|
|
2621
|
+
|------|------|---------|-------|
|
|
2622
|
+
| `trackClass?` | `string` | — | — |
|
|
2623
|
+
| `progress?` | `number` | — | Optional secondary fill (0–1) painted underneath the active range —
|
|
2624
|
+
e.g. buffered fraction on a media seek bar. Clamped to [0, 1] and
|
|
2625
|
+
rendered with reduced opacity so the active range stays dominant. |
|
|
2626
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2627
|
+
|
|
2628
|
+
## Slider.Thumb
|
|
2629
|
+
|
|
2630
|
+
Inherits all props from `Slider.ThumbProps`.
|
|
2631
|
+
|
|
2632
|
+
| Prop | Type | Default | Notes |
|
|
2633
|
+
|------|------|---------|-------|
|
|
2634
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2635
|
+
|
|
2636
|
+
## Slider.Tick
|
|
2637
|
+
|
|
2638
|
+
Inherits all props from `Slider.TickProps`.
|
|
2639
|
+
|
|
2640
|
+
| Prop | Type | Default | Notes |
|
|
2641
|
+
|------|------|---------|-------|
|
|
2642
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2643
|
+
|
|
2644
|
+
## Slider.TickLabel
|
|
2645
|
+
|
|
2646
|
+
Inherits all props from `Slider.TickLabelProps`.
|
|
2647
|
+
|
|
2648
|
+
| Prop | Type | Default | Notes |
|
|
2649
|
+
|------|------|---------|-------|
|
|
2650
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2651
|
+
|
|
2652
|
+
## Slider.ThumbLabel
|
|
2653
|
+
|
|
2654
|
+
Inherits all props from `Slider.ThumbLabelProps`.
|
|
2655
|
+
|
|
2656
|
+
| Prop | Type | Default | Notes |
|
|
2657
|
+
|------|------|---------|-------|
|
|
2658
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2659
|
+
|
|
2660
|
+
<!-- end: slider -->
|
|
2661
|
+
|
|
2662
|
+
<!-- begin: table -->
|
|
2663
|
+
|
|
2664
|
+
# Table
|
|
2665
|
+
|
|
2666
|
+
A tabular data display with rows, headers, and cells.
|
|
2667
|
+
|
|
2668
|
+
## Import
|
|
2669
|
+
|
|
2670
|
+
```ts
|
|
2671
|
+
import { Table } from "$lib/ui/table";
|
|
2672
|
+
```
|
|
2673
|
+
|
|
2674
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2675
|
+
|
|
2676
|
+
- `Table.Root`
|
|
2677
|
+
- `Table.Head`
|
|
2678
|
+
- `Table.Body`
|
|
2679
|
+
- `Table.Row`
|
|
2680
|
+
- `Table.HeadCell`
|
|
2681
|
+
- `Table.Cell`
|
|
2682
|
+
|
|
2683
|
+
## Table.Root
|
|
2684
|
+
|
|
2685
|
+
Inherits all props from `HTMLTableAttributes`.
|
|
2686
|
+
|
|
2687
|
+
| Prop | Type | Default | Notes |
|
|
2688
|
+
|------|------|---------|-------|
|
|
2689
|
+
| `ref?` | `HTMLTableElement \| null` | `null` | bindable |
|
|
2690
|
+
| `variant?` | `'default' \| 'cells'` | `'default'` | Visual treatment. `default` paints divider lines between rows. `cells`
|
|
2691
|
+
separates every cell into its own rounded muted surface — think the
|
|
2692
|
+
markdown-table look from Claude Code Desktop. Descendant rows and
|
|
2693
|
+
cells style themselves against `data-variant` on this element, so
|
|
2694
|
+
mixing the two forms in one tree isn't supported. |
|
|
2695
|
+
| `children?` | `Snippet` | — | — |
|
|
2696
|
+
|
|
2697
|
+
## Table.Head
|
|
2698
|
+
|
|
2699
|
+
Inherits all props from `HTMLAttributes<HTMLTableSectionElement>`.
|
|
2700
|
+
|
|
2701
|
+
| Prop | Type | Default | Notes |
|
|
2702
|
+
|------|------|---------|-------|
|
|
2703
|
+
| `ref?` | `HTMLTableSectionElement \| null` | `null` | bindable |
|
|
2704
|
+
| `children?` | `Snippet` | — | — |
|
|
2705
|
+
|
|
2706
|
+
## Table.Body
|
|
2707
|
+
|
|
2708
|
+
Inherits all props from `HTMLAttributes<HTMLTableSectionElement>`.
|
|
2709
|
+
|
|
2710
|
+
| Prop | Type | Default | Notes |
|
|
2711
|
+
|------|------|---------|-------|
|
|
2712
|
+
| `ref?` | `HTMLTableSectionElement \| null` | `null` | bindable |
|
|
2713
|
+
| `children?` | `Snippet` | — | — |
|
|
2714
|
+
|
|
2715
|
+
## Table.Row
|
|
2716
|
+
|
|
2717
|
+
Inherits all props from `HTMLAttributes<HTMLTableRowElement>`.
|
|
2718
|
+
|
|
2719
|
+
| Prop | Type | Default | Notes |
|
|
2720
|
+
|------|------|---------|-------|
|
|
2721
|
+
| `ref?` | `HTMLTableRowElement \| null` | `null` | bindable |
|
|
2722
|
+
| `children?` | `Snippet` | — | — |
|
|
2723
|
+
|
|
2724
|
+
## Table.HeadCell
|
|
2725
|
+
|
|
2726
|
+
Inherits all props from `HTMLThAttributes`.
|
|
2727
|
+
|
|
2728
|
+
| Prop | Type | Default | Notes |
|
|
2729
|
+
|------|------|---------|-------|
|
|
2730
|
+
| `ref?` | `HTMLTableCellElement \| null` | `null` | bindable |
|
|
2731
|
+
| `children?` | `Snippet` | — | — |
|
|
2732
|
+
|
|
2733
|
+
## Table.Cell
|
|
2734
|
+
|
|
2735
|
+
Inherits all props from `HTMLTdAttributes`.
|
|
2736
|
+
|
|
2737
|
+
| Prop | Type | Default | Notes |
|
|
2738
|
+
|------|------|---------|-------|
|
|
2739
|
+
| `ref?` | `HTMLTableCellElement \| null` | `null` | bindable |
|
|
2740
|
+
| `children?` | `Snippet` | — | — |
|
|
2741
|
+
|
|
2742
|
+
## Usage
|
|
2743
|
+
|
|
2744
|
+
```svelte
|
|
2745
|
+
<script lang="ts">
|
|
2746
|
+
import { Table } from '$lib/ui/table';
|
|
2747
|
+
|
|
2748
|
+
const rows = [
|
|
2749
|
+
{ id: 1, name: 'Ada', role: 'Engineer' },
|
|
2750
|
+
{ id: 2, name: 'Grace', role: 'Designer' }
|
|
2751
|
+
];
|
|
2752
|
+
</script>
|
|
2753
|
+
|
|
2754
|
+
<Table.Root>
|
|
2755
|
+
<Table.Head>
|
|
2756
|
+
<Table.Row>
|
|
2757
|
+
<Table.HeadCell>Name</Table.HeadCell>
|
|
2758
|
+
<Table.HeadCell>Role</Table.HeadCell>
|
|
2759
|
+
</Table.Row>
|
|
2760
|
+
</Table.Head>
|
|
2761
|
+
<Table.Body>
|
|
2762
|
+
{#each rows as row (row.id)}
|
|
2763
|
+
<Table.Row>
|
|
2764
|
+
<Table.Cell>{row.name}</Table.Cell>
|
|
2765
|
+
<Table.Cell>{row.role}</Table.Cell>
|
|
2766
|
+
</Table.Row>
|
|
2767
|
+
{/each}
|
|
2768
|
+
</Table.Body>
|
|
2769
|
+
</Table.Root>
|
|
2770
|
+
```
|
|
2771
|
+
|
|
2772
|
+
## Notes
|
|
2773
|
+
|
|
2774
|
+
- Composition-first API (like `Table.Row`), not a single data-driven component — keeps layout decisions local to the call site.
|
|
2775
|
+
- All parts pass through `class` and standard HTML attrs.
|
|
2776
|
+
- Density tokens drive row height and cell padding.
|
|
2777
|
+
|
|
2778
|
+
<!-- end: table -->
|
|
2779
|
+
|
|
2780
|
+
<!-- begin: tabs -->
|
|
2781
|
+
|
|
2782
|
+
# Tabs
|
|
2783
|
+
|
|
2784
|
+
Organizes content into tabbed sections.
|
|
2785
|
+
|
|
2786
|
+
## Import
|
|
2787
|
+
|
|
2788
|
+
```ts
|
|
2789
|
+
import { Tabs } from "$lib/ui/tabs";
|
|
2790
|
+
```
|
|
2791
|
+
|
|
2792
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2793
|
+
|
|
2794
|
+
- `Tabs.Root`
|
|
2795
|
+
- `Tabs.List`
|
|
2796
|
+
- `Tabs.Trigger`
|
|
2797
|
+
- `Tabs.Content`
|
|
2798
|
+
|
|
2799
|
+
## Tabs.Root
|
|
2800
|
+
|
|
2801
|
+
Inherits all props from `Tabs.RootProps`.
|
|
2802
|
+
|
|
2803
|
+
| Prop | Type | Default | Notes |
|
|
2804
|
+
|------|------|---------|-------|
|
|
2805
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2806
|
+
|
|
2807
|
+
## Tabs.List
|
|
2808
|
+
|
|
2809
|
+
Inherits all props from `Tabs.ListProps`.
|
|
2810
|
+
|
|
2811
|
+
| Prop | Type | Default | Notes |
|
|
2812
|
+
|------|------|---------|-------|
|
|
2813
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2814
|
+
|
|
2815
|
+
## Tabs.Trigger
|
|
2816
|
+
|
|
2817
|
+
Inherits all props from `Tabs.TriggerProps`.
|
|
2818
|
+
|
|
2819
|
+
| Prop | Type | Default | Notes |
|
|
2820
|
+
|------|------|---------|-------|
|
|
2821
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2822
|
+
|
|
2823
|
+
## Tabs.Content
|
|
2824
|
+
|
|
2825
|
+
Inherits all props from `Tabs.ContentProps`.
|
|
2826
|
+
|
|
2827
|
+
| Prop | Type | Default | Notes |
|
|
2828
|
+
|------|------|---------|-------|
|
|
2829
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2830
|
+
|
|
2831
|
+
<!-- end: tabs -->
|
|
2832
|
+
|
|
2833
|
+
<!-- begin: time-field -->
|
|
2834
|
+
|
|
2835
|
+
# Time Field
|
|
2836
|
+
|
|
2837
|
+
Segmented time input with keyboard navigation.
|
|
2838
|
+
|
|
2839
|
+
## Import
|
|
2840
|
+
|
|
2841
|
+
```ts
|
|
2842
|
+
import { TimeField } from "$lib/ui/time-field";
|
|
2843
|
+
```
|
|
2844
|
+
|
|
2845
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2846
|
+
|
|
2847
|
+
- `TimeField.Root`
|
|
2848
|
+
- `TimeField.Input`
|
|
2849
|
+
- `TimeField.Segment`
|
|
2850
|
+
- `TimeField.Label`
|
|
2851
|
+
|
|
2852
|
+
## TimeField.Root
|
|
2853
|
+
|
|
2854
|
+
Inherits all props from `TimeField.RootProps`.
|
|
2855
|
+
|
|
2856
|
+
| Prop | Type | Default | Notes |
|
|
2857
|
+
|------|------|---------|-------|
|
|
2858
|
+
| `value?` | `(forwarded)` | — | bindable |
|
|
2859
|
+
| `placeholder?` | `(forwarded)` | — | bindable |
|
|
2860
|
+
|
|
2861
|
+
## TimeField.Input
|
|
2862
|
+
|
|
2863
|
+
Inherits all props from `TimeField.InputProps`.
|
|
2864
|
+
|
|
2865
|
+
| Prop | Type | Default | Notes |
|
|
2866
|
+
|------|------|---------|-------|
|
|
2867
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2868
|
+
|
|
2869
|
+
## TimeField.Segment
|
|
2870
|
+
|
|
2871
|
+
Inherits all props from `TimeField.SegmentProps`.
|
|
2872
|
+
|
|
2873
|
+
| Prop | Type | Default | Notes |
|
|
2874
|
+
|------|------|---------|-------|
|
|
2875
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2876
|
+
|
|
2877
|
+
## TimeField.Label
|
|
2878
|
+
|
|
2879
|
+
Inherits all props from `TimeField.LabelProps`.
|
|
2880
|
+
|
|
2881
|
+
| Prop | Type | Default | Notes |
|
|
2882
|
+
|------|------|---------|-------|
|
|
2883
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2884
|
+
|
|
2885
|
+
<!-- end: time-field -->
|
|
2886
|
+
|
|
2887
|
+
<!-- begin: time-range-field -->
|
|
2888
|
+
|
|
2889
|
+
# Time Range Field
|
|
2890
|
+
|
|
2891
|
+
Segmented start/end time input.
|
|
2892
|
+
|
|
2893
|
+
## Import
|
|
2894
|
+
|
|
2895
|
+
```ts
|
|
2896
|
+
import { TimeRangeField } from "$lib/ui/time-range-field";
|
|
2897
|
+
```
|
|
2898
|
+
|
|
2899
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2900
|
+
|
|
2901
|
+
- `TimeRangeField.Root`
|
|
2902
|
+
- `TimeRangeField.Input`
|
|
2903
|
+
- `TimeRangeField.Segment`
|
|
2904
|
+
- `TimeRangeField.Label`
|
|
2905
|
+
|
|
2906
|
+
## TimeRangeField.Root
|
|
2907
|
+
|
|
2908
|
+
Inherits all props from `TimeRangeField.RootProps`.
|
|
2909
|
+
|
|
2910
|
+
| Prop | Type | Default | Notes |
|
|
2911
|
+
|------|------|---------|-------|
|
|
2912
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2913
|
+
| `value?` | `(forwarded)` | — | bindable |
|
|
2914
|
+
| `placeholder?` | `(forwarded)` | — | bindable |
|
|
2915
|
+
|
|
2916
|
+
## TimeRangeField.Input
|
|
2917
|
+
|
|
2918
|
+
Inherits all props from `TimeRangeField.InputProps`.
|
|
2919
|
+
|
|
2920
|
+
| Prop | Type | Default | Notes |
|
|
2921
|
+
|------|------|---------|-------|
|
|
2922
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2923
|
+
|
|
2924
|
+
## TimeRangeField.Segment
|
|
2925
|
+
|
|
2926
|
+
Inherits all props from `TimeRangeField.SegmentProps`.
|
|
2927
|
+
|
|
2928
|
+
| Prop | Type | Default | Notes |
|
|
2929
|
+
|------|------|---------|-------|
|
|
2930
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2931
|
+
|
|
2932
|
+
## TimeRangeField.Label
|
|
2933
|
+
|
|
2934
|
+
Inherits all props from `TimeRangeField.LabelProps`.
|
|
2935
|
+
|
|
2936
|
+
| Prop | Type | Default | Notes |
|
|
2937
|
+
|------|------|---------|-------|
|
|
2938
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2939
|
+
|
|
2940
|
+
<!-- end: time-range-field -->
|
|
2941
|
+
|
|
2942
|
+
<!-- begin: toggle-group -->
|
|
2943
|
+
|
|
2944
|
+
# Toggle Group
|
|
2945
|
+
|
|
2946
|
+
A set of toggle buttons with single or multiple selection.
|
|
2947
|
+
|
|
2948
|
+
## Import
|
|
2949
|
+
|
|
2950
|
+
```ts
|
|
2951
|
+
import { ToggleGroup } from "$lib/ui/toggle-group";
|
|
2952
|
+
```
|
|
2953
|
+
|
|
2954
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2955
|
+
|
|
2956
|
+
- `ToggleGroup.Root`
|
|
2957
|
+
- `ToggleGroup.Item`
|
|
2958
|
+
|
|
2959
|
+
## ToggleGroup.Root
|
|
2960
|
+
|
|
2961
|
+
Inherits all props from `PartProps<ToggleGroup.RootProps>`.
|
|
2962
|
+
|
|
2963
|
+
| Prop | Type | Default | Notes |
|
|
2964
|
+
|------|------|---------|-------|
|
|
2965
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2966
|
+
|
|
2967
|
+
## ToggleGroup.Item
|
|
2968
|
+
|
|
2969
|
+
Inherits all props from `ToggleGroup.ItemProps`.
|
|
2970
|
+
|
|
2971
|
+
| Prop | Type | Default | Notes |
|
|
2972
|
+
|------|------|---------|-------|
|
|
2973
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
2974
|
+
|
|
2975
|
+
<!-- end: toggle-group -->
|
|
2976
|
+
|
|
2977
|
+
<!-- begin: toolbar -->
|
|
2978
|
+
|
|
2979
|
+
# Toolbar
|
|
2980
|
+
|
|
2981
|
+
Headless toolbar primitives re-exported from bits-ui.
|
|
2982
|
+
|
|
2983
|
+
## Import
|
|
2984
|
+
|
|
2985
|
+
```ts
|
|
2986
|
+
import { Toolbar } from "$lib/ui/toolbar";
|
|
2987
|
+
```
|
|
2988
|
+
|
|
2989
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
2990
|
+
|
|
2991
|
+
<!-- end: toolbar -->
|
|
2992
|
+
|
|
2993
|
+
<!-- begin: video-player -->
|
|
2994
|
+
|
|
2995
|
+
# Video Player
|
|
2996
|
+
|
|
2997
|
+
A vidstack-powered player with support for MP4, HLS, and live streams.
|
|
2998
|
+
|
|
2999
|
+
## Import
|
|
3000
|
+
|
|
3001
|
+
```ts
|
|
3002
|
+
import { VideoPlayer } from "$lib/ui/video-player";
|
|
3003
|
+
```
|
|
3004
|
+
|
|
3005
|
+
## Props
|
|
3006
|
+
|
|
3007
|
+
| Prop | Type | Default | Notes |
|
|
3008
|
+
|------|------|---------|-------|
|
|
3009
|
+
| `ref?` | `HTMLElement \| null` | `null` | bindable |
|
|
3010
|
+
| `src` | `string` | — | — |
|
|
3011
|
+
| `poster?` | `string` | — | — |
|
|
3012
|
+
| `chapters?` | `string \| ChapterTrack` | — | Optional WebVTT chapters track. Pass a URL or full track descriptor. |
|
|
3013
|
+
| `preload?` | `'none' \| 'metadata' \| 'auto'` | `'metadata'` | — |
|
|
3014
|
+
| `load?` | `'eager' \| 'idle' \| 'visible' \| 'custom'` | `'visible'` | — |
|
|
3015
|
+
| `muted?` | `boolean` | `false` | — |
|
|
3016
|
+
| `autoplay?` | `boolean` | `false` | — |
|
|
3017
|
+
| `loop?` | `boolean` | `false` | — |
|
|
3018
|
+
| `playsinline?` | `boolean` | `true` | — |
|
|
3019
|
+
| `crossorigin?` | `'anonymous' \| 'use-credentials'` | — | — |
|
|
3020
|
+
| `initialVolume?` | `number` | — | Initial volume (0–1). |
|
|
3021
|
+
| `initialPlaybackRate?` | `number` | — | Initial playback rate (e.g. 1, 1.5, 2). |
|
|
3022
|
+
| `aspectRatio?` | `number` | — | Force a fixed aspect ratio as width/height, e.g. 16/9. |
|
|
3023
|
+
| `viewType?` | `'unknown' \| 'audio' \| 'video'` | — | — |
|
|
3024
|
+
| `streamType?` | `'unknown' \| 'on-demand' \| 'live' \| 'live:dvr' \| 'll-live' \| 'll-live:dvr'` | — | — |
|
|
3025
|
+
| `fullscreenOrientation?` | `\| 'any' \| 'natural' \| 'landscape' \| 'portrait' \| 'portrait-primary' \| 'portrait-secondary' \| 'landscape-primary' \| 'landscape-secondary'` | — | — |
|
|
3026
|
+
| `controls?` | `boolean` | `false` | Fall back to the provider's native controls instead of the custom chrome. |
|
|
3027
|
+
| `play?` | `boolean` | `true` | Show the play / pause button in the custom chrome. |
|
|
3028
|
+
| `time?` | `boolean` | `true` | Show the elapsed and duration time badges. |
|
|
3029
|
+
| `skip?` | `boolean \| number` | `false` | Show ±N-second skip buttons. `true` defaults to 10s; pass a number to override. |
|
|
3030
|
+
| `volume?` | `boolean` | `false` | Show the mute toggle and volume slider. |
|
|
3031
|
+
| `volumeOrientation?` | `'horizontal' \| 'vertical'` | `'horizontal'` | Layout direction for the volume slider. |
|
|
3032
|
+
| `speed?` | `boolean` | `false` | Show the playback-speed dropdown. |
|
|
3033
|
+
| `quality?` | `boolean` | `false` | Show the quality dropdown. Auto-hidden when the source exposes no quality options (e.g. plain MP4). |
|
|
3034
|
+
| `pip?` | `boolean` | `false` | Show the picture-in-picture toggle. |
|
|
3035
|
+
| `fullscreen?` | `boolean` | `false` | Show the fullscreen toggle. |
|
|
3036
|
+
| `seekPreview?` | `boolean` | `false` | Show a hover preview above the seek bar with the cursor's time and (if available) the chapter at that point. |
|
|
3037
|
+
| `contextMenu?` | `boolean` | `false` | Enable a right-click context menu mirroring the enabled chrome plus a download shortcut. |
|
|
3038
|
+
| `autoHide?` | `boolean` | `true` | Whether the controls bar fades when the user is idle during playback. Set `false` to keep it visible. |
|
|
3039
|
+
| `idleDelay?` | `number` | `500` | Delay (ms) of inactivity during playback before vidstack flips `userIdle` to true.
|
|
3040
|
+
Maps to the player's `user-idle-delay` attribute. Defaults to 500 ms (vidstack's
|
|
3041
|
+
own default is 2000 ms). |
|
|
3042
|
+
| `idleWhilePaused?` | `boolean` | `false` | Vidstack only fades the bar while playing (deliberately — its `MediaUserController`
|
|
3043
|
+
bails out of idle tracking on `pause`). Set this to `true` to also hide the bar
|
|
3044
|
+
while paused after `idleDelay` ms of pointer/keyboard inactivity. |
|
|
3045
|
+
| `mobileTimelineOnly?` | `boolean` | `true` | On narrow viewports / coarse-pointer devices, auto-collapse to a "timeline-only"
|
|
3046
|
+
layout — every chrome control suppresses regardless of its individual prop, leaving
|
|
3047
|
+
just the seek bar. Set `false` to honor the chrome props as-is on mobile too. |
|
|
3048
|
+
| `keyDisabled?` | `boolean` | `false` | — |
|
|
3049
|
+
| `keyTarget?` | `'document' \| 'player'` | — | — |
|
|
3050
|
+
| `keyShortcuts?` | `Record<string, string>` | — | — |
|
|
3051
|
+
| `onplay?` | `(e: Event) => void` | — | — |
|
|
3052
|
+
| `onpause?` | `(e: Event) => void` | — | — |
|
|
3053
|
+
| `onended?` | `(e: Event) => void` | — | — |
|
|
3054
|
+
| `onplaying?` | `(e: Event) => void` | — | — |
|
|
3055
|
+
| `onseeked?` | `(e: MediaEventWithDetail<number>) => void` | — | — |
|
|
3056
|
+
| `onseeking?` | `(e: MediaEventWithDetail<number>) => void` | — | — |
|
|
3057
|
+
| `oncanplay?` | `(e: Event) => void` | — | — |
|
|
3058
|
+
| `ontimeupdate?` | `(e: MediaEventWithDetail<{ currentTime: number; played: TimeRanges }>) => void` | — | — |
|
|
3059
|
+
| `onvolumechange?` | `(e: MediaEventWithDetail<{ volume: number; muted: boolean }>) => void` | — | — |
|
|
3060
|
+
| `onratechange?` | `(e: MediaEventWithDetail<number>) => void` | — | — |
|
|
3061
|
+
| `ondurationchange?` | `(e: MediaEventWithDetail<number>) => void` | — | — |
|
|
3062
|
+
| `onloadedmetadata?` | `(e: Event) => void` | — | — |
|
|
3063
|
+
| `onfullscreenchange?` | `(e: MediaEventWithDetail<boolean>) => void` | — | — |
|
|
3064
|
+
| `onpipchange?` | `(e: MediaEventWithDetail<boolean>) => void` | — | — |
|
|
3065
|
+
| `onerror?` | `(e: Event) => void` | — | — |
|
|
3066
|
+
| `children?` | `Snippet` | — | Optional override for the entire controls layer — replaces the default chrome. |
|
|
3067
|
+
| `class?` | `string` | — | — |
|
|
3068
|
+
|
|
3069
|
+
<!-- end: video-player -->
|
|
3070
|
+
|
|
3071
|
+
<!-- begin: tooltip -->
|
|
3072
|
+
|
|
3073
|
+
# Tooltip
|
|
3074
|
+
|
|
3075
|
+
Supplementary info on hover or focus.
|
|
3076
|
+
|
|
3077
|
+
## Import
|
|
3078
|
+
|
|
3079
|
+
```ts
|
|
3080
|
+
import { Tooltip } from "$lib/ui/tooltip";
|
|
3081
|
+
```
|
|
3082
|
+
|
|
3083
|
+
Composed from sub-components — compose explicitly at the call site:
|
|
3084
|
+
|
|
3085
|
+
- `Tooltip.Trigger`
|
|
3086
|
+
- `Tooltip.Content`
|
|
3087
|
+
|
|
3088
|
+
## Tooltip.Trigger
|
|
3089
|
+
|
|
3090
|
+
Inherits all props from `Tooltip.TriggerProps`.
|
|
3091
|
+
|
|
3092
|
+
| Prop | Type | Default | Notes |
|
|
3093
|
+
|------|------|---------|-------|
|
|
3094
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
3095
|
+
|
|
3096
|
+
## Tooltip.Content
|
|
3097
|
+
|
|
3098
|
+
Inherits all props from `PartProps<Tooltip.ContentProps>`.
|
|
3099
|
+
|
|
3100
|
+
| Prop | Type | Default | Notes |
|
|
3101
|
+
|------|------|---------|-------|
|
|
3102
|
+
| `ref?` | `(forwarded)` | `null` | bindable |
|
|
3103
|
+
|
|
3104
|
+
<!-- end: tooltip -->
|