shadcn-glass-ui 2.0.4 โ 2.0.6
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 +156 -797
- package/dist/shadcn-glass-ui.css +1 -1
- package/docs/ADVANCED_PATTERNS.md +408 -0
- package/docs/AI_USAGE.md +31 -0
- package/docs/BREAKING_CHANGES.md +213 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,147 +1,45 @@
|
|
|
1
1
|
# shadcn-glass-ui
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/shadcn-glass-ui)
|
|
5
|
-
[](https://github.com/Yhooi2/shadcn-glass-ui-library/blob/main/LICENSE)
|
|
6
|
-
[](https://github.com/Yhooi2/shadcn-glass-ui-library/actions)
|
|
7
|
-
[](https://bundlephobia.com/package/shadcn-glass-ui)
|
|
8
|
-
[](https://www.typescriptlang.org/)
|
|
9
|
-
[](https://reactjs.org/)
|
|
10
|
-
[](https://tailwindcss.com/)
|
|
11
|
-
[](docs/AI_USAGE.md)
|
|
12
|
-
[](docs/AI_USAGE.md)
|
|
13
|
-
[](docs/AI_USAGE.md)
|
|
14
|
-
[](https://context7.com/yhooi2/shadcn-glass-ui-library)
|
|
15
|
-
|
|
16
|
-
Glassmorphism UI library for React - AI-friendly with 58 components, strict TypeScript, and
|
|
17
|
-
comprehensive docs.
|
|
18
|
-
|
|
19
|
-
## โจ Highlights
|
|
20
|
-
|
|
21
|
-
- ๐จ **58 Components** - Core UI (18) + Atomic (7) + Composite (13) + Sections (7) + Specialized
|
|
22
|
-
(10) + Primitives (3)
|
|
23
|
-
- ๐ช **StepperGlass** - NEW compound stepper component with 3 variants (numbered, icon, dots)
|
|
24
|
-
- ๐ **3 Themes** - Glass (dark glassmorphism), Light (clean minimal), Aurora (gradient glow)
|
|
25
|
-
- ๐จ **3-Layer Token System** - 207 primitive tokens, zero hardcoded colors, 15-minute theme
|
|
26
|
-
creation
|
|
27
|
-
- ๐ค **AI-Friendly** - Optimized for Claude Code, Copilot, GPT with comprehensive docs
|
|
28
|
-
- ๐ฎ **Advanced Patterns** - asChild polymorphic rendering, Compound components (Modal, Tabs,
|
|
29
|
-
Stepper)
|
|
30
|
-
- โฟ **WCAG 2.1 AA** - Full accessibility compliance with automated testing
|
|
31
|
-
- ๐ฑ **Touch Optimized** - 44ร44px minimum touch targets (Apple HIG)
|
|
32
|
-
- โก **Modern Stack** - React 19, Tailwind v4, Vitest 4, Storybook 10, Vite 7
|
|
33
|
-
- ๐งช **~1570+ Tests** - 650+ compliance + 802 visual regression + 125 unit tests
|
|
34
|
-
- ๐ฆ **shadcn Compatible** - Works seamlessly with existing shadcn/ui projects
|
|
35
|
-
- ๐ฏ **Design System** - Comprehensive [UI_DESIGN.md](docs/design-system/UI_DESIGN.md)
|
|
36
|
-
specifications
|
|
37
|
-
- ๐ฆ **Bundle Size** - ~110KB gzipped (production build)
|
|
38
|
-
- ๐ **Data Visualization** - SparklineGlass for compact time series, InsightCardGlass for analytics
|
|
39
|
-
|
|
40
|
-
## Tech Stack
|
|
41
|
-
|
|
42
|
-
- **React 19.2** - Server Components, React Compiler, automatic batching
|
|
43
|
-
- **TypeScript 5.9** - Strict type checking
|
|
44
|
-
- **Tailwind CSS 4.1** - CSS-first configuration with CSS variables
|
|
45
|
-
- **Vite 7** (rolldown-vite) - Rust-powered bundler
|
|
46
|
-
- **Storybook 10.1** - Component workshop with ESM-only architecture
|
|
47
|
-
- **Vitest 4.0** - Browser mode testing with visual regression
|
|
48
|
-
|
|
49
|
-
See [DEPENDENCIES.md](DEPENDENCIES.md) for detailed dependency documentation.
|
|
50
|
-
|
|
51
|
-
## ๐จ Design System
|
|
52
|
-
|
|
53
|
-
- **Token Architecture** - [3-layer CSS token system](docs/TOKEN_ARCHITECTURE.md) with 207 OKLCH
|
|
54
|
-
primitives
|
|
55
|
-
- **Theme Creation** - Create production-ready themes in [15 minutes](docs/THEME_CREATION_GUIDE.md)
|
|
56
|
-
- **Zero Hardcoded Colors** - 100% CSS variable coverage across all components
|
|
57
|
-
- **Rapid Theming** - 90% faster theme creation (2-3 hours โ 10-15 minutes)
|
|
58
|
-
- **Complete Documentation** - [CSS Variables Audit](docs/CSS_VARIABLES_AUDIT.md) with 296+
|
|
59
|
-
variables per theme
|
|
60
|
-
- **Migration Support** - [Automated migration tools](docs/migration/CSS_VARIABLES_MIGRATION_2.0.md)
|
|
61
|
-
for v2.0.0
|
|
62
|
-
|
|
63
|
-
## ๐ค AI Assistant Support
|
|
64
|
-
|
|
65
|
-
This library is **optimized for AI coding assistants** including Claude Code, GitHub Copilot, and
|
|
66
|
-
ChatGPT:
|
|
67
|
-
|
|
68
|
-
- ๐ **Dedicated AI Guide** - [AI_USAGE.md](docs/AI_USAGE.md) with decision trees and workflows
|
|
69
|
-
- ๐ฏ **TypeScript Strict Mode** - Full type inference for autocomplete
|
|
70
|
-
- ๐ **Rich JSDoc** - Every component documented with @example, @accessibility
|
|
71
|
-
- ๐๏ธ **Component Catalog** - [COMPONENTS_CATALOG.md](docs/COMPONENTS_CATALOG.md) with searchable
|
|
72
|
-
index
|
|
73
|
-
- ๐ **Exports Map** - Machine-readable [EXPORTS_MAP.json](docs/EXPORTS_MAP.json)
|
|
74
|
-
- ๐งช **Real-World Examples** - Use-case based Storybook stories
|
|
75
|
-
- ๐ฆ **shadcn CLI Compatible** - Install components via
|
|
76
|
-
`npx shadcn add @shadcn-glass-ui/button-glass`
|
|
77
|
-
- ๐ **Context7 Indexed** - Discoverable via
|
|
78
|
-
[Context7 MCP](https://context7.com/yhooi2/shadcn-glass-ui-library) for AI assistants
|
|
79
|
-
|
|
80
|
-
[**โ Read AI Usage Guide**](docs/AI_USAGE.md) |
|
|
81
|
-
[**โ Component Catalog**](docs/COMPONENTS_CATALOG.md)
|
|
82
|
-
|
|
83
|
-
## ๐ค AI Tools Integration
|
|
84
|
-
|
|
85
|
-
This library is indexed and optimized for multiple AI development tools:
|
|
86
|
-
|
|
87
|
-
- **[Context7](https://context7.com/yhooi2/shadcn-glass-ui-library)** - MCP server integration with
|
|
88
|
-
59 AI-specific rules
|
|
89
|
-
- **Claude Code** - Optimized with [CLAUDE.md](CLAUDE.md) and project-specific instructions
|
|
90
|
-
- **GitHub Copilot** - TypeScript strict mode + comprehensive JSDoc annotations
|
|
91
|
-
- **ChatGPT/GPT-4** - Machine-readable [EXPORTS_MAP.json](docs/EXPORTS_MAP.json) with component
|
|
92
|
-
metadata
|
|
93
|
-
|
|
94
|
-
**Features for AI assistants:**
|
|
95
|
-
|
|
96
|
-
- ๐ฏ Decision trees for installation methods ([AI_USAGE.md](docs/AI_USAGE.md))
|
|
97
|
-
- ๐ 59 Context7 rules covering breaking changes, compound APIs, token system
|
|
98
|
-
- ๐ Searchable component catalog with fuzzy matching support
|
|
99
|
-
- ๐ฆ Machine-readable exports with props, variants, and keywords
|
|
100
|
-
- ๐งช Test coverage metadata for quality assurance
|
|
101
|
-
|
|
102
|
-
## ๐ฅ๏ธ CLI
|
|
103
|
-
|
|
104
|
-
Explore components directly from the command line:
|
|
3
|
+
<div align="center">
|
|
105
4
|
|
|
106
|
-
|
|
107
|
-
# Get component info (fuzzy search supported)
|
|
108
|
-
npx shadcn-glass-ui info ButtonGlass
|
|
109
|
-
npx shadcn-glass-ui info button
|
|
110
|
-
npx shadcn-glass-ui info modal
|
|
5
|
+

|
|
111
6
|
|
|
112
|
-
|
|
113
|
-
npx shadcn-glass-ui list
|
|
7
|
+
**Glassmorphism UI components for React** โ drop-in shadcn/ui compatible, AI-optimized
|
|
114
8
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
9
|
+
[Live Demo](https://yhooi2.github.io/shadcn-glass-ui-library/) |
|
|
10
|
+
[Storybook](https://yhooi2.github.io/shadcn-glass-ui-library/) |
|
|
11
|
+
[npm](https://www.npmjs.com/package/shadcn-glass-ui)
|
|
118
12
|
|
|
119
|
-
|
|
120
|
-
npx shadcn-glass-ui --help
|
|
121
|
-
```
|
|
13
|
+
</div>
|
|
122
14
|
|
|
123
|
-
|
|
15
|
+
[](https://www.npmjs.com/package/shadcn-glass-ui)
|
|
16
|
+
[](https://www.npmjs.com/package/shadcn-glass-ui)
|
|
17
|
+
[](https://www.typescriptlang.org/)
|
|
18
|
+
[](docs/AI_USAGE.md)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## At a Glance
|
|
124
23
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
- [Migration Guides](docs/migration/) - Upgrade and API changes
|
|
24
|
+
| Feature | Details |
|
|
25
|
+
| ----------------- | --------------------------------------------------------------------------------------- |
|
|
26
|
+
| **Components** | 58 total: 18 Core + 7 Atomic + 13 Composite + 7 Section + 10 Specialized + 3 Primitives |
|
|
27
|
+
| **Themes** | Glass (dark), Light (clean), Aurora (gradient) |
|
|
28
|
+
| **Stack** | React 19, TypeScript 5.9, Tailwind 4.1, Vite 7 |
|
|
29
|
+
| **Testing** | 1,570+ tests (802 visual + 650 compliance + 125 unit) |
|
|
30
|
+
| **AI Support** | Optimized for Claude, Copilot, GPT โ [AI Guide](docs/AI_USAGE.md) |
|
|
31
|
+
| **Accessibility** | WCAG 2.1 AA, 44px touch targets, keyboard navigation |
|
|
32
|
+
| **Bundle Size** | ~110KB gzipped |
|
|
135
33
|
|
|
136
|
-
|
|
34
|
+
---
|
|
137
35
|
|
|
138
|
-
|
|
36
|
+
## Quick Start
|
|
139
37
|
|
|
140
|
-
### Option 1:
|
|
38
|
+
### Option 1: shadcn CLI (Recommended)
|
|
141
39
|
|
|
142
|
-
**Listed on [registry.directory](https://registry.directory)
|
|
40
|
+
**For existing shadcn/ui projects.** Listed on [registry.directory](https://registry.directory).
|
|
143
41
|
|
|
144
|
-
|
|
42
|
+
1. Add registry to `components.json`:
|
|
145
43
|
|
|
146
44
|
```json
|
|
147
45
|
{
|
|
@@ -153,769 +51,230 @@ Configure your `components.json`:
|
|
|
153
51
|
}
|
|
154
52
|
```
|
|
155
53
|
|
|
156
|
-
Install components
|
|
54
|
+
2. Install components:
|
|
157
55
|
|
|
158
56
|
```bash
|
|
159
|
-
|
|
160
|
-
npx shadcn@latest add @shadcn-glass-ui/button-glass
|
|
161
|
-
|
|
162
|
-
# Multiple components
|
|
163
|
-
npx shadcn@latest add @shadcn-glass-ui/button-glass @shadcn-glass-ui/input-glass @shadcn-glass-ui/modal-glass
|
|
164
|
-
|
|
165
|
-
# With automatic dependencies
|
|
166
|
-
npx shadcn@latest add @shadcn-glass-ui/button-glass --deps
|
|
57
|
+
npx shadcn@latest add @shadcn-glass-ui/button-glass @shadcn-glass-ui/input-glass
|
|
167
58
|
```
|
|
168
59
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
- โ
Automatic dependency installation
|
|
172
|
-
- โ
Type-safe CLI workflow
|
|
173
|
-
- โ
Compatible with existing shadcn/ui projects
|
|
174
|
-
- โ
58 components available
|
|
175
|
-
|
|
176
|
-
**[โ Full Registry Documentation](docs/REGISTRY_USAGE.md)**
|
|
60
|
+
[Full Registry Guide](docs/REGISTRY_USAGE.md)
|
|
177
61
|
|
|
178
62
|
### Option 2: npm Package
|
|
179
63
|
|
|
180
|
-
|
|
64
|
+
**For new projects.**
|
|
181
65
|
|
|
182
66
|
```bash
|
|
183
67
|
npm install shadcn-glass-ui
|
|
184
68
|
```
|
|
185
69
|
|
|
186
|
-
**[โ npm Installation Guide](docs/GETTING_STARTED.md)**
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## ๐ Quick Start
|
|
191
|
-
|
|
192
|
-
**Requirements:**
|
|
193
|
-
|
|
194
|
-
- React 18.0+ or 19.0+
|
|
195
|
-
- React-DOM 18.0+ or 19.0+
|
|
196
|
-
- Tailwind CSS 4.0+
|
|
197
|
-
|
|
198
|
-
### Basic Usage
|
|
199
|
-
|
|
200
70
|
```tsx
|
|
201
|
-
import { ButtonGlass,
|
|
71
|
+
import { ButtonGlass, ThemeProvider } from 'shadcn-glass-ui';
|
|
202
72
|
import 'shadcn-glass-ui/dist/styles.css';
|
|
203
73
|
|
|
204
74
|
function App() {
|
|
205
75
|
return (
|
|
206
76
|
<ThemeProvider defaultTheme="glass">
|
|
207
|
-
<
|
|
208
|
-
<ButtonGlass variant="primary" size="lg">
|
|
209
|
-
Click me
|
|
210
|
-
</ButtonGlass>
|
|
211
|
-
<InputGlass placeholder="Enter text..." />
|
|
212
|
-
</div>
|
|
77
|
+
<ButtonGlass variant="primary">Click me</ButtonGlass>
|
|
213
78
|
</ThemeProvider>
|
|
214
79
|
);
|
|
215
80
|
}
|
|
216
|
-
|
|
217
|
-
export default App;
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
## ๐ Advanced Features (Phase 3)
|
|
221
|
-
|
|
222
|
-
### asChild Pattern
|
|
223
|
-
|
|
224
|
-
Polymorphic rendering with Radix UI Slot - render components as any element:
|
|
225
|
-
|
|
226
|
-
```tsx
|
|
227
|
-
import { ButtonGlass } from 'shadcn-glass-ui';
|
|
228
|
-
import { Link } from 'react-router-dom';
|
|
229
|
-
|
|
230
|
-
// Render button as Link
|
|
231
|
-
<ButtonGlass asChild>
|
|
232
|
-
<Link to="/profile">View Profile</Link>
|
|
233
|
-
</ButtonGlass>
|
|
234
|
-
|
|
235
|
-
// Render button as anchor
|
|
236
|
-
<ButtonGlass asChild variant="primary">
|
|
237
|
-
<a href="https://example.com" target="_blank">
|
|
238
|
-
External Link
|
|
239
|
-
</a>
|
|
240
|
-
</ButtonGlass>
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
**Supported components:** `ButtonGlass`, `AvatarGlass`, `GlassCard`
|
|
244
|
-
|
|
245
|
-
### Compound Components
|
|
246
|
-
|
|
247
|
-
Fine-grained composition for complex components:
|
|
248
|
-
|
|
249
|
-
```tsx
|
|
250
|
-
import { ModalGlass, TabsGlass } from 'shadcn-glass-ui';
|
|
251
|
-
|
|
252
|
-
// ModalGlass Compound API
|
|
253
|
-
<ModalGlass.Root open={open} onOpenChange={setOpen}>
|
|
254
|
-
<ModalGlass.Overlay />
|
|
255
|
-
<ModalGlass.Content>
|
|
256
|
-
<ModalGlass.Header>
|
|
257
|
-
<ModalGlass.Title>Confirm Action</ModalGlass.Title>
|
|
258
|
-
<ModalGlass.Description>
|
|
259
|
-
This action cannot be undone
|
|
260
|
-
</ModalGlass.Description>
|
|
261
|
-
<ModalGlass.Close />
|
|
262
|
-
</ModalGlass.Header>
|
|
263
|
-
<ModalGlass.Body>
|
|
264
|
-
<p>Content here...</p>
|
|
265
|
-
</ModalGlass.Body>
|
|
266
|
-
<ModalGlass.Footer>
|
|
267
|
-
<ButtonGlass onClick={() => setOpen(false)}>Cancel</ButtonGlass>
|
|
268
|
-
<ButtonGlass variant="primary">Confirm</ButtonGlass>
|
|
269
|
-
</ModalGlass.Footer>
|
|
270
|
-
</ModalGlass.Content>
|
|
271
|
-
</ModalGlass.Root>
|
|
272
|
-
|
|
273
|
-
// TabsGlass Compound API
|
|
274
|
-
<TabsGlass.Root value={activeTab} onValueChange={setActiveTab}>
|
|
275
|
-
<TabsGlass.List>
|
|
276
|
-
<TabsGlass.Trigger value="tab1">Overview</TabsGlass.Trigger>
|
|
277
|
-
<TabsGlass.Trigger value="tab2">Analytics</TabsGlass.Trigger>
|
|
278
|
-
</TabsGlass.List>
|
|
279
|
-
<TabsGlass.Content value="tab1">
|
|
280
|
-
<p>Overview content</p>
|
|
281
|
-
</TabsGlass.Content>
|
|
282
|
-
<TabsGlass.Content value="tab2">
|
|
283
|
-
<p>Analytics content</p>
|
|
284
|
-
</TabsGlass.Content>
|
|
285
|
-
</TabsGlass.Root>
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
## โ ๏ธ Breaking Changes (v2.0.0)
|
|
289
|
-
|
|
290
|
-
**v2.0.0 removes deprecated CSS variables.** This is a major version bump due to breaking changes in
|
|
291
|
-
theming.
|
|
292
|
-
|
|
293
|
-
### Removed CSS Variables
|
|
294
|
-
|
|
295
|
-
The following CSS variable names have been **REMOVED** in v2.0.0:
|
|
296
|
-
|
|
297
|
-
| Removed (v1.x) | Replacement (v2.0+) | Semantic Meaning |
|
|
298
|
-
| -------------------- | ------------------------ | --------------------------------- |
|
|
299
|
-
| `--metric-emerald-*` | `--metric-success-*` | Success states (positive metrics) |
|
|
300
|
-
| `--metric-amber-*` | `--metric-warning-*` | Warning states (attention needed) |
|
|
301
|
-
| `--metric-blue-*` | `--metric-default-*` | Neutral/default states |
|
|
302
|
-
| `--metric-red-*` | `--metric-destructive-*` | Error/danger states (critical) |
|
|
303
|
-
|
|
304
|
-
**Total removed:** 16 variables (4 color families ร 4 properties each: bg, text, border, glow)
|
|
305
|
-
|
|
306
|
-
### Why This Change?
|
|
307
|
-
|
|
308
|
-
- **Semantic Clarity**: Color names (emerald, amber, blue, red) โ semantic roles (success, warning,
|
|
309
|
-
default, destructive)
|
|
310
|
-
- **shadcn/ui Compatibility**: Aligns with shadcn/ui variant naming conventions
|
|
311
|
-
- **Consistency**: Matches AlertGlass/BadgeGlass/ButtonGlass variant prop values
|
|
312
|
-
- **Token Architecture**: Part of the 3-layer token system migration
|
|
313
|
-
|
|
314
|
-
### Migration Guide
|
|
315
|
-
|
|
316
|
-
**Automated Migration (Recommended):**
|
|
317
|
-
|
|
318
|
-
```bash
|
|
319
|
-
# macOS/BSD
|
|
320
|
-
find src/ -type f \( -name "*.tsx" -o -name "*.ts" -o -name "*.css" \) -exec sed -i '' \
|
|
321
|
-
-e 's/--metric-emerald-/--metric-success-/g' \
|
|
322
|
-
-e 's/--metric-amber-/--metric-warning-/g' \
|
|
323
|
-
-e 's/--metric-blue-/--metric-default-/g' \
|
|
324
|
-
-e 's/--metric-red-/--metric-destructive-/g' \
|
|
325
|
-
{} +
|
|
326
|
-
|
|
327
|
-
# Linux
|
|
328
|
-
find src/ -type f \( -name "*.tsx" -o -name "*.ts" -o -name "*.css" \) -exec sed -i \
|
|
329
|
-
-e 's/--metric-emerald-/--metric-success-/g' \
|
|
330
|
-
-e 's/--metric-amber-/--metric-warning-/g' \
|
|
331
|
-
-e 's/--metric-blue-/--metric-default-/g' \
|
|
332
|
-
-e 's/--metric-red-/--metric-destructive-/g' \
|
|
333
|
-
{} +
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
**Example:**
|
|
337
|
-
|
|
338
|
-
```css
|
|
339
|
-
/* โ v1.x (REMOVED in v2.0) */
|
|
340
|
-
.metric-card-success {
|
|
341
|
-
background: var(--metric-emerald-bg);
|
|
342
|
-
color: var(--metric-emerald-text);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/* โ
v2.0+ */
|
|
346
|
-
.metric-card-success {
|
|
347
|
-
background: var(--metric-success-bg);
|
|
348
|
-
color: var(--metric-success-text);
|
|
349
|
-
}
|
|
350
81
|
```
|
|
351
82
|
|
|
352
|
-
|
|
353
|
-
examples, troubleshooting, and affected components.
|
|
354
|
-
|
|
355
|
-
### New in v2.0.0
|
|
356
|
-
|
|
357
|
-
**Token Architecture:**
|
|
358
|
-
|
|
359
|
-
- **3-Layer System**: Primitive โ Semantic โ Component tokens
|
|
360
|
-
- **207 Primitive Tokens**: Complete OKLCH color palette in `oklch-primitives.css`
|
|
361
|
-
- **Zero Hardcoded Colors**: 100% migration to CSS variables (98โ0 in glass.css)
|
|
362
|
-
- **Theme Creation**: 90% faster (2-3 hours โ 10-15 minutes)
|
|
363
|
-
|
|
364
|
-
**New Components:**
|
|
365
|
-
|
|
366
|
-
- **StepperGlass** - Compound stepper with 3 variants (numbered, icon, dots), 2 orientations, linear
|
|
367
|
-
mode
|
|
368
|
-
|
|
369
|
-
**Custom Hooks (Exported):**
|
|
370
|
-
|
|
371
|
-
- `useFocus`, `useHover`, `useResponsive`, `useWallpaperTint`
|
|
372
|
-
|
|
373
|
-
**Documentation:**
|
|
374
|
-
|
|
375
|
-
- [TOKEN_ARCHITECTURE.md](docs/TOKEN_ARCHITECTURE.md) - Complete token system guide (365 lines)
|
|
376
|
-
- [THEME_CREATION_GUIDE.md](docs/THEME_CREATION_GUIDE.md) - Create themes in 15 minutes (455 lines)
|
|
377
|
-
- [CSS_VARIABLES_AUDIT.md](docs/CSS_VARIABLES_AUDIT.md) - Complete audit of 296+ variables per theme
|
|
83
|
+
[Getting Started Guide](docs/GETTING_STARTED.md)
|
|
378
84
|
|
|
379
85
|
---
|
|
380
86
|
|
|
381
|
-
##
|
|
382
|
-
|
|
383
|
-
**v1.0.0 removes all legacy/deprecated APIs.** This is a clean slate release with only Compound API
|
|
384
|
-
support.
|
|
385
|
-
|
|
386
|
-
### Removed Components
|
|
387
|
-
|
|
388
|
-
#### SelectGlass (Removed in v1.0.0)
|
|
389
|
-
|
|
390
|
-
**SelectGlass has been removed.** Use **ComboBoxGlass** instead.
|
|
391
|
-
|
|
392
|
-
```tsx
|
|
393
|
-
// โ Removed in v1.0.0
|
|
394
|
-
<SelectGlass
|
|
395
|
-
options={options}
|
|
396
|
-
value={value}
|
|
397
|
-
onChange={setValue}
|
|
398
|
-
placeholder="Select option"
|
|
399
|
-
/>
|
|
400
|
-
|
|
401
|
-
// โ
Use ComboBoxGlass
|
|
402
|
-
<ComboBoxGlass
|
|
403
|
-
options={options}
|
|
404
|
-
value={value}
|
|
405
|
-
onChange={setValue}
|
|
406
|
-
placeholder="Select option"
|
|
407
|
-
/>
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
### Removed Legacy APIs
|
|
411
|
-
|
|
412
|
-
#### ModalGlass: Legacy Props API Removed
|
|
413
|
-
|
|
414
|
-
**The old props-based API has been removed.** Use Compound API instead.
|
|
415
|
-
|
|
416
|
-
```tsx
|
|
417
|
-
// โ Removed in v1.0.0
|
|
418
|
-
<ModalGlass isOpen={true} onClose={() => {}} title="Test">
|
|
419
|
-
Content
|
|
420
|
-
</ModalGlass>
|
|
421
|
-
|
|
422
|
-
// โ
Use Compound API
|
|
423
|
-
<ModalGlass.Root open={true} onOpenChange={() => {}}>
|
|
424
|
-
<ModalGlass.Overlay />
|
|
425
|
-
<ModalGlass.Content>
|
|
426
|
-
<ModalGlass.Header>
|
|
427
|
-
<ModalGlass.Title>Test</ModalGlass.Title>
|
|
428
|
-
<ModalGlass.Close />
|
|
429
|
-
</ModalGlass.Header>
|
|
430
|
-
<ModalGlass.Body>Content</ModalGlass.Body>
|
|
431
|
-
</ModalGlass.Content>
|
|
432
|
-
</ModalGlass.Root>
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
**Key Changes:**
|
|
436
|
-
|
|
437
|
-
- `isOpen` โ `open` (on ModalGlass.Root)
|
|
438
|
-
- `onClose` โ `onOpenChange` (callback signature changed from `() => void` to
|
|
439
|
-
`(open: boolean) => void`)
|
|
440
|
-
- `title` prop removed โ use `<ModalGlass.Title>` component
|
|
441
|
-
- Manual structure required (Overlay, Content, Header, Body, Footer)
|
|
442
|
-
|
|
443
|
-
#### TabsGlass: Legacy Props API Removed
|
|
444
|
-
|
|
445
|
-
**The old props-based API has been removed.** Use Compound API instead.
|
|
446
|
-
|
|
447
|
-
```tsx
|
|
448
|
-
// โ Removed in v1.0.0
|
|
449
|
-
<TabsGlass
|
|
450
|
-
tabs={[
|
|
451
|
-
{ id: 'tab1', label: 'Tab 1' },
|
|
452
|
-
{ id: 'tab2', label: 'Tab 2' }
|
|
453
|
-
]}
|
|
454
|
-
activeTab="tab1"
|
|
455
|
-
onChange={setActiveTab}
|
|
456
|
-
/>
|
|
457
|
-
|
|
458
|
-
// โ
Use Compound API
|
|
459
|
-
<TabsGlass.Root value="tab1" onValueChange={setActiveTab}>
|
|
460
|
-
<TabsGlass.List>
|
|
461
|
-
<TabsGlass.Trigger value="tab1">Tab 1</TabsGlass.Trigger>
|
|
462
|
-
<TabsGlass.Trigger value="tab2">Tab 2</TabsGlass.Trigger>
|
|
463
|
-
</TabsGlass.List>
|
|
464
|
-
<TabsGlass.Content value="tab1">Content 1</TabsGlass.Content>
|
|
465
|
-
<TabsGlass.Content value="tab2">Content 2</TabsGlass.Content>
|
|
466
|
-
</TabsGlass.Root>
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
**Key Changes:**
|
|
470
|
-
|
|
471
|
-
- `tabs` array prop removed โ use individual `<TabsGlass.Trigger>` components
|
|
472
|
-
- `activeTab` โ `value` (on TabsGlass.Root)
|
|
473
|
-
- `onChange` โ `onValueChange`
|
|
474
|
-
- Content must be explicitly defined with `<TabsGlass.Content>` for each tab
|
|
475
|
-
|
|
476
|
-
### Migration Guides
|
|
477
|
-
|
|
478
|
-
Detailed migration guides are available in the [docs/migration/](docs/migration/) directory:
|
|
87
|
+
## Components
|
|
479
88
|
|
|
480
|
-
|
|
481
|
-
|
|
89
|
+
| Core UI | Composite | Specialized |
|
|
90
|
+
| ------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
91
|
+
|  |  |  |
|
|
92
|
+
| ButtonGlass, InputGlass, ModalGlass, TabsGlass... | MetricCardGlass, AICardGlass, YearCardGlass... | SparklineGlass, StepperGlass, RainbowProgressGlass... |
|
|
482
93
|
|
|
483
|
-
|
|
94
|
+
[View All 58 Components](docs/COMPONENTS_CATALOG.md) |
|
|
95
|
+
[Interactive Storybook](https://yhooi2.github.io/shadcn-glass-ui-library/)
|
|
484
96
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
## ๐ Full Documentation
|
|
488
|
-
|
|
489
|
-
- **[Getting Started Guide](docs/GETTING_STARTED.md)** - Comprehensive setup tutorial
|
|
490
|
-
- **[AI Usage Guide](docs/AI_USAGE.md)** - Using library with AI assistants (Copilot, Claude, GPT)
|
|
491
|
-
- **[Publishing Guide](docs/PUBLISHING.md)** - Build and publish with TypeScript declarations
|
|
492
|
-
- **[Storybook](https://yhooi2.github.io/shadcn-glass-ui-library/)** - Live component demos
|
|
493
|
-
- **[UI Design System](docs/design-system/UI_DESIGN.md)** - Complete design specifications
|
|
494
|
-
- **[Visual Testing Guide](docs/visual-testing-guide.md)** - Screenshot update workflow
|
|
495
|
-
- **[Migration Guide](MIGRATION_GUIDE.md)** - Upgrading from v1
|
|
496
|
-
- **[Breaking Changes](BREAKING_CHANGES.md)** - API changes log
|
|
497
|
-
- **[Dependencies](DEPENDENCIES.md)** - Detailed dependency docs
|
|
498
|
-
- **[Contributing](CONTRIBUTING.md)** - Development guidelines
|
|
499
|
-
|
|
500
|
-
## ๐ฏ Component Categories
|
|
501
|
-
|
|
502
|
-
### Level 1: Core UI (18 components)
|
|
503
|
-
|
|
504
|
-
Essential building blocks for any application:
|
|
505
|
-
|
|
506
|
-
- **Buttons & Actions**: ButtonGlass
|
|
507
|
-
- **Inputs**: InputGlass, CheckboxGlass, ToggleGlass, SliderGlass, ComboBoxGlass, PopoverGlass
|
|
508
|
-
- **Containers**: GlassCard, ModalGlass
|
|
509
|
-
- **Navigation**: TabsGlass, DropdownGlass
|
|
510
|
-
- **Feedback**: BadgeGlass, AlertGlass, NotificationGlass, TooltipGlass, SkeletonGlass,
|
|
511
|
-
ProgressGlass, CircularProgressGlass
|
|
512
|
-
- **Media**: AvatarGlass
|
|
513
|
-
|
|
514
|
-
[View all Core UI components โ](src/components/glass/ui/)
|
|
515
|
-
|
|
516
|
-
### Level 2: Atomic (7 components)
|
|
517
|
-
|
|
518
|
-
Small, specialized components for specific use cases:
|
|
519
|
-
|
|
520
|
-
- **SearchBoxGlass** - Search input with icon
|
|
521
|
-
- **ThemeToggleGlass** - Theme switcher button
|
|
522
|
-
- **ExpandableHeaderGlass** - Collapsible header section
|
|
523
|
-
- **SortDropdownGlass** - Sorting dropdown menu
|
|
524
|
-
- **StatItemGlass** - Individual stat display
|
|
525
|
-
- **IconButtonGlass** - Icon-only button variant
|
|
526
|
-
- **InsightCardGlass** - Insight display with 7 semantic variants (default, tip, highlight, warning,
|
|
527
|
-
stat, growth, decline)
|
|
528
|
-
|
|
529
|
-
[View all Atomic components โ](src/components/glass/atomic/)
|
|
530
|
-
|
|
531
|
-
### Level 3: Composite (13 components)
|
|
532
|
-
|
|
533
|
-
Pre-built complex components combining multiple elements:
|
|
534
|
-
|
|
535
|
-
- **AICardGlass** - AI summary card with feature list
|
|
536
|
-
- **MetricCardGlass** - Metric display card with progress indicator
|
|
537
|
-
- **YearCardGlass** - Year card for career timeline
|
|
538
|
-
- **CircularMetricGlass** - Circular progress metric display
|
|
539
|
-
- **RepositoryCardGlass** - Repository card with expandable details
|
|
540
|
-
- **RepositoryHeaderGlass** - Repository header with metadata
|
|
541
|
-
- **RepositoryMetadataGlass** - Repository metadata display
|
|
542
|
-
- **TrustScoreDisplayGlass** - Trust score with visual indicator
|
|
543
|
-
- **UserStatsLineGlass** - User statistics horizontal display
|
|
544
|
-
- **UserInfoGlass** - User information card
|
|
545
|
-
- **CareerStatsHeaderGlass** - Career statistics header
|
|
546
|
-
- **ContributionMetricsGlass** - Contribution metrics display
|
|
547
|
-
- **MetricsGridGlass** - Grid layout for metrics
|
|
548
|
-
|
|
549
|
-
[View all Composite components โ](src/components/glass/composite/)
|
|
550
|
-
|
|
551
|
-
### Specialized Components (10 components)
|
|
552
|
-
|
|
553
|
-
Advanced specialized components for specific use cases:
|
|
554
|
-
|
|
555
|
-
- **StatusIndicatorGlass** - Status dots with glow effect
|
|
556
|
-
- **SegmentedControlGlass** - Segmented button group
|
|
557
|
-
- **RainbowProgressGlass** - Rainbow gradient progress bar
|
|
558
|
-
- **LanguageBarGlass** - Language proficiency bar with legend
|
|
559
|
-
- **ProfileAvatarGlass** - Large avatar with glow animation
|
|
560
|
-
- **FlagAlertGlass** - Warning/danger flag alert with icon
|
|
561
|
-
- **ProgressGlass** - Enhanced progress bar
|
|
562
|
-
- **BaseProgressGlass** - Base progress component
|
|
563
|
-
- **SparklineGlass** - Compact bar chart for time series visualization with height/gap variants
|
|
564
|
-
- **StepperGlass** - Compound stepper for multi-step workflows (numbered, icon, dots variants)
|
|
565
|
-
|
|
566
|
-
[View all Specialized components โ](src/components/glass/specialized/)
|
|
567
|
-
|
|
568
|
-
### Level 4: Sections (7 components)
|
|
569
|
-
|
|
570
|
-
Full-page sections ready to use in your application:
|
|
571
|
-
|
|
572
|
-
- **HeaderNavGlass** - Navigation header with search and theme toggle
|
|
573
|
-
- **ProfileHeaderGlass** - User profile header with avatar, stats, and languages
|
|
574
|
-
- **CareerStatsGlass** - Career statistics with expandable year cards
|
|
575
|
-
- **FlagsSectionGlass** - Expandable flags/warnings section
|
|
576
|
-
- **TrustScoreCardGlass** - Trust score display with detailed metrics
|
|
577
|
-
- **ProjectsListGlass** - Projects list with filtering and sorting
|
|
578
|
-
- **HeaderBrandingGlass** - Branded header with logo and navigation
|
|
579
|
-
|
|
580
|
-
[View all Section components โ](src/components/glass/sections/)
|
|
581
|
-
|
|
582
|
-
### Blocks (6 ready-to-use demo sections)
|
|
583
|
-
|
|
584
|
-
Complete component showcases following shadcn/ui pattern - these are demo/documentation components,
|
|
585
|
-
not production-ready blocks:
|
|
586
|
-
|
|
587
|
-
- **ButtonsBlock** - All button variants, sizes, states demo
|
|
588
|
-
- **FormElementsBlock** - Input, Slider, Toggle, Checkbox demos
|
|
589
|
-
- **ProgressBlock** - Progress bars, RainbowProgress, Skeletons demo
|
|
590
|
-
- **AvatarGalleryBlock** - Avatar sizes and status indicators demo
|
|
591
|
-
- **BadgesBlock** - Badge variants with tooltips demo
|
|
592
|
-
- **NotificationsBlock** - Notifications and alerts demo
|
|
97
|
+
---
|
|
593
98
|
|
|
594
|
-
|
|
595
|
-
individual components from the categories above.
|
|
99
|
+
## Why shadcn-glass-ui?
|
|
596
100
|
|
|
597
|
-
|
|
101
|
+
| Standard shadcn/ui | shadcn-glass-ui |
|
|
102
|
+
| ------------------ | ------------------------------------------------ |
|
|
103
|
+
| Flat design | Glassmorphism effects (blur, glow, transparency) |
|
|
104
|
+
| Manual theming | 3 built-in themes with token system |
|
|
105
|
+
| Basic components | 58 components including analytics widgets |
|
|
106
|
+
| DIY accessibility | WCAG 2.1 AA + touch targets out of the box |
|
|
107
|
+
| Generic docs | AI-optimized documentation |
|
|
598
108
|
|
|
599
|
-
|
|
109
|
+
**Seamless Integration:** Works alongside existing shadcn/ui components. Same patterns, same CLI.
|
|
600
110
|
|
|
601
|
-
|
|
111
|
+
---
|
|
602
112
|
|
|
603
|
-
|
|
604
|
-
- **DesktopShowcase** - GitHub Analytics desktop application mockup with glassmorphism design
|
|
605
|
-
- **MobileShowcase** - Mobile-optimized GitHub profile view with responsive layout
|
|
113
|
+
## Component Categories
|
|
606
114
|
|
|
607
|
-
|
|
115
|
+
<details>
|
|
116
|
+
<summary><strong>Core UI (18)</strong> โ Essential building blocks</summary>
|
|
608
117
|
|
|
609
|
-
|
|
118
|
+
ButtonGlass, InputGlass, CheckboxGlass, ToggleGlass, SliderGlass, ModalGlass, TabsGlass,
|
|
119
|
+
DropdownGlass, TooltipGlass, AlertGlass, NotificationGlass, BadgeGlass, AvatarGlass, GlassCard,
|
|
120
|
+
ProgressGlass, CircularProgressGlass, SkeletonGlass, ComboBoxGlass
|
|
610
121
|
|
|
611
|
-
|
|
122
|
+
</details>
|
|
612
123
|
|
|
613
|
-
|
|
124
|
+
<details>
|
|
125
|
+
<summary><strong>Atomic (7)</strong> โ Single-purpose components</summary>
|
|
614
126
|
|
|
615
|
-
|
|
127
|
+
IconButtonGlass, ThemeToggleGlass, SearchBoxGlass, SortDropdownGlass, StatItemGlass,
|
|
128
|
+
ExpandableHeaderGlass, InsightCardGlass
|
|
616
129
|
|
|
617
|
-
|
|
618
|
-
<div className="theme-glass">
|
|
619
|
-
<ButtonGlass>Glassmorphic Button</ButtonGlass>
|
|
620
|
-
</div>
|
|
621
|
-
```
|
|
130
|
+
</details>
|
|
622
131
|
|
|
623
|
-
|
|
132
|
+
<details>
|
|
133
|
+
<summary><strong>Composite (13)</strong> โ Pre-built complex widgets</summary>
|
|
624
134
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
- Glow effects on hover/focus
|
|
135
|
+
MetricCardGlass, YearCardGlass, AICardGlass, RepositoryCardGlass, TrustScoreDisplayGlass,
|
|
136
|
+
CircularMetricGlass, UserStatsLineGlass, UserInfoGlass, CareerStatsHeaderGlass,
|
|
137
|
+
ContributionMetricsGlass, MetricsGridGlass, RepositoryHeaderGlass, RepositoryMetadataGlass
|
|
629
138
|
|
|
630
|
-
|
|
139
|
+
</details>
|
|
631
140
|
|
|
632
|
-
|
|
141
|
+
<details>
|
|
142
|
+
<summary><strong>Section (7)</strong> โ Full page sections</summary>
|
|
633
143
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
<ButtonGlass>Light Theme Button</ButtonGlass>
|
|
637
|
-
</div>
|
|
638
|
-
```
|
|
144
|
+
HeaderNavGlass, ProfileHeaderGlass, CareerStatsGlass, FlagsSectionGlass, TrustScoreCardGlass,
|
|
145
|
+
ProjectsListGlass, HeaderBrandingGlass
|
|
639
146
|
|
|
640
|
-
|
|
147
|
+
</details>
|
|
641
148
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
- Reduced opacity overlays
|
|
645
|
-
- Crisp, modern aesthetic
|
|
149
|
+
<details>
|
|
150
|
+
<summary><strong>Specialized (10)</strong> โ Advanced components</summary>
|
|
646
151
|
|
|
647
|
-
|
|
152
|
+
StatusIndicatorGlass, SegmentedControlGlass, RainbowProgressGlass, LanguageBarGlass,
|
|
153
|
+
ProfileAvatarGlass, FlagAlertGlass, BaseProgressGlass, SparklineGlass, StepperGlass (compound API
|
|
154
|
+
with 3 variants)
|
|
648
155
|
|
|
649
|
-
|
|
156
|
+
</details>
|
|
650
157
|
|
|
651
|
-
|
|
652
|
-
<div className="theme-aurora">
|
|
653
|
-
<ButtonGlass>Aurora Gradient Button</ButtonGlass>
|
|
654
|
-
</div>
|
|
655
|
-
```
|
|
158
|
+
[Full Component Catalog](docs/COMPONENTS_CATALOG.md)
|
|
656
159
|
|
|
657
|
-
|
|
160
|
+
---
|
|
658
161
|
|
|
659
|
-
|
|
660
|
-
- Enhanced glow effects
|
|
661
|
-
- Dynamic backgrounds
|
|
662
|
-
- Eye-catching visuals
|
|
162
|
+
## Themes
|
|
663
163
|
|
|
664
|
-
|
|
164
|
+
| Glass (Dark) | Light | Aurora |
|
|
165
|
+
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
166
|
+
|  |  |  |
|
|
167
|
+
| Frosted glass effects | Clean minimal | Gradient glow |
|
|
665
168
|
|
|
666
169
|
```tsx
|
|
667
|
-
import {
|
|
668
|
-
import { ThemeProvider, useTheme } from '@/lib/theme-context';
|
|
669
|
-
|
|
670
|
-
function App() {
|
|
671
|
-
return (
|
|
672
|
-
<ThemeProvider defaultTheme="glass">
|
|
673
|
-
<YourApp />
|
|
674
|
-
</ThemeProvider>
|
|
675
|
-
);
|
|
676
|
-
}
|
|
170
|
+
import { ThemeProvider, useTheme } from 'shadcn-glass-ui';
|
|
677
171
|
|
|
678
172
|
function ThemeSwitcher() {
|
|
679
|
-
const { theme, setTheme } = useTheme();
|
|
680
|
-
|
|
681
|
-
return (
|
|
682
|
-
<select value={theme} onChange={(e) => setTheme(e.target.value)}>
|
|
683
|
-
<option value="glass">Glass (Dark)</option>
|
|
684
|
-
<option value="light">Light</option>
|
|
685
|
-
<option value="aurora">Aurora</option>
|
|
686
|
-
</select>
|
|
687
|
-
);
|
|
173
|
+
const { theme, cycleTheme, setTheme } = useTheme();
|
|
174
|
+
return <button onClick={cycleTheme}>Current: {theme}</button>;
|
|
688
175
|
}
|
|
689
176
|
```
|
|
690
177
|
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
GlassCard supports 3 intensity levels for customizable blur effects:
|
|
178
|
+
[Theme Creation Guide](docs/THEME_CREATION_GUIDE.md) โ Create custom themes in 15 minutes
|
|
694
179
|
|
|
695
|
-
|
|
696
|
-
// Subtle glass effect (8px blur)
|
|
697
|
-
<GlassCard intensity="subtle">
|
|
698
|
-
Subtle Effect
|
|
699
|
-
</GlassCard>
|
|
700
|
-
|
|
701
|
-
// Standard glassmorphism (16px blur - default)
|
|
702
|
-
<GlassCard intensity="medium">
|
|
703
|
-
Standard Glass
|
|
704
|
-
</GlassCard>
|
|
705
|
-
|
|
706
|
-
// Strong glass effect (24px blur)
|
|
707
|
-
<GlassCard intensity="strong">
|
|
708
|
-
Strong Effect
|
|
709
|
-
</GlassCard>
|
|
710
|
-
```
|
|
711
|
-
|
|
712
|
-
**Intensity Levels:**
|
|
713
|
-
|
|
714
|
-
- `subtle` - 8px blur (--blur-sm) - Light glass effect
|
|
715
|
-
- `medium` - 16px blur (--blur-md) - Standard cards (default)
|
|
716
|
-
- `strong` - 24px blur (--blur-lg) - Featured cards
|
|
717
|
-
|
|
718
|
-
**Performance Note:** Use sparingly - limit to 2-3 glass elements per view for optimal performance.
|
|
719
|
-
|
|
720
|
-
## โฟ Accessibility
|
|
721
|
-
|
|
722
|
-
All components are WCAG 2.1 AA compliant:
|
|
723
|
-
|
|
724
|
-
- โ
**Keyboard Navigation** - Full Tab/Enter/Arrow key support
|
|
725
|
-
- โ
**Screen Readers** - Proper ARIA labels and roles
|
|
726
|
-
- โ
**Focus Indicators** - Visible focus rings (2px inner + 4px outer)
|
|
727
|
-
- โ
**Color Contrast** - Minimum 4.5:1 for text, 3:1 for UI
|
|
728
|
-
- โ
**Touch Targets** - 44ร44px minimum (Apple HIG)
|
|
729
|
-
- โ
**Reduced Motion** - Respects `prefers-reduced-motion`
|
|
730
|
-
|
|
731
|
-
### Automated Testing
|
|
732
|
-
|
|
733
|
-
```bash
|
|
734
|
-
npm run test:compliance # Design system compliance (650+ tests)
|
|
735
|
-
npm run test:compliance:browser # Browser-based a11y tests
|
|
736
|
-
```
|
|
737
|
-
|
|
738
|
-
## ๐ Performance
|
|
739
|
-
|
|
740
|
-
Thanks to the modern stack:
|
|
741
|
-
|
|
742
|
-
### Build Performance
|
|
743
|
-
|
|
744
|
-
- **Production Builds**: 3-16x faster (Rolldown bundler)
|
|
745
|
-
- **Memory Usage**: 100x reduction vs Webpack/Rollup
|
|
746
|
-
- **Dev Server**: Near-instant start with Vite HMR
|
|
747
|
-
- **CSS Builds**: 100x faster incremental builds (Tailwind v4)
|
|
180
|
+
---
|
|
748
181
|
|
|
749
|
-
|
|
182
|
+
## FAQ
|
|
750
183
|
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
- **Code Splitting**: Automatic route-based splitting
|
|
754
|
-
- **CSS Output**: Optimized purged CSS (~10KB gzipped)
|
|
184
|
+
<details>
|
|
185
|
+
<summary><strong>How do I migrate from v1.x to v2.0?</strong></summary>
|
|
755
186
|
|
|
756
|
-
|
|
187
|
+
v2.0 renames CSS variables to semantic names. Run the automated migration:
|
|
757
188
|
|
|
758
189
|
```bash
|
|
759
|
-
|
|
190
|
+
find src/ -type f \( -name "*.tsx" -o -name "*.css" \) -exec sed -i '' \
|
|
191
|
+
-e 's/--metric-emerald-/--metric-success-/g' \
|
|
192
|
+
-e 's/--metric-amber-/--metric-warning-/g' \
|
|
193
|
+
-e 's/--metric-blue-/--metric-default-/g' \
|
|
194
|
+
-e 's/--metric-red-/--metric-destructive-/g' {} +
|
|
760
195
|
```
|
|
761
196
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
- ButtonGlass initial render: < 1ms
|
|
765
|
-
- 100 component renders: < 50ms
|
|
766
|
-
- Theme switching: < 100ms
|
|
767
|
-
|
|
768
|
-
## ๐งช Testing
|
|
769
|
-
|
|
770
|
-
Comprehensive test coverage across multiple layers:
|
|
771
|
-
|
|
772
|
-
### Test Suites
|
|
197
|
+
[Full Migration Guide](docs/BREAKING_CHANGES.md)
|
|
773
198
|
|
|
774
|
-
|
|
775
|
-
# All tests (~1,570+ total)
|
|
776
|
-
npm test
|
|
777
|
-
|
|
778
|
-
# Design system compliance (650+ tests)
|
|
779
|
-
npm run test:compliance:run # jsdom tests
|
|
780
|
-
npm run test:compliance:browser:run # browser tests
|
|
199
|
+
</details>
|
|
781
200
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
npm run test:visual:update # Update baselines
|
|
201
|
+
<details>
|
|
202
|
+
<summary><strong>Does it work with existing shadcn/ui components?</strong></summary>
|
|
785
203
|
|
|
786
|
-
|
|
787
|
-
npm run test:unit
|
|
204
|
+
Yes! Glass components use the same patterns and can coexist with standard shadcn/ui components.
|
|
788
205
|
|
|
789
|
-
|
|
790
|
-
npm run test:coverage
|
|
791
|
-
```
|
|
206
|
+
</details>
|
|
792
207
|
|
|
793
|
-
|
|
208
|
+
<details>
|
|
209
|
+
<summary><strong>What are the requirements?</strong></summary>
|
|
794
210
|
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
| **Visual Regression** | 802 | All components |
|
|
799
|
-
| **Unit Tests** | 125 | Core utilities |
|
|
800
|
-
| **Total** | **~1,570+** | **Comprehensive** |
|
|
211
|
+
- React 18.0+ or 19.0+
|
|
212
|
+
- Tailwind CSS 4.0+
|
|
213
|
+
- Node.js 20.16+
|
|
801
214
|
|
|
802
|
-
|
|
215
|
+
</details>
|
|
803
216
|
|
|
804
|
-
|
|
217
|
+
<details>
|
|
218
|
+
<summary><strong>How do I use with AI assistants?</strong></summary>
|
|
805
219
|
|
|
806
|
-
|
|
807
|
-
|
|
220
|
+
See our [AI Usage Guide](docs/AI_USAGE.md) with decision trees for Claude, Copilot, and GPT. The
|
|
221
|
+
library is indexed on [Context7](https://context7.com/yhooi2/shadcn-glass-ui-library).
|
|
808
222
|
|
|
809
|
-
|
|
223
|
+
</details>
|
|
810
224
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
git clone https://github.com/Yhooi2/shadcn-glass-ui-library.git
|
|
814
|
-
cd shadcn-glass-ui-library
|
|
225
|
+
<details>
|
|
226
|
+
<summary><strong>Where are the breaking changes documented?</strong></summary>
|
|
815
227
|
|
|
816
|
-
|
|
817
|
-
|
|
228
|
+
- [BREAKING_CHANGES.md](docs/BREAKING_CHANGES.md) โ Consolidated v1.0 and v2.0 changes
|
|
229
|
+
- [CHANGELOG.md](CHANGELOG.md) โ Complete version history
|
|
230
|
+
- [Migration Guides](docs/migration/) โ Step-by-step migration
|
|
818
231
|
|
|
819
|
-
|
|
820
|
-
./scripts/setup-git-hooks.sh
|
|
232
|
+
</details>
|
|
821
233
|
|
|
822
|
-
|
|
823
|
-
npm run dev # Vite dev server (port 5173)
|
|
824
|
-
npm run storybook # Storybook (port 6006)
|
|
825
|
-
```
|
|
234
|
+
---
|
|
826
235
|
|
|
827
|
-
|
|
236
|
+
## Documentation
|
|
828
237
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
238
|
+
| Resource | Description |
|
|
239
|
+
| -------------------------------------------------------------- | --------------------------- |
|
|
240
|
+
| [Storybook](https://yhooi2.github.io/shadcn-glass-ui-library/) | Interactive component demos |
|
|
241
|
+
| [Getting Started](docs/GETTING_STARTED.md) | Setup tutorial |
|
|
242
|
+
| [Component Catalog](docs/COMPONENTS_CATALOG.md) | All 58 components |
|
|
243
|
+
| [AI Usage Guide](docs/AI_USAGE.md) | For Claude, Copilot, GPT |
|
|
244
|
+
| [Theme Guide](docs/THEME_CREATION_GUIDE.md) | Create custom themes |
|
|
245
|
+
| [Token Architecture](docs/TOKEN_ARCHITECTURE.md) | 3-layer CSS token system |
|
|
246
|
+
| [Advanced Patterns](docs/ADVANCED_PATTERNS.md) | asChild, Compound APIs |
|
|
247
|
+
| [Breaking Changes](docs/BREAKING_CHANGES.md) | Migration guides |
|
|
833
248
|
|
|
834
|
-
|
|
249
|
+
## CLI
|
|
835
250
|
|
|
836
251
|
```bash
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
## ๐ Project Structure
|
|
842
|
-
|
|
843
|
-
```
|
|
844
|
-
shadcn-glass-ui/
|
|
845
|
-
โโโ src/
|
|
846
|
-
โ โโโ components/
|
|
847
|
-
โ โ โโโ glass/
|
|
848
|
-
โ โ โ โโโ ui/ # Core UI components (17)
|
|
849
|
-
โ โ โ โโโ atomic/ # Atomic components (6)
|
|
850
|
-
โ โ โ โโโ composite/ # Composite components (13)
|
|
851
|
-
โ โ โ โโโ sections/ # Section components (7)
|
|
852
|
-
โ โ โโโ blocks/ # Ready-to-use blocks (6)
|
|
853
|
-
โ โ โโโ __visual__/ # Visual regression tests
|
|
854
|
-
โ โ โโโ ComponentShowcase.tsx
|
|
855
|
-
โ โ โโโ DesktopShowcase.tsx
|
|
856
|
-
โ โโโ lib/
|
|
857
|
-
โ โ โโโ utils.ts # cn() utility
|
|
858
|
-
โ โ โโโ theme-context.tsx # Theme provider
|
|
859
|
-
โ โ โโโ themeStyles.ts # Theme definitions
|
|
860
|
-
โ โ โโโ variants/ # CVA variants
|
|
861
|
-
โ โโโ styles/
|
|
862
|
-
โ โ โโโ tokens/ # Design tokens
|
|
863
|
-
โ โ โโโ themes/ # Theme CSS
|
|
864
|
-
โ โโโ test/
|
|
865
|
-
โ โโโ compliance/ # Compliance tests
|
|
866
|
-
โ โโโ utils/ # Test utilities
|
|
867
|
-
โโโ .storybook/ # Storybook config
|
|
868
|
-
โโโ docs/ # Documentation
|
|
869
|
-
โโโ docs/design-system/UI_DESIGN.md # Design system spec
|
|
870
|
-
โโโ package.json
|
|
252
|
+
npx shadcn-glass-ui info button # Component info (fuzzy search)
|
|
253
|
+
npx shadcn-glass-ui list # List all components
|
|
254
|
+
npx shadcn-glass-ui list --category=core # Filter by category
|
|
871
255
|
```
|
|
872
256
|
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
876
|
-
|
|
877
|
-
### Quick Contribution Guide
|
|
878
|
-
|
|
879
|
-
1. Fork the repository
|
|
880
|
-
2. Create a feature branch: `git checkout -b feat/amazing-component`
|
|
881
|
-
3. Make your changes following our code standards
|
|
882
|
-
4. Run tests: `npm run test:compliance:run`
|
|
883
|
-
5. Commit with conventional commits: `feat(ui): add DatePickerGlass component`
|
|
884
|
-
6. Push and create a Pull Request
|
|
885
|
-
|
|
886
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
|
|
887
|
-
|
|
888
|
-
## ๐ License
|
|
889
|
-
|
|
890
|
-
MIT License
|
|
257
|
+
---
|
|
891
258
|
|
|
892
|
-
|
|
259
|
+
## Contributing
|
|
893
260
|
|
|
894
|
-
|
|
261
|
+
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
895
262
|
|
|
896
|
-
|
|
263
|
+
## License
|
|
897
264
|
|
|
898
|
-
|
|
899
|
-
- [Radix UI](https://www.radix-ui.com/) - Unstyled accessible primitives
|
|
900
|
-
- [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework
|
|
901
|
-
- [Vite](https://vitejs.dev/) - Next generation frontend tooling
|
|
902
|
-
- [Storybook](https://storybook.js.org/) - Component workshop
|
|
903
|
-
- [Vitest](https://vitest.dev/) - Blazing fast unit test framework
|
|
265
|
+
MIT โ See [LICENSE](LICENSE)
|
|
904
266
|
|
|
905
|
-
##
|
|
267
|
+
## Credits
|
|
906
268
|
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
- **GitHub**: [shadcn-glass-ui-library](https://github.com/Yhooi2/shadcn-glass-ui-library)
|
|
910
|
-
- **Issues**: [Report a bug](https://github.com/Yhooi2/shadcn-glass-ui-library/issues)
|
|
911
|
-
- **Discussions**: [Community](https://github.com/Yhooi2/shadcn-glass-ui-library/discussions)
|
|
269
|
+
Built with [shadcn/ui](https://ui.shadcn.com/), [Radix UI](https://www.radix-ui.com/),
|
|
270
|
+
[Tailwind CSS](https://tailwindcss.com/), [Vite](https://vitejs.dev/)
|
|
912
271
|
|
|
913
|
-
|
|
272
|
+
---
|
|
914
273
|
|
|
915
|
-
|
|
274
|
+
<div align="center">
|
|
916
275
|
|
|
917
|
-
[
|
|
276
|
+
**[Star on GitHub](https://github.com/Yhooi2/shadcn-glass-ui-library)** if you find this useful!
|
|
918
277
|
|
|
919
|
-
|
|
278
|
+
[](https://star-history.com/#Yhooi2/shadcn-glass-ui-library)
|
|
920
279
|
|
|
921
|
-
|
|
280
|
+
</div>
|