solid-tom-ui 1.0.11 → 1.0.15
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/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 +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
package/README.md
CHANGED
|
@@ -1,246 +1,246 @@
|
|
|
1
|
-
# solid-tom-ui
|
|
2
|
-
|
|
3
|
-
> A blazing-fast, beautifully crafted UI component library for [SolidJS](https://solidjs.com), inspired by Ant Design.
|
|
4
|
-
|
|
5
|
-
**Entire library ships at just ~1.5 MB.** Built on **Tailwind CSS 4** and **DaisyUI 5**, solid-tom-ui harnesses SolidJS fine-grained reactivity to deliver buttery-smooth UIs with near-zero overhead — no virtual DOM, no unnecessary re-renders, just raw speed.
|
|
6
|
-
|
|
7
|
-
Customizing the look and feel is a first-class experience: swap the entire color scheme by overriding a handful of CSS variables, or dial in individual components through the unified `color` prop and per-slot `class` overrides — no CSS-in-JS, no build plugins, just plain CSS and Tailwind utilities you already know.
|
|
8
|
-
|
|
9
|
-
## Why solid-tom-ui?
|
|
10
|
-
|
|
11
|
-
- **Featherlight** — the full library (45+ components, styles included) weighs only ~1.5 MB, keeping your app fast on any network
|
|
12
|
-
- **Instant theming** — change primary colors, border radii, and shadows site-wide by editing a single CSS block; no rebuild required
|
|
13
|
-
- **Pixel-perfect by default** — every component is designed to look great out of the box, while remaining fully customizable via `class` props or CSS variables
|
|
14
|
-
- **SolidJS-native** — reactivity is handled at the signal level, so components update surgically without wasting a single render cycle
|
|
15
|
-
|
|
16
|
-
## Features
|
|
17
|
-
|
|
18
|
-
- **45+ components** — from simple buttons to complex data tables with virtual scrolling
|
|
19
|
-
- **Tree-shakeable** — each component is its own module; unused components are not bundled
|
|
20
|
-
- **Typed** — full TypeScript support with exported prop interfaces
|
|
21
|
-
- **Themeable** — DaisyUI color tokens + unified `color` prop across all components
|
|
22
|
-
- **Accessible** — semantic HTML, ARIA attributes, keyboard navigation
|
|
23
|
-
- **Zero CSS setup** — pre-compiled CSS bundle includes Tailwind + DaisyUI, no extra config needed
|
|
24
|
-
|
|
25
|
-
## Installation
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
npm install solid-tom-ui
|
|
29
|
-
or
|
|
30
|
-
pnpm install solid-tom-ui
|
|
31
|
-
or
|
|
32
|
-
bun install solid-tom-ui
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Peer dependencies
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npm install solid-js
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Optional (only needed for specific components):
|
|
42
|
-
|
|
43
|
-
| Package | Component |
|
|
44
|
-
|---------|-----------|
|
|
45
|
-
| `imask` | `Input` with mask |
|
|
46
|
-
| `qrcode` | `QrCode` |
|
|
47
|
-
| `@tanstack/solid-table` | `Table` |
|
|
48
|
-
|
|
49
|
-
## Setup
|
|
50
|
-
|
|
51
|
-
### 1. Import the pre-compiled CSS bundle
|
|
52
|
-
|
|
53
|
-
```css
|
|
54
|
-
/* app.css */
|
|
55
|
-
@import 'solid-tom-ui/styles';
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Make sure this CSS file is imported in your app entry point:
|
|
59
|
-
|
|
60
|
-
```tsx
|
|
61
|
-
// src/index.tsx
|
|
62
|
-
import './app.css';
|
|
63
|
-
import { render } from 'solid-js/web';
|
|
64
|
-
import App from './App';
|
|
65
|
-
|
|
66
|
-
render(() => <App />, document.getElementById('root')!);
|
|
67
|
-
```
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
### 2. Use components
|
|
71
|
-
|
|
72
|
-
```tsx
|
|
73
|
-
import { Button, Modal, toast } from 'solid-tom-ui';
|
|
74
|
-
|
|
75
|
-
function App() {
|
|
76
|
-
return (
|
|
77
|
-
<Button color="primary" onClick={() => toast.success('Hello!')}>
|
|
78
|
-
Click me
|
|
79
|
-
</Button>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Advanced Setup (Custom Theme)
|
|
87
|
-
|
|
88
|
-
Overwrite css variable
|
|
89
|
-
|
|
90
|
-
```css
|
|
91
|
-
:root {
|
|
92
|
-
--color-base-100: white;
|
|
93
|
-
--color-base-content: black;
|
|
94
|
-
|
|
95
|
-
--color-primary: red;
|
|
96
|
-
--color-primary-content: white;
|
|
97
|
-
|
|
98
|
-
--color-secondary: red;
|
|
99
|
-
--color-secondary-content: white;
|
|
100
|
-
|
|
101
|
-
--color-accent: red;
|
|
102
|
-
--color-accent-content: white;
|
|
103
|
-
|
|
104
|
-
--color-neutral: red;
|
|
105
|
-
--color-neutral-content: white;
|
|
106
|
-
|
|
107
|
-
--color-info: red;
|
|
108
|
-
--color-info-content: white;
|
|
109
|
-
|
|
110
|
-
--color-success: red;
|
|
111
|
-
--color-success-content: white;
|
|
112
|
-
|
|
113
|
-
--color-warning: red;
|
|
114
|
-
--color-warning-content: white;
|
|
115
|
-
|
|
116
|
-
--color-error: red;
|
|
117
|
-
--color-error-content: white;
|
|
118
|
-
--radius-selector: 8px;
|
|
119
|
-
--radius-field: 4px;
|
|
120
|
-
--radius-box: 6px;
|
|
121
|
-
--size-selector: 4px;
|
|
122
|
-
--size-field: 4px;
|
|
123
|
-
--border: 1px;
|
|
124
|
-
--depth: 0;
|
|
125
|
-
--noise: 0;
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## Components
|
|
132
|
-
|
|
133
|
-
### Layout & Navigation
|
|
134
|
-
| Component | Description |
|
|
135
|
-
|-----------|-------------|
|
|
136
|
-
| `Breadcrumb` | Navigation breadcrumb trail |
|
|
137
|
-
| `Divider` | Horizontal or vertical divider |
|
|
138
|
-
| `Drawer` | Slide-in side panel |
|
|
139
|
-
| `Dropdown` | Dropdown menu |
|
|
140
|
-
| `Menu` | Vertical/horizontal navigation menu |
|
|
141
|
-
| `Pagination` | Page navigation |
|
|
142
|
-
| `Splitter` | Resizable split pane |
|
|
143
|
-
| `Steps` | Step-by-step progress indicator |
|
|
144
|
-
| `Tab` | Tabbed navigation |
|
|
145
|
-
|
|
146
|
-
### Data Display
|
|
147
|
-
| Component | Description |
|
|
148
|
-
|-----------|-------------|
|
|
149
|
-
| `Avatar` | User avatar with fallback |
|
|
150
|
-
| `Badge` | Status badge / tag |
|
|
151
|
-
| `Carousel` | Image/content carousel |
|
|
152
|
-
| `ChatBubble` | Chat message bubble |
|
|
153
|
-
| `Diff` | Side-by-side diff viewer |
|
|
154
|
-
| `Indicator` | Numeric badge overlay |
|
|
155
|
-
| `Skeleton` | Loading skeleton placeholder |
|
|
156
|
-
| `Table` | Feature-rich table (virtual scroll, sort, filter, pinned columns) |
|
|
157
|
-
| `Timeline` | Vertical timeline |
|
|
158
|
-
| `Tooltip` | Hover tooltip |
|
|
159
|
-
| `Tour` | Interactive product tour |
|
|
160
|
-
|
|
161
|
-
### Input & Forms
|
|
162
|
-
| Component | Description |
|
|
163
|
-
|-----------|-------------|
|
|
164
|
-
| `Checkbox` | Checkbox input |
|
|
165
|
-
| `Input` | Text, password, number, textarea, color, date, range, OTP, masked inputs |
|
|
166
|
-
| `Rating` | Star rating |
|
|
167
|
-
| `Select` | Dropdown select |
|
|
168
|
-
| `SelectZone` | Drag-to-select zone |
|
|
169
|
-
| `Slider` | Range slider |
|
|
170
|
-
| `Switch` | Toggle switch |
|
|
171
|
-
| `Upload` | File upload with drag & drop |
|
|
172
|
-
|
|
173
|
-
### Feedback
|
|
174
|
-
| Component | Description |
|
|
175
|
-
|-----------|-------------|
|
|
176
|
-
| `Loading` | Spinner / loading indicator |
|
|
177
|
-
| `Modal` | Dialog modal |
|
|
178
|
-
| `ProgressBar` | Progress bar |
|
|
179
|
-
| `Toast` | Toast notifications (`toast.success()`, `toast.error()`, …) |
|
|
180
|
-
|
|
181
|
-
### Visual & Effects
|
|
182
|
-
| Component | Description |
|
|
183
|
-
|-----------|-------------|
|
|
184
|
-
| `Collapse` | Collapsible content panel |
|
|
185
|
-
| `ContextMenu` | Right-click context menu |
|
|
186
|
-
| `FloatButton` | Floating action button |
|
|
187
|
-
| `Hover3dImage` | 3D parallax image on hover |
|
|
188
|
-
| `ImagePreview` | Lightbox image preview |
|
|
189
|
-
| `Mansory` | Masonry grid layout |
|
|
190
|
-
| `QrCode` | QR code generator |
|
|
191
|
-
| `Swap` | Flip between two states |
|
|
192
|
-
| `TextRotate` | Animated rotating text |
|
|
193
|
-
|
|
194
|
-
### Utilities
|
|
195
|
-
| Component | Description |
|
|
196
|
-
|-----------|-------------|
|
|
197
|
-
| `CodePreview` | Code preview |
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## API
|
|
202
|
-
|
|
203
|
-
### Color prop
|
|
204
|
-
|
|
205
|
-
Most components accept a `color` prop:
|
|
206
|
-
|
|
207
|
-
```tsx
|
|
208
|
-
type BaseColorProps =
|
|
209
|
-
| 'primary' | 'secondary' | 'accent' | 'neutral'
|
|
210
|
-
| 'info' | 'success' | 'warning' | 'error';
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
```tsx
|
|
214
|
-
<Badge color="success">Active</Badge>
|
|
215
|
-
<Button color="warning">Caution</Button>
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Class override (slot system)
|
|
219
|
-
|
|
220
|
-
Every component exposes a `class` prop to override individual slots:
|
|
221
|
-
|
|
222
|
-
```tsx
|
|
223
|
-
// Single-element components
|
|
224
|
-
<Badge class="font-bold text-lg" />
|
|
225
|
-
|
|
226
|
-
// Multi-slot components
|
|
227
|
-
<Modal
|
|
228
|
-
class={{
|
|
229
|
-
root: 'max-w-2xl',
|
|
230
|
-
header: 'bg-base-200',
|
|
231
|
-
body: 'p-8',
|
|
232
|
-
}}
|
|
233
|
-
/>
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
## TypeScript
|
|
237
|
-
|
|
238
|
-
All prop types are exported:
|
|
239
|
-
|
|
240
|
-
```tsx
|
|
241
|
-
import type { ButtonProps, ModalProps, BaseColorProps, SolidComponent } from 'solid-tom-ui';
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
## License
|
|
245
|
-
|
|
246
|
-
MIT © [Truong Tom](https://github.com/truongtom1993)
|
|
1
|
+
# solid-tom-ui
|
|
2
|
+
|
|
3
|
+
> A blazing-fast, beautifully crafted UI component library for [SolidJS](https://solidjs.com), inspired by Ant Design.
|
|
4
|
+
|
|
5
|
+
**Entire library ships at just ~1.5 MB.** Built on **Tailwind CSS 4** and **DaisyUI 5**, solid-tom-ui harnesses SolidJS fine-grained reactivity to deliver buttery-smooth UIs with near-zero overhead — no virtual DOM, no unnecessary re-renders, just raw speed.
|
|
6
|
+
|
|
7
|
+
Customizing the look and feel is a first-class experience: swap the entire color scheme by overriding a handful of CSS variables, or dial in individual components through the unified `color` prop and per-slot `class` overrides — no CSS-in-JS, no build plugins, just plain CSS and Tailwind utilities you already know.
|
|
8
|
+
|
|
9
|
+
## Why solid-tom-ui?
|
|
10
|
+
|
|
11
|
+
- **Featherlight** — the full library (45+ components, styles included) weighs only ~1.5 MB, keeping your app fast on any network
|
|
12
|
+
- **Instant theming** — change primary colors, border radii, and shadows site-wide by editing a single CSS block; no rebuild required
|
|
13
|
+
- **Pixel-perfect by default** — every component is designed to look great out of the box, while remaining fully customizable via `class` props or CSS variables
|
|
14
|
+
- **SolidJS-native** — reactivity is handled at the signal level, so components update surgically without wasting a single render cycle
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- **45+ components** — from simple buttons to complex data tables with virtual scrolling
|
|
19
|
+
- **Tree-shakeable** — each component is its own module; unused components are not bundled
|
|
20
|
+
- **Typed** — full TypeScript support with exported prop interfaces
|
|
21
|
+
- **Themeable** — DaisyUI color tokens + unified `color` prop across all components
|
|
22
|
+
- **Accessible** — semantic HTML, ARIA attributes, keyboard navigation
|
|
23
|
+
- **Zero CSS setup** — pre-compiled CSS bundle includes Tailwind + DaisyUI, no extra config needed
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install solid-tom-ui
|
|
29
|
+
or
|
|
30
|
+
pnpm install solid-tom-ui
|
|
31
|
+
or
|
|
32
|
+
bun install solid-tom-ui
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Peer dependencies
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install solid-js
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Optional (only needed for specific components):
|
|
42
|
+
|
|
43
|
+
| Package | Component |
|
|
44
|
+
|---------|-----------|
|
|
45
|
+
| `imask` | `Input` with mask |
|
|
46
|
+
| `qrcode` | `QrCode` |
|
|
47
|
+
| `@tanstack/solid-table` | `Table` |
|
|
48
|
+
|
|
49
|
+
## Setup
|
|
50
|
+
|
|
51
|
+
### 1. Import the pre-compiled CSS bundle
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
/* app.css */
|
|
55
|
+
@import 'solid-tom-ui/styles';
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Make sure this CSS file is imported in your app entry point:
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
// src/index.tsx
|
|
62
|
+
import './app.css';
|
|
63
|
+
import { render } from 'solid-js/web';
|
|
64
|
+
import App from './App';
|
|
65
|
+
|
|
66
|
+
render(() => <App />, document.getElementById('root')!);
|
|
67
|
+
```
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### 2. Use components
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
import { Button, Modal, toast } from 'solid-tom-ui';
|
|
74
|
+
|
|
75
|
+
function App() {
|
|
76
|
+
return (
|
|
77
|
+
<Button color="primary" onClick={() => toast.success('Hello!')}>
|
|
78
|
+
Click me
|
|
79
|
+
</Button>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Advanced Setup (Custom Theme)
|
|
87
|
+
|
|
88
|
+
Overwrite css variable
|
|
89
|
+
|
|
90
|
+
```css
|
|
91
|
+
:root {
|
|
92
|
+
--color-base-100: white;
|
|
93
|
+
--color-base-content: black;
|
|
94
|
+
|
|
95
|
+
--color-primary: red;
|
|
96
|
+
--color-primary-content: white;
|
|
97
|
+
|
|
98
|
+
--color-secondary: red;
|
|
99
|
+
--color-secondary-content: white;
|
|
100
|
+
|
|
101
|
+
--color-accent: red;
|
|
102
|
+
--color-accent-content: white;
|
|
103
|
+
|
|
104
|
+
--color-neutral: red;
|
|
105
|
+
--color-neutral-content: white;
|
|
106
|
+
|
|
107
|
+
--color-info: red;
|
|
108
|
+
--color-info-content: white;
|
|
109
|
+
|
|
110
|
+
--color-success: red;
|
|
111
|
+
--color-success-content: white;
|
|
112
|
+
|
|
113
|
+
--color-warning: red;
|
|
114
|
+
--color-warning-content: white;
|
|
115
|
+
|
|
116
|
+
--color-error: red;
|
|
117
|
+
--color-error-content: white;
|
|
118
|
+
--radius-selector: 8px;
|
|
119
|
+
--radius-field: 4px;
|
|
120
|
+
--radius-box: 6px;
|
|
121
|
+
--size-selector: 4px;
|
|
122
|
+
--size-field: 4px;
|
|
123
|
+
--border: 1px;
|
|
124
|
+
--depth: 0;
|
|
125
|
+
--noise: 0;
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Components
|
|
132
|
+
|
|
133
|
+
### Layout & Navigation
|
|
134
|
+
| Component | Description |
|
|
135
|
+
|-----------|-------------|
|
|
136
|
+
| `Breadcrumb` | Navigation breadcrumb trail |
|
|
137
|
+
| `Divider` | Horizontal or vertical divider |
|
|
138
|
+
| `Drawer` | Slide-in side panel |
|
|
139
|
+
| `Dropdown` | Dropdown menu |
|
|
140
|
+
| `Menu` | Vertical/horizontal navigation menu |
|
|
141
|
+
| `Pagination` | Page navigation |
|
|
142
|
+
| `Splitter` | Resizable split pane |
|
|
143
|
+
| `Steps` | Step-by-step progress indicator |
|
|
144
|
+
| `Tab` | Tabbed navigation |
|
|
145
|
+
|
|
146
|
+
### Data Display
|
|
147
|
+
| Component | Description |
|
|
148
|
+
|-----------|-------------|
|
|
149
|
+
| `Avatar` | User avatar with fallback |
|
|
150
|
+
| `Badge` | Status badge / tag |
|
|
151
|
+
| `Carousel` | Image/content carousel |
|
|
152
|
+
| `ChatBubble` | Chat message bubble |
|
|
153
|
+
| `Diff` | Side-by-side diff viewer |
|
|
154
|
+
| `Indicator` | Numeric badge overlay |
|
|
155
|
+
| `Skeleton` | Loading skeleton placeholder |
|
|
156
|
+
| `Table` | Feature-rich table (virtual scroll, sort, filter, pinned columns) |
|
|
157
|
+
| `Timeline` | Vertical timeline |
|
|
158
|
+
| `Tooltip` | Hover tooltip |
|
|
159
|
+
| `Tour` | Interactive product tour |
|
|
160
|
+
|
|
161
|
+
### Input & Forms
|
|
162
|
+
| Component | Description |
|
|
163
|
+
|-----------|-------------|
|
|
164
|
+
| `Checkbox` | Checkbox input |
|
|
165
|
+
| `Input` | Text, password, number, textarea, color, date, range, OTP, masked inputs |
|
|
166
|
+
| `Rating` | Star rating |
|
|
167
|
+
| `Select` | Dropdown select |
|
|
168
|
+
| `SelectZone` | Drag-to-select zone |
|
|
169
|
+
| `Slider` | Range slider |
|
|
170
|
+
| `Switch` | Toggle switch |
|
|
171
|
+
| `Upload` | File upload with drag & drop |
|
|
172
|
+
|
|
173
|
+
### Feedback
|
|
174
|
+
| Component | Description |
|
|
175
|
+
|-----------|-------------|
|
|
176
|
+
| `Loading` | Spinner / loading indicator |
|
|
177
|
+
| `Modal` | Dialog modal |
|
|
178
|
+
| `ProgressBar` | Progress bar |
|
|
179
|
+
| `Toast` | Toast notifications (`toast.success()`, `toast.error()`, …) |
|
|
180
|
+
|
|
181
|
+
### Visual & Effects
|
|
182
|
+
| Component | Description |
|
|
183
|
+
|-----------|-------------|
|
|
184
|
+
| `Collapse` | Collapsible content panel |
|
|
185
|
+
| `ContextMenu` | Right-click context menu |
|
|
186
|
+
| `FloatButton` | Floating action button |
|
|
187
|
+
| `Hover3dImage` | 3D parallax image on hover |
|
|
188
|
+
| `ImagePreview` | Lightbox image preview |
|
|
189
|
+
| `Mansory` | Masonry grid layout |
|
|
190
|
+
| `QrCode` | QR code generator |
|
|
191
|
+
| `Swap` | Flip between two states |
|
|
192
|
+
| `TextRotate` | Animated rotating text |
|
|
193
|
+
|
|
194
|
+
### Utilities
|
|
195
|
+
| Component | Description |
|
|
196
|
+
|-----------|-------------|
|
|
197
|
+
| `CodePreview` | Code preview |
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## API
|
|
202
|
+
|
|
203
|
+
### Color prop
|
|
204
|
+
|
|
205
|
+
Most components accept a `color` prop:
|
|
206
|
+
|
|
207
|
+
```tsx
|
|
208
|
+
type BaseColorProps =
|
|
209
|
+
| 'primary' | 'secondary' | 'accent' | 'neutral'
|
|
210
|
+
| 'info' | 'success' | 'warning' | 'error';
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
```tsx
|
|
214
|
+
<Badge color="success">Active</Badge>
|
|
215
|
+
<Button color="warning">Caution</Button>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Class override (slot system)
|
|
219
|
+
|
|
220
|
+
Every component exposes a `class` prop to override individual slots:
|
|
221
|
+
|
|
222
|
+
```tsx
|
|
223
|
+
// Single-element components
|
|
224
|
+
<Badge class="font-bold text-lg" />
|
|
225
|
+
|
|
226
|
+
// Multi-slot components
|
|
227
|
+
<Modal
|
|
228
|
+
class={{
|
|
229
|
+
root: 'max-w-2xl',
|
|
230
|
+
header: 'bg-base-200',
|
|
231
|
+
body: 'p-8',
|
|
232
|
+
}}
|
|
233
|
+
/>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## TypeScript
|
|
237
|
+
|
|
238
|
+
All prop types are exported:
|
|
239
|
+
|
|
240
|
+
```tsx
|
|
241
|
+
import type { ButtonProps, ModalProps, BaseColorProps, SolidComponent } from 'solid-tom-ui';
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## License
|
|
245
|
+
|
|
246
|
+
MIT © [Truong Tom](https://github.com/truongtom1993)
|