solid-tom-ui 1.0.10 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +246 -246
- package/dist/README.md +246 -246
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/carousel/carousel.js.map +1 -1
- package/dist/components/chat-bubble/chatBubble.js.map +1 -1
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/collapse/collapse.js.map +1 -1
- package/dist/components/context-menu/context-menu.js.map +1 -1
- package/dist/components/context-menu/context-menu.store.js.map +1 -1
- package/dist/components/divider/divider.js.map +1 -1
- package/dist/components/dropdown/dropdown.js.map +1 -1
- package/dist/components/dropdown/dropdown.store.js.map +1 -1
- package/dist/components/float-button/float-button.js.map +1 -1
- package/dist/components/hover-3d-image/hover-3d-image.js.map +1 -1
- package/dist/components/image-preview/image-preview.js.map +1 -1
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/input/input.utils.js.map +1 -1
- package/dist/components/input/variants/input-color.js.map +1 -1
- package/dist/components/input/variants/input-date.js.map +1 -1
- package/dist/components/input/variants/input-number.d.ts.map +1 -1
- package/dist/components/input/variants/input-number.js +1 -1
- package/dist/components/input/variants/input-number.js.map +1 -1
- package/dist/components/input/variants/input-otp.js.map +1 -1
- package/dist/components/input/variants/input-password.js.map +1 -1
- package/dist/components/input/variants/input-radio.js.map +1 -1
- package/dist/components/input/variants/input-range.js.map +1 -1
- package/dist/components/input/variants/input-text.d.ts.map +1 -1
- package/dist/components/input/variants/input-text.js +1 -1
- package/dist/components/input/variants/input-text.js.map +1 -1
- package/dist/components/input/variants/input-textarea.js.map +1 -1
- package/dist/components/loading/loading.js.map +1 -1
- package/dist/components/mansory/mansory.js.map +1 -1
- package/dist/components/menu/menu.js.map +1 -1
- package/dist/components/menu/menu.types.d.ts +2 -3
- package/dist/components/menu/menu.types.d.ts.map +1 -1
- package/dist/components/modal/modal.js.map +1 -1
- package/dist/components/modal/modalContext.js.map +1 -1
- package/dist/components/pagination/pagination.js.map +1 -1
- package/dist/components/progress-bar/progress-bar.js.map +1 -1
- package/dist/components/qr-code/qr-code.js.map +1 -1
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select-zone/select-zone.js.map +1 -1
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/splitter/splitter.js.map +1 -1
- package/dist/components/steps/steps.js.map +1 -1
- package/dist/components/swap/swap.js.map +1 -1
- package/dist/components/switch/switch.js.map +1 -1
- package/dist/components/tab/tab.js.map +1 -1
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/timeline/timeline.js.map +1 -1
- package/dist/components/toast/icons/ErrorIcon.js.map +1 -1
- package/dist/components/toast/icons/IconCircle.js.map +1 -1
- package/dist/components/toast/icons/InfoIcon.js.map +1 -1
- package/dist/components/toast/icons/LoaderIcon.js.map +1 -1
- package/dist/components/toast/icons/SuccessIcon.js.map +1 -1
- package/dist/components/toast/icons/WarningIcon.js.map +1 -1
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/components/toast/toast.store.js.map +1 -1
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/components/tour/tour.js.map +1 -1
- package/dist/components/upload/upload.js.map +1 -1
- package/dist/components/z-index/z-index.context.js.map +1 -1
- package/dist/components/z-index/z-index.js.map +1 -1
- package/dist/components/z-index/z-index.store.js.map +1 -1
- package/dist/components/z-index/z-index.types.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/skill/avatar.skill.md.txt +255 -255
- package/dist/skill/badge.skill.md.txt +223 -223
- package/dist/skill/breadcrumb.skill.md.txt +177 -177
- package/dist/skill/button.skill.md.txt +198 -198
- package/dist/skill/carousel.skill.md.txt +406 -406
- package/dist/skill/chat-bubble.skill.md.txt +342 -342
- package/dist/skill/checkbox.skill.md.txt +326 -326
- package/dist/skill/code-preview.skill.md.txt +240 -240
- package/dist/skill/collapse.skill.md.txt +329 -329
- package/dist/skill/context-menu.skill.md.txt +233 -233
- package/dist/skill/diff.skill.md.txt +244 -244
- package/dist/skill/divider.skill.md.txt +151 -151
- package/dist/skill/doc.skill.md.txt +191 -191
- package/dist/skill/drawer.skill.md.txt +157 -157
- package/dist/skill/dropdown.skill.md.txt +198 -198
- package/dist/skill/float-button.skill.md.txt +315 -315
- package/dist/skill/hover-3d-image.skill.md.txt +120 -120
- package/dist/skill/iframe.skill.md.txt +114 -114
- package/dist/skill/image-preview.skill.md.txt +162 -162
- package/dist/skill/indicator.skill.md.txt +60 -60
- package/dist/skill/input.skill.md.txt +489 -489
- package/dist/skill/loading.skill.md.txt +127 -127
- package/dist/skill/menu.skill.md.txt +476 -476
- package/dist/skill/modal.skill.md.txt +359 -359
- package/dist/skill/pagination.skill.md.txt +405 -405
- package/dist/skill/progress-bar.skill.md.txt +207 -207
- package/dist/skill/qr-code.skill.md.txt +136 -136
- package/dist/skill/rating.skill.md.txt +167 -167
- package/dist/skill/select-zone.skill.md.txt +93 -93
- package/dist/skill/select.skill.md.txt +663 -663
- package/dist/skill/skeleton.skill.md.txt +192 -192
- package/dist/skill/slider.skill.md.txt +404 -404
- package/dist/skill/splitter.skill.md.txt +411 -411
- package/dist/skill/steps.skill.md.txt +264 -264
- package/dist/skill/swap.skill.md.txt +139 -139
- package/dist/skill/switch.skill.md.txt +191 -191
- package/dist/skill/tab.skill.md.txt +484 -484
- package/dist/skill/table.example.header.md.txt +666 -666
- package/dist/skill/table.skill.md.txt +1407 -1407
- package/dist/skill/text-rotate.skill.md.txt +186 -186
- package/dist/skill/timeline.skill.md.txt +247 -247
- package/dist/skill/toast.skill.md.txt +531 -531
- package/dist/skill/tooltip.skill.md.txt +222 -222
- package/dist/skill/tour.skill.md.txt +156 -156
- package/dist/skill/upload.skill.md.txt +358 -358
- package/dist/utils/cn.js.map +1 -1
- package/dist/utils/element-tracker.js.map +1 -1
- package/dist/utils/helper.js.map +1 -1
- package/dist/utils/hoc.js.map +1 -1
- package/package.json +132 -133
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
## COMPONENT IDENTITY
|
|
2
|
-
- **Import**: `import { Divider } from 'solid-tom-ui';`
|
|
3
|
-
- **Export**: `Divider` (named export)
|
|
4
|
-
- **Framework**: SolidJS
|
|
5
|
-
- **Purpose**: Flexible visual separator — renders a plain line or a line with centered content (text, icons, badges); supports horizontal and vertical orientations
|
|
6
|
-
|
|
7
|
-
## Props
|
|
8
|
-
|
|
9
|
-
| Prop | Type | Default | Description |
|
|
10
|
-
| ------------- | --------------------------------------------- | -------------- | --------------------------------------------------------------------------- |
|
|
11
|
-
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Direction of the dividing line |
|
|
12
|
-
| `variant` | `'solid' \| 'dashed' \| 'dotted'` | `'solid'` | Border style of the line |
|
|
13
|
-
| `align` | `'start' \| 'center' \| 'end'` | `'center'` | Position of children content along the line (only applies when children is present) |
|
|
14
|
-
| `thickness` | `1 \| 2 \| 3 \| 4` | `1` | Line thickness in pixels |
|
|
15
|
-
| `color` | `BaseColorProps` | — | Màu hệ thống cho đường kẻ và text content — dùng `--color` CSS variable |
|
|
16
|
-
| `class` | `Partial<Record<'root' \| 'line' \| 'content', string>>` | — | Override classes for individual slots (see Class Slots below) |
|
|
17
|
-
| `children` | `JSX.Element` | — | Content rendered between the two line segments |
|
|
18
|
-
|
|
19
|
-
## Class Slots
|
|
20
|
-
|
|
21
|
-
`Divider` exposes a unified `class` prop with three named slots:
|
|
22
|
-
|
|
23
|
-
| Slot | Element | When available |
|
|
24
|
-
| --------- | -------------------------------------------- | ------------------ |
|
|
25
|
-
| `root` | `<hr>` (plain) or `<div>` (with children) | Always |
|
|
26
|
-
| `line` | Both leading and trailing line segments | Only with children |
|
|
27
|
-
| `content` | `<span>` wrapping children content | Only with children |
|
|
28
|
-
|
|
29
|
-
> **CSS encoding**: internal CSS classes use short encoded names (e.g. `dv01`, `dv02`) per project convention.
|
|
30
|
-
|
|
31
|
-
## Render Behavior
|
|
32
|
-
|
|
33
|
-
The component has two distinct render paths:
|
|
34
|
-
|
|
35
|
-
- **No children** → renders a single `<hr>` element (plain line, zero markup overhead).
|
|
36
|
-
- **With children** → renders a `<div>` containing a leading line, a content `<span>`, and a trailing line. The `align` prop controls how flex space is distributed between the two segments.
|
|
37
|
-
|
|
38
|
-
## Basic Usage
|
|
39
|
-
|
|
40
|
-
```tsx
|
|
41
|
-
// Plain horizontal line
|
|
42
|
-
<Divider />
|
|
43
|
-
|
|
44
|
-
// Dashed / dotted
|
|
45
|
-
<Divider variant="dashed" />
|
|
46
|
-
<Divider variant="dotted" />
|
|
47
|
-
|
|
48
|
-
// With label
|
|
49
|
-
<Divider>OR</Divider>
|
|
50
|
-
<Divider>Section Title</Divider>
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Alignment
|
|
54
|
-
|
|
55
|
-
```tsx
|
|
56
|
-
<Divider align="start">Left-aligned label</Divider>
|
|
57
|
-
<Divider align="center">Center (default)</Divider>
|
|
58
|
-
<Divider align="end">Right-aligned label</Divider>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Thickness
|
|
62
|
-
|
|
63
|
-
```tsx
|
|
64
|
-
<Divider thickness={1}>1px (default)</Divider>
|
|
65
|
-
<Divider thickness={2}>2px</Divider>
|
|
66
|
-
<Divider thickness={3}>3px</Divider>
|
|
67
|
-
<Divider thickness={4}>4px</Divider>
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Custom Line Color
|
|
71
|
-
|
|
72
|
-
Use `class={{ line: '...' }}` to override the line color. This class is applied to **both** line segments.
|
|
73
|
-
|
|
74
|
-
```tsx
|
|
75
|
-
<Divider class={{ line: 'border-primary/50' }}>Primary</Divider>
|
|
76
|
-
<Divider class={{ line: 'border-error/60' }} variant="dotted">Error</Divider>
|
|
77
|
-
<Divider class={{ line: 'border-amber-400/60' }} thickness={2}>Amber</Divider>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Custom Children (Icons, Badges)
|
|
81
|
-
|
|
82
|
-
Any JSX can be passed as children:
|
|
83
|
-
|
|
84
|
-
```tsx
|
|
85
|
-
// Badge
|
|
86
|
-
<Divider class={{ line: 'border-primary/40' }}>
|
|
87
|
-
<span class="bg-primary/10 text-primary rounded-full px-3 py-0.5 text-xs font-semibold">
|
|
88
|
-
New Section
|
|
89
|
-
</span>
|
|
90
|
-
</Divider>
|
|
91
|
-
|
|
92
|
-
// Icon + text
|
|
93
|
-
<Divider class={{ line: 'border-success/40' }} variant="dashed">
|
|
94
|
-
<span class="text-success flex items-center gap-1.5 text-sm font-medium">
|
|
95
|
-
<CheckIcon class="h-3.5 w-3.5" />
|
|
96
|
-
Completed
|
|
97
|
-
</span>
|
|
98
|
-
</Divider>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Vertical Divider
|
|
102
|
-
|
|
103
|
-
Use `orientation="vertical"` to create a vertical separator inside a flex row. The parent **must** use `items-stretch` (or set an explicit height) for the line to fill the available space.
|
|
104
|
-
|
|
105
|
-
```tsx
|
|
106
|
-
// Plain vertical line between items
|
|
107
|
-
<div class="flex items-stretch gap-4">
|
|
108
|
-
<span>Left</span>
|
|
109
|
-
<Divider orientation="vertical" />
|
|
110
|
-
<span>Right</span>
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
// Vertical with label (parent needs an explicit height)
|
|
114
|
-
<div class="flex h-32 items-stretch gap-4">
|
|
115
|
-
<span class="flex items-center">Panel A</span>
|
|
116
|
-
<Divider orientation="vertical" variant="dashed">OR</Divider>
|
|
117
|
-
<span class="flex items-center">Panel B</span>
|
|
118
|
-
</div>
|
|
119
|
-
|
|
120
|
-
// Colored vertical line
|
|
121
|
-
<Divider orientation="vertical" class={{ line: 'border-primary/40' }} />
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
## Real-world Example — Login Form
|
|
125
|
-
|
|
126
|
-
```tsx
|
|
127
|
-
<div class="space-y-4">
|
|
128
|
-
<button class="btn btn-primary w-full">Continue with Google</button>
|
|
129
|
-
<button class="btn btn-neutral btn-outline w-full">Continue with GitHub</button>
|
|
130
|
-
<Divider>OR</Divider>
|
|
131
|
-
<input class="input input-bordered w-full" placeholder="Email address" />
|
|
132
|
-
<button class="btn btn-primary w-full">Sign in</button>
|
|
133
|
-
</div>
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Accessibility
|
|
137
|
-
|
|
138
|
-
- Both render paths emit `role="separator"` and `aria-orientation` matching the `orientation` prop.
|
|
139
|
-
- Content inside `children` is wrapped in a `<span>` with `select-none` to prevent accidental text selection of decorative labels.
|
|
140
|
-
|
|
141
|
-
## Common Mistakes
|
|
142
|
-
|
|
143
|
-
| Mistake | Fix |
|
|
144
|
-
| --- | --- |
|
|
145
|
-
| Using `class="border-primary"` as string | `class` is now a slot object — use `class={{ root: '...' }}` |
|
|
146
|
-
| Coloring lines without effect | Use `class={{ line: 'border-primary/50' }}`, not `class={{ root: '...' }}` |
|
|
147
|
-
| Vertical divider not visible | Ensure parent has `items-stretch` or a fixed height |
|
|
148
|
-
| `align` has no effect | `align` only works when `children` is provided |
|
|
149
|
-
| `line` / `content` slots not applying | These slots only apply when `children` is present |
|
|
150
|
-
|
|
151
|
-
> **Unique IDs**: if this component needs to generate HTML `id` attributes, always use `createUniqueId()` from `solid-js` — never `Math.random()` or `Date.now()`.
|
|
1
|
+
## COMPONENT IDENTITY
|
|
2
|
+
- **Import**: `import { Divider } from 'solid-tom-ui';`
|
|
3
|
+
- **Export**: `Divider` (named export)
|
|
4
|
+
- **Framework**: SolidJS
|
|
5
|
+
- **Purpose**: Flexible visual separator — renders a plain line or a line with centered content (text, icons, badges); supports horizontal and vertical orientations
|
|
6
|
+
|
|
7
|
+
## Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
| ------------- | --------------------------------------------- | -------------- | --------------------------------------------------------------------------- |
|
|
11
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Direction of the dividing line |
|
|
12
|
+
| `variant` | `'solid' \| 'dashed' \| 'dotted'` | `'solid'` | Border style of the line |
|
|
13
|
+
| `align` | `'start' \| 'center' \| 'end'` | `'center'` | Position of children content along the line (only applies when children is present) |
|
|
14
|
+
| `thickness` | `1 \| 2 \| 3 \| 4` | `1` | Line thickness in pixels |
|
|
15
|
+
| `color` | `BaseColorProps` | — | Màu hệ thống cho đường kẻ và text content — dùng `--color` CSS variable |
|
|
16
|
+
| `class` | `Partial<Record<'root' \| 'line' \| 'content', string>>` | — | Override classes for individual slots (see Class Slots below) |
|
|
17
|
+
| `children` | `JSX.Element` | — | Content rendered between the two line segments |
|
|
18
|
+
|
|
19
|
+
## Class Slots
|
|
20
|
+
|
|
21
|
+
`Divider` exposes a unified `class` prop with three named slots:
|
|
22
|
+
|
|
23
|
+
| Slot | Element | When available |
|
|
24
|
+
| --------- | -------------------------------------------- | ------------------ |
|
|
25
|
+
| `root` | `<hr>` (plain) or `<div>` (with children) | Always |
|
|
26
|
+
| `line` | Both leading and trailing line segments | Only with children |
|
|
27
|
+
| `content` | `<span>` wrapping children content | Only with children |
|
|
28
|
+
|
|
29
|
+
> **CSS encoding**: internal CSS classes use short encoded names (e.g. `dv01`, `dv02`) per project convention.
|
|
30
|
+
|
|
31
|
+
## Render Behavior
|
|
32
|
+
|
|
33
|
+
The component has two distinct render paths:
|
|
34
|
+
|
|
35
|
+
- **No children** → renders a single `<hr>` element (plain line, zero markup overhead).
|
|
36
|
+
- **With children** → renders a `<div>` containing a leading line, a content `<span>`, and a trailing line. The `align` prop controls how flex space is distributed between the two segments.
|
|
37
|
+
|
|
38
|
+
## Basic Usage
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
// Plain horizontal line
|
|
42
|
+
<Divider />
|
|
43
|
+
|
|
44
|
+
// Dashed / dotted
|
|
45
|
+
<Divider variant="dashed" />
|
|
46
|
+
<Divider variant="dotted" />
|
|
47
|
+
|
|
48
|
+
// With label
|
|
49
|
+
<Divider>OR</Divider>
|
|
50
|
+
<Divider>Section Title</Divider>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Alignment
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
<Divider align="start">Left-aligned label</Divider>
|
|
57
|
+
<Divider align="center">Center (default)</Divider>
|
|
58
|
+
<Divider align="end">Right-aligned label</Divider>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Thickness
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
<Divider thickness={1}>1px (default)</Divider>
|
|
65
|
+
<Divider thickness={2}>2px</Divider>
|
|
66
|
+
<Divider thickness={3}>3px</Divider>
|
|
67
|
+
<Divider thickness={4}>4px</Divider>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Custom Line Color
|
|
71
|
+
|
|
72
|
+
Use `class={{ line: '...' }}` to override the line color. This class is applied to **both** line segments.
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
<Divider class={{ line: 'border-primary/50' }}>Primary</Divider>
|
|
76
|
+
<Divider class={{ line: 'border-error/60' }} variant="dotted">Error</Divider>
|
|
77
|
+
<Divider class={{ line: 'border-amber-400/60' }} thickness={2}>Amber</Divider>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Custom Children (Icons, Badges)
|
|
81
|
+
|
|
82
|
+
Any JSX can be passed as children:
|
|
83
|
+
|
|
84
|
+
```tsx
|
|
85
|
+
// Badge
|
|
86
|
+
<Divider class={{ line: 'border-primary/40' }}>
|
|
87
|
+
<span class="bg-primary/10 text-primary rounded-full px-3 py-0.5 text-xs font-semibold">
|
|
88
|
+
New Section
|
|
89
|
+
</span>
|
|
90
|
+
</Divider>
|
|
91
|
+
|
|
92
|
+
// Icon + text
|
|
93
|
+
<Divider class={{ line: 'border-success/40' }} variant="dashed">
|
|
94
|
+
<span class="text-success flex items-center gap-1.5 text-sm font-medium">
|
|
95
|
+
<CheckIcon class="h-3.5 w-3.5" />
|
|
96
|
+
Completed
|
|
97
|
+
</span>
|
|
98
|
+
</Divider>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Vertical Divider
|
|
102
|
+
|
|
103
|
+
Use `orientation="vertical"` to create a vertical separator inside a flex row. The parent **must** use `items-stretch` (or set an explicit height) for the line to fill the available space.
|
|
104
|
+
|
|
105
|
+
```tsx
|
|
106
|
+
// Plain vertical line between items
|
|
107
|
+
<div class="flex items-stretch gap-4">
|
|
108
|
+
<span>Left</span>
|
|
109
|
+
<Divider orientation="vertical" />
|
|
110
|
+
<span>Right</span>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
// Vertical with label (parent needs an explicit height)
|
|
114
|
+
<div class="flex h-32 items-stretch gap-4">
|
|
115
|
+
<span class="flex items-center">Panel A</span>
|
|
116
|
+
<Divider orientation="vertical" variant="dashed">OR</Divider>
|
|
117
|
+
<span class="flex items-center">Panel B</span>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
// Colored vertical line
|
|
121
|
+
<Divider orientation="vertical" class={{ line: 'border-primary/40' }} />
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Real-world Example — Login Form
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
<div class="space-y-4">
|
|
128
|
+
<button class="btn btn-primary w-full">Continue with Google</button>
|
|
129
|
+
<button class="btn btn-neutral btn-outline w-full">Continue with GitHub</button>
|
|
130
|
+
<Divider>OR</Divider>
|
|
131
|
+
<input class="input input-bordered w-full" placeholder="Email address" />
|
|
132
|
+
<button class="btn btn-primary w-full">Sign in</button>
|
|
133
|
+
</div>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Accessibility
|
|
137
|
+
|
|
138
|
+
- Both render paths emit `role="separator"` and `aria-orientation` matching the `orientation` prop.
|
|
139
|
+
- Content inside `children` is wrapped in a `<span>` with `select-none` to prevent accidental text selection of decorative labels.
|
|
140
|
+
|
|
141
|
+
## Common Mistakes
|
|
142
|
+
|
|
143
|
+
| Mistake | Fix |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| Using `class="border-primary"` as string | `class` is now a slot object — use `class={{ root: '...' }}` |
|
|
146
|
+
| Coloring lines without effect | Use `class={{ line: 'border-primary/50' }}`, not `class={{ root: '...' }}` |
|
|
147
|
+
| Vertical divider not visible | Ensure parent has `items-stretch` or a fixed height |
|
|
148
|
+
| `align` has no effect | `align` only works when `children` is provided |
|
|
149
|
+
| `line` / `content` slots not applying | These slots only apply when `children` is present |
|
|
150
|
+
|
|
151
|
+
> **Unique IDs**: if this component needs to generate HTML `id` attributes, always use `createUniqueId()` from `solid-js` — never `Math.random()` or `Date.now()`.
|