shapes-ui 0.4.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +47 -0
  2. package/.github/ISSUE_TEMPLATE/config.yml +1 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.yml +31 -0
  4. package/.github/pull_request_template.md +14 -0
  5. package/.github/workflows/pr-preview.yml +75 -0
  6. package/.github/workflows/release.yml +8 -0
  7. package/CHANGELOG.md +30 -0
  8. package/CODE_OF_CONDUCT.md +41 -0
  9. package/CONTRIBUTING.md +52 -0
  10. package/README.md +18 -0
  11. package/SECURITY.md +0 -0
  12. package/content/components/accordion.mdx +13 -0
  13. package/content/components/alert-dialog.mdx +34 -0
  14. package/content/components/autocomplete.mdx +62 -0
  15. package/content/components/avatar.mdx +11 -0
  16. package/content/components/button.mdx +8 -0
  17. package/content/components/checkbox.mdx +11 -0
  18. package/content/components/collapsible.mdx +11 -0
  19. package/content/components/combobox.mdx +33 -0
  20. package/content/components/context-menu.mdx +29 -0
  21. package/content/components/dialog.mdx +33 -0
  22. package/content/components/drawer.mdx +38 -0
  23. package/content/components/field.mdx +23 -2
  24. package/content/components/fieldset.mdx +11 -1
  25. package/content/components/form.mdx +8 -0
  26. package/content/components/input.mdx +4 -0
  27. package/content/components/menu.mdx +27 -0
  28. package/content/components/menubar.mdx +31 -0
  29. package/content/components/meter.mdx +14 -0
  30. package/content/components/navigation-menu.mdx +28 -0
  31. package/content/components/number-field.mdx +25 -0
  32. package/content/components/popover.mdx +22 -0
  33. package/content/components/preview-card.mdx +14 -2
  34. package/content/components/progress.mdx +15 -1
  35. package/content/components/radio.mdx +31 -0
  36. package/content/components/scroll-area.mdx +23 -0
  37. package/content/components/select.mdx +57 -0
  38. package/content/components/separator.mdx +29 -0
  39. package/content/components/slider.mdx +52 -0
  40. package/content/components/switch.mdx +30 -0
  41. package/content/components/tabs.mdx +47 -0
  42. package/content/components/toast.mdx +70 -0
  43. package/content/components/toggle-group.mdx +37 -0
  44. package/content/components/toggle.mdx +46 -2
  45. package/content/components/toolbar.mdx +48 -0
  46. package/content/components/tooltip.mdx +38 -0
  47. package/content/docs/installation.mdx +30 -0
  48. package/content-collections.ts +65 -1
  49. package/dist/cli.js +947 -101
  50. package/examples/__index.tsx +320 -66
  51. package/examples/autocomplete-align.tsx +39 -0
  52. package/examples/autocomplete-controlled.tsx +44 -0
  53. package/examples/autocomplete-groups.tsx +65 -0
  54. package/examples/autocomplete-no-clear.tsx +40 -0
  55. package/examples/avatar-demo.tsx +3 -3
  56. package/examples/checkbox-demo.tsx +1 -1
  57. package/examples/checkbox-form.tsx +3 -3
  58. package/examples/field-custom-control.tsx +33 -9
  59. package/examples/form-demo.tsx +5 -10
  60. package/examples/input-group-with-button.tsx +1 -1
  61. package/examples/menu-advanced.tsx +1 -3
  62. package/examples/menu-align.tsx +19 -16
  63. package/examples/menu-checkbox.tsx +2 -3
  64. package/examples/menu-demo.tsx +1 -3
  65. package/examples/menu-group.tsx +1 -3
  66. package/examples/menu-radio.tsx +1 -3
  67. package/examples/menu-submenu.tsx +2 -3
  68. package/examples/meter-demo.tsx +10 -2
  69. package/examples/meter-flip.tsx +8 -8
  70. package/examples/meter-no-label.tsx +9 -2
  71. package/examples/meter-no-value.tsx +7 -8
  72. package/examples/radio-card.tsx +28 -0
  73. package/examples/radio-demo.tsx +19 -1
  74. package/examples/radio-description.tsx +26 -0
  75. package/examples/radio-orientation.tsx +21 -0
  76. package/examples/select-alignment.tsx +51 -0
  77. package/examples/select-demo.tsx +36 -1
  78. package/examples/select-disabled.tsx +38 -0
  79. package/examples/select-groups.tsx +54 -0
  80. package/examples/select-invalid.tsx +41 -0
  81. package/examples/select-scrollable.tsx +112 -0
  82. package/examples/separator-demo.tsx +13 -0
  83. package/examples/separator-horizontal.tsx +18 -0
  84. package/examples/slider-controlled.tsx +28 -0
  85. package/examples/slider-demo.tsx +3 -1
  86. package/examples/slider-disabled.tsx +7 -0
  87. package/examples/slider-edge.tsx +13 -0
  88. package/examples/slider-multiple.tsx +7 -0
  89. package/examples/slider-range.tsx +5 -0
  90. package/examples/slider-vertical.tsx +10 -0
  91. package/examples/switch-demo.tsx +19 -1
  92. package/examples/switch-disabled.tsx +20 -0
  93. package/examples/switch-sizes.tsx +24 -0
  94. package/examples/switch-with-label.tsx +16 -0
  95. package/examples/tabs-demo.tsx +14 -1
  96. package/examples/tabs-disabled.tsx +21 -0
  97. package/examples/tabs-line.tsx +18 -0
  98. package/examples/tabs-vertical.tsx +13 -0
  99. package/examples/toast-action.tsx +39 -0
  100. package/examples/toast-anchored.tsx +36 -0
  101. package/examples/toast-demo.tsx +27 -1
  102. package/examples/toast-positions.tsx +54 -0
  103. package/examples/toast-promise.tsx +51 -0
  104. package/examples/toast-stacked.tsx +30 -0
  105. package/examples/toast-timeout.tsx +43 -0
  106. package/examples/toast-update.tsx +38 -0
  107. package/examples/toast-variants.tsx +54 -0
  108. package/examples/toggle-controlled.tsx +20 -0
  109. package/examples/toggle-demo.tsx +7 -51
  110. package/examples/toggle-group-demo.tsx +19 -0
  111. package/examples/toggle-group-multiple.tsx +19 -0
  112. package/examples/toggle-icon-fill.tsx +12 -0
  113. package/examples/toolbar-demo.tsx +45 -21
  114. package/examples/toolbar-input-link.tsx +35 -0
  115. package/examples/toolbar-menu.tsx +53 -0
  116. package/examples/tooltip-demo.tsx +48 -0
  117. package/examples/tooltip-positions.tsx +60 -0
  118. package/package.json +19 -18
  119. package/public/base-ui.svg +1 -0
  120. package/public/r/drawer.json +1 -1
  121. package/public/r/field.json +1 -1
  122. package/public/r/meter.json +1 -1
  123. package/public/r/number-field.json +1 -1
  124. package/public/r/progress.json +1 -1
  125. package/public/r/radio.json +1 -1
  126. package/public/r/select.json +1 -1
  127. package/public/r/slider.json +1 -1
  128. package/public/r/switch.json +1 -1
  129. package/public/r/tabs.json +1 -1
  130. package/public/r/toast.json +2 -1
  131. package/public/r/toggle.json +1 -1
  132. package/public/r/toolbar.json +1 -1
  133. package/public/r/tooltip.json +15 -0
  134. package/src/assets/base-ui.svg +1 -0
  135. package/src/commands/add.ts +79 -38
  136. package/src/commands/cli.ts +50 -3
  137. package/src/commands/create.ts +262 -0
  138. package/src/commands/init.ts +45 -12
  139. package/src/commands/palette.ts +55 -0
  140. package/src/components/docs/layout/footer.tsx +2 -2
  141. package/src/components/docs/layout/header.tsx +7 -19
  142. package/src/components/docs/layout/mobile-menu.tsx +26 -78
  143. package/src/components/docs/layout/nav-list.tsx +27 -21
  144. package/src/components/docs/layout/page-header.tsx +52 -7
  145. package/src/components/docs/layout/split-layout.tsx +11 -9
  146. package/src/components/docs/layout/table-of-content.tsx +145 -0
  147. package/src/components/docs/markdown/components.tsx +142 -29
  148. package/src/components/docs/markdown/copy-button.tsx +41 -0
  149. package/src/components/docs/markdown/installation-block.tsx +5 -24
  150. package/src/components/docs/markdown/render-preview.tsx +1 -1
  151. package/src/components/ui/badge.tsx +1 -1
  152. package/src/components/ui/button-group.tsx +1 -1
  153. package/src/components/ui/checkbox.tsx +1 -1
  154. package/src/components/ui/drawer.tsx +1 -1
  155. package/src/components/ui/field.tsx +9 -28
  156. package/src/components/ui/form.tsx +1 -1
  157. package/src/components/ui/meter.tsx +12 -26
  158. package/src/components/ui/number-field.tsx +1 -1
  159. package/src/components/ui/radio.tsx +32 -19
  160. package/src/components/ui/scroll-area.tsx +11 -2
  161. package/src/components/ui/select.tsx +6 -6
  162. package/src/components/ui/slider.tsx +8 -5
  163. package/src/components/ui/switch.tsx +13 -17
  164. package/src/components/ui/tabs.tsx +23 -10
  165. package/src/components/ui/toast.tsx +190 -29
  166. package/src/components/ui/toggle.tsx +1 -1
  167. package/src/components/ui/toolbar.tsx +17 -4
  168. package/src/components/ui/tooltip.tsx +54 -0
  169. package/src/lib/docs-headings.ts +72 -0
  170. package/src/routeTree.gen.ts +60 -3
  171. package/src/routes/__root.tsx +3 -5
  172. package/src/routes/components.$slug.tsx +20 -4
  173. package/src/routes/docs.$slug.tsx +78 -0
  174. package/src/routes/docs.tsx +15 -0
  175. package/src/styles/styles.css +1 -1
  176. package/src/utils/cli-utils.ts +8 -8
  177. package/src/utils/dependency-installer.ts +30 -0
  178. package/src/utils/package-manager.ts +4 -4
  179. package/src/utils/palette.ts +666 -0
  180. package/src/utils/schema.ts +6 -0
@@ -10,11 +10,32 @@ description: Accessible form field components with built-in validation, labels,
10
10
 
11
11
  <InstallationBlock name="field" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/field"
17
+ imports={[
18
+ "Field",
19
+ "FieldLabel",
20
+ "FieldControl",
21
+ "FieldDescription",
22
+ "FieldError",
23
+ "FieldItem",
24
+ "FieldValidity",
25
+ ]}
26
+ anatomy={`<Field>
27
+ <FieldLabel />
28
+ <FieldControl />
29
+ <FieldDescription />
30
+ <FieldError />
31
+ </Field>;`}
32
+ />
33
+
13
34
  ## Examples
14
35
 
15
36
  ### Default
16
37
 
17
- Compose fields using `FieldRoot`, `FieldLabel`, `FieldControl`, and `FieldDescription`.
38
+ Compose fields using `Field`, `FieldLabel`, `FieldControl`, and `FieldDescription`.
18
39
 
19
40
  <RenderPreview name="field-demo" />
20
41
 
@@ -38,6 +59,6 @@ Use the individual Field subcomponents to create custom field layouts with full
38
59
 
39
60
  ### Custom Control
40
61
 
41
- Replace the default `FieldControl` with any other input component for advanced use cases.
62
+ Use `FieldControl` as the form control element or compose Base-compatible controls inside `Field` for advanced cases.
42
63
 
43
64
  <RenderPreview name="field-custom-control" />
@@ -10,11 +10,21 @@ description: Groups related form fields with an accessible legend for semantic o
10
10
 
11
11
  <InstallationBlock name="fieldset" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/fieldset"
17
+ imports={["Fieldset", "FieldsetLegend"]}
18
+ anatomy={`<Fieldset>
19
+ <FieldsetLegend />
20
+ </Fieldset>;`}
21
+ />
22
+
13
23
  ## Examples
14
24
 
15
25
  ### Default
16
26
 
17
- Use `FieldsetRoot` and `FieldsetLegend` to group related fields with a descriptive legend.
27
+ Use `Fieldset` and `FieldsetLegend` to group related fields with a descriptive legend.
18
28
 
19
29
  <RenderPreview name="fieldset-demo" />
20
30
 
@@ -10,6 +10,14 @@ description: Form wrapper component with consolidated error handling and field v
10
10
 
11
11
  <InstallationBlock name="form" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/form"
17
+ imports={["Form"]}
18
+ anatomy={`<Form>{/* form fields */}</Form>;`}
19
+ />
20
+
13
21
  ## Examples
14
22
 
15
23
  ### Demo
@@ -10,6 +10,10 @@ description: Single-line text input field.
10
10
 
11
11
  <InstallationBlock name="input" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection from="@/components/ui/input" imports={["Input"]} anatomy={`<Input />;`} />
16
+
13
17
  ## Examples
14
18
 
15
19
  ### Basic
@@ -10,6 +10,33 @@ description: Dropdown menu component with support for items, groups, separators,
10
10
 
11
11
  <InstallationBlock name="menu" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/menu"
17
+ imports={[
18
+ "Menu",
19
+ "MenuTrigger",
20
+ "MenuPopup",
21
+ "MenuGroup",
22
+ "MenuLabel",
23
+ "MenuItem",
24
+ "MenuSub",
25
+ "MenuSubTrigger",
26
+ "MenuCheckboxItem",
27
+ "MenuRadioGroup",
28
+ "MenuRadioItem",
29
+ "MenuSubPopup",
30
+ "MenuSeparator",
31
+ ]}
32
+ anatomy={`<Menu>
33
+ <MenuTrigger />
34
+ <MenuPopup>
35
+ <MenuItem />
36
+ </MenuPopup>
37
+ </Menu>;`}
38
+ />
39
+
13
40
  ## Examples
14
41
 
15
42
  ### Sides and alignments
@@ -10,6 +10,37 @@ description: Menu bar providing commands and options for your application with d
10
10
 
11
11
  <InstallationBlock name="menubar" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/menubar"
17
+ imports={[
18
+ "Menubar",
19
+ "Menu",
20
+ "MenuTrigger",
21
+ "MenuPopup",
22
+ "MenuGroup",
23
+ "MenuLabel",
24
+ "MenuItem",
25
+ "MenuSub",
26
+ "MenuSubPopup",
27
+ "MenuSubTrigger",
28
+ "MenuCheckboxItem",
29
+ "MenuRadioGroup",
30
+ "MenuRadioItem",
31
+ "MenuSeparator",
32
+ "MenuShortcut",
33
+ ]}
34
+ anatomy={`<Menubar>
35
+ <Menu>
36
+ <MenuTrigger />
37
+ <MenuPopup>
38
+ <MenuItem />
39
+ </MenuPopup>
40
+ </Menu>
41
+ </Menubar>;`}
42
+ />
43
+
13
44
  Menubar relies on `Menu` component, but for the ease of use, it also provides a set of components that are built on top of `Menu` component with same styling and APIs.
14
45
 
15
46
  ## Examples
@@ -10,6 +10,20 @@ description: Meter component that provides a graphical display of a numeric valu
10
10
 
11
11
  <InstallationBlock name="meter" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/meter"
17
+ imports={["Meter", "MeterLabel", "MeterValue", "MeterTrack", "MeterIndicator"]}
18
+ anatomy={`<Meter>
19
+ <MeterLabel />
20
+ <MeterValue />
21
+ <MeterTrack>
22
+ <MeterIndicator />
23
+ </MeterTrack>
24
+ </Meter>;`}
25
+ />
26
+
13
27
  ## Examples
14
28
 
15
29
  ### Default
@@ -9,3 +9,31 @@ description: Navigation menu component for displaying a collection of links and
9
9
  ## Installation
10
10
 
11
11
  <InstallationBlock name="navigation-menu" />
12
+
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/navigation-menu"
17
+ imports={[
18
+ "NavigationMenu",
19
+ "NavigationMenuList",
20
+ "NavigationMenuItem",
21
+ "NavigationMenuTrigger",
22
+ "NavigationMenuContent",
23
+ "NavigationMenuLink",
24
+ "NavigationMenuPopup",
25
+ "NavigationMenuViewport",
26
+ "NavigationMenuArrow",
27
+ ]}
28
+ anatomy={`<NavigationMenu>
29
+ <NavigationMenuList>
30
+ <NavigationMenuItem>
31
+ <NavigationMenuTrigger />
32
+ <NavigationMenuContent />
33
+ </NavigationMenuItem>
34
+ </NavigationMenuList>
35
+ <NavigationMenuViewport>
36
+ <NavigationMenuArrow />
37
+ </NavigationMenuViewport>
38
+ </NavigationMenu>;`}
39
+ />
@@ -10,6 +10,31 @@ description: An input field component specifically designed for numeric input, w
10
10
 
11
11
  <InstallationBlock name="number-field" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/number-field"
17
+ imports={[
18
+ "NumberField",
19
+ "NumberFieldScrubArea",
20
+ "NumberFieldScrubAreaCursor",
21
+ "NumberFieldGroup",
22
+ "NumberFieldDecrement",
23
+ "NumberFieldIncrement",
24
+ "NumberFieldInput",
25
+ ]}
26
+ anatomy={`<NumberField>
27
+ <NumberFieldScrubArea>
28
+ <NumberFieldScrubAreaCursor />
29
+ </NumberFieldScrubArea>
30
+ <NumberFieldGroup>
31
+ <NumberFieldDecrement />
32
+ <NumberFieldInput />
33
+ <NumberFieldIncrement />
34
+ </NumberFieldGroup>
35
+ </NumberField>;`}
36
+ />
37
+
13
38
  ## Examples
14
39
 
15
40
  ### Basic
@@ -10,6 +10,28 @@ description: Popover component that displays content anchored to a trigger eleme
10
10
 
11
11
  <InstallationBlock name="popover" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/popover"
17
+ imports={[
18
+ "Popover",
19
+ "PopoverPopup",
20
+ "PopoverDescription",
21
+ "PopoverClose",
22
+ "PopoverTitle",
23
+ "PopoverTrigger",
24
+ ]}
25
+ anatomy={`<Popover>
26
+ <PopoverTrigger />
27
+ <PopoverPopup>
28
+ <PopoverTitle />
29
+ <PopoverDescription />
30
+ <PopoverClose />
31
+ </PopoverPopup>
32
+ </Popover>;`}
33
+ />
34
+
13
35
  ## Examples
14
36
 
15
37
  ### Basic
@@ -4,13 +4,25 @@ slug: preview-card
4
4
  description: Component that displays a preview of linked content when hovered.
5
5
  ---
6
6
 
7
- <RenderPreview name={'preview-card-demo'} />
8
-
7
+ <RenderPreview name={"preview-card-demo"} />
9
8
 
10
9
  ## Installation
10
+
11
11
  <InstallationBlock name="preview-card" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/preview-card"
17
+ imports={["PreviewCard", "PreviewCardTrigger", "PreviewCardPopup"]}
18
+ anatomy={`<PreviewCard>
19
+ <PreviewCardTrigger />
20
+ <PreviewCardPopup />
21
+ </PreviewCard>;`}
22
+ />
23
+
13
24
  ## Examples
14
25
 
15
26
  ### Composed as CTA
27
+
16
28
  <RenderPreview name="preview-card-links" />
@@ -4,4 +4,18 @@ slug: progress
4
4
  description: Progress bar component for displaying the status of a task.
5
5
  ---
6
6
 
7
- <RenderPreview name={'progress-demo'} />
7
+ <RenderPreview name={"progress-demo"} />
8
+
9
+ ## Usage
10
+
11
+ <UsageSection
12
+ from="@/components/ui/progress"
13
+ imports={["Progress", "ProgressLabel", "ProgressValue", "ProgressTrack", "ProgressIndicator"]}
14
+ anatomy={`<Progress>
15
+ <ProgressLabel />
16
+ <ProgressValue />
17
+ <ProgressTrack>
18
+ <ProgressIndicator />
19
+ </ProgressTrack>
20
+ </Progress>;`}
21
+ />
@@ -3,3 +3,34 @@ title: Radio
3
3
  slug: radio
4
4
  description: Radio button component for selecting a single option from a group.
5
5
  ---
6
+
7
+ <RenderPreview name="radio-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="radio" />
12
+
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/radio"
17
+ imports={["Radio", "RadioGroup"]}
18
+ anatomy={`<RadioGroup>
19
+ <Radio value="one" />
20
+ <Radio value="two" />
21
+ </RadioGroup>;`}
22
+ />
23
+
24
+ ## Examples
25
+
26
+ ### Orientation
27
+
28
+ <RenderPreview name="radio-orientation" />
29
+
30
+ ### Card Style
31
+
32
+ <RenderPreview name="radio-card" />
33
+
34
+ ### Description
35
+
36
+ <RenderPreview name="radio-description" />
@@ -9,3 +9,26 @@ description: A scroll area component that provides a customizable and accessible
9
9
  ## Installation
10
10
 
11
11
  <InstallationBlock name="scroll-area" />
12
+
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/scroll-area"
17
+ imports={[
18
+ "ScrollArea",
19
+ "ScrollAreaViewPort",
20
+ "ScrollAreaContent",
21
+ "ScrollAreaScrollbar",
22
+ "ScrollAreaThumb",
23
+ "ScrollAreaCorner",
24
+ ]}
25
+ anatomy={`<ScrollArea>
26
+ <ScrollAreaViewPort>
27
+ <ScrollAreaContent />
28
+ </ScrollAreaViewPort>
29
+ <ScrollAreaScrollbar>
30
+ <ScrollAreaThumb />
31
+ </ScrollAreaScrollbar>
32
+ <ScrollAreaCorner />
33
+ </ScrollArea>;`}
34
+ />
@@ -3,3 +3,60 @@ title: Select
3
3
  slug: select
4
4
  description: Select component for choosing a predefined value in a dropdown menu.
5
5
  ---
6
+
7
+ <RenderPreview name="select-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="select" />
12
+
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/select"
17
+ imports={[
18
+ "Select",
19
+ "SelectPopup",
20
+ "SelectGroup",
21
+ "SelectItem",
22
+ "SelectLabel",
23
+ "SelectScrollDownButton",
24
+ "SelectScrollUpButton",
25
+ "SelectSeparator",
26
+ "SelectTrigger",
27
+ "SelectValue",
28
+ ]}
29
+ anatomy={`<Select>
30
+ <SelectTrigger>
31
+ <SelectValue />
32
+ </SelectTrigger>
33
+ <SelectPopup>
34
+ <SelectGroup>
35
+ <SelectLabel />
36
+ <SelectItem />
37
+ </SelectGroup>
38
+ </SelectPopup>
39
+ </Select>;`}
40
+ />
41
+
42
+ ## Examples
43
+
44
+ ### Alignment
45
+
46
+ <RenderPreview name="select-alignment" />
47
+
48
+ ### Groups
49
+
50
+ <RenderPreview name="select-groups" />
51
+
52
+ ### Disabled
53
+
54
+ <RenderPreview name="select-disabled" />
55
+
56
+ ### Invalid
57
+
58
+ <RenderPreview name="select-invalid" />
59
+
60
+ ### Scrollable
61
+
62
+ <RenderPreview name="select-scrollable" />
@@ -0,0 +1,29 @@
1
+ ---
2
+ title: Separator
3
+ slug: separator
4
+ description: A visual and semantic divider used to separate related content.
5
+ ---
6
+
7
+ <RenderPreview name="separator-horizontal" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="separator" />
12
+
13
+ ## Usage
14
+
15
+ <UsageSection from="@/components/ui/separator" imports={["Separator"]} anatomy={`<Separator />;`} />
16
+
17
+ ## Examples
18
+
19
+ ### Horizontal
20
+
21
+ Use the default horizontal orientation to separate sections.
22
+
23
+ <RenderPreview name="separator-horizontal" />
24
+
25
+ ### Vertical
26
+
27
+ Use `orientation="vertical"` when separating inline items.
28
+
29
+ <RenderPreview name="separator-demo" />
@@ -3,3 +3,55 @@ title: Slider
3
3
  slug: slider
4
4
  description: Slider component for selecting a value or range of values.
5
5
  ---
6
+
7
+ <RenderPreview name="slider-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="slider" />
12
+
13
+ ## Usage
14
+
15
+ <UsageSection from="@/components/ui/slider" imports={["Slider"]} anatomy={`<Slider />;`} />
16
+
17
+ ## Examples
18
+
19
+ ### Basic
20
+
21
+ <RenderPreview name="slider-demo" />
22
+
23
+ ### Range
24
+
25
+ Use an array with two values for a range slider.
26
+
27
+ <RenderPreview name="slider-range" />
28
+
29
+ ### Multiple Thumbs
30
+
31
+ Use an array with multiple values for multiple thumbs.
32
+
33
+ <RenderPreview name="slider-multiple" />
34
+
35
+ ### Vertical
36
+
37
+ Use `orientation="vertical"` for a vertical slider.
38
+
39
+ <RenderPreview name="slider-vertical" />
40
+
41
+ ### Edge Alignment
42
+
43
+ Use `thumbAlignment="edge"` to inset thumbs so they align to the track edge at min/max.
44
+
45
+ <RenderPreview name="slider-edge" />
46
+
47
+ ### Controlled
48
+
49
+ Use `value` and `onValueChange` to fully control slider state.
50
+
51
+ <RenderPreview name="slider-controlled" />
52
+
53
+ ### Disabled
54
+
55
+ Use the `disabled` prop to disable the slider.
56
+
57
+ <RenderPreview name="slider-disabled" />
@@ -3,3 +3,33 @@ title: Switch
3
3
  slug: switch
4
4
  description: Switch component that indicates whether a setting is on or off.
5
5
  ---
6
+
7
+ <RenderPreview name="switch-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="switch" />
12
+
13
+ ## Usage
14
+
15
+ <UsageSection from="@/components/ui/switch" imports={["Switch"]} anatomy={`<Switch />;`} />
16
+
17
+ ## Examples
18
+
19
+ ### With Label
20
+
21
+ Use labels and helper text to make intent clear.
22
+
23
+ <RenderPreview name="switch-with-label" />
24
+
25
+ ### Sizes
26
+
27
+ Switch supports default and small sizes via the `size` prop.
28
+
29
+ <RenderPreview name="switch-sizes" />
30
+
31
+ ### Disabled
32
+
33
+ Disable interaction while preserving the current state.
34
+
35
+ <RenderPreview name="switch-disabled" />
@@ -3,3 +3,50 @@ title: Tabs
3
3
  slug: tabs
4
4
  description: Tabs component for toggling between related panels on the same page.
5
5
  ---
6
+
7
+ <RenderPreview name="tabs-demo" />
8
+
9
+ ## Installation
10
+
11
+ <InstallationBlock name="tabs" />
12
+
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/tabs"
17
+ imports={["Tabs", "TabsList", "TabsTrigger", "TabsPanel", "tabsListVariants"]}
18
+ anatomy={`<Tabs defaultValue="tab-1">
19
+ <TabsList>
20
+ <TabsTrigger value="tab-1" />
21
+ <TabsTrigger value="tab-2" />
22
+ </TabsList>
23
+ <TabsPanel value="tab-1" />
24
+ <TabsPanel value="tab-2" />
25
+ </Tabs>;`}
26
+ />
27
+
28
+ ## Examples
29
+
30
+ ### Default
31
+
32
+ A standard horizontal tabs layout.
33
+
34
+ <RenderPreview name="tabs-demo" />
35
+
36
+ ### Line Variant
37
+
38
+ Use the `line` variant for a compact, underlined appearance.
39
+
40
+ <RenderPreview name="tabs-line" />
41
+
42
+ ### Vertical
43
+
44
+ Set `orientation="vertical"` to stack triggers in a column.
45
+
46
+ <RenderPreview name="tabs-vertical" />
47
+
48
+ ### Disabled Trigger
49
+
50
+ Disable individual tab triggers with the `disabled` prop.
51
+
52
+ <RenderPreview name="tabs-disabled" />