shadcn-glass-ui 1.0.11 → 2.0.1

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 (215) hide show
  1. package/CHANGELOG.md +213 -0
  2. package/README.md +174 -17
  3. package/context7.json +58 -0
  4. package/dist/cli/index.cjs +470 -0
  5. package/dist/cli/index.cjs.map +1 -0
  6. package/dist/cli/index.d.ts +18 -0
  7. package/dist/cli/index.js +469 -0
  8. package/dist/cli/index.js.map +1 -0
  9. package/dist/components.cjs +4 -4
  10. package/dist/components.d.ts +153 -22
  11. package/dist/components.js +2 -2
  12. package/dist/hooks.cjs +2 -2
  13. package/dist/index.cjs +872 -5
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.ts +0 -2390
  16. package/dist/index.js +844 -3
  17. package/dist/index.js.map +1 -1
  18. package/dist/r/ai-card-glass.json +1 -1
  19. package/dist/r/avatar-glass.json +1 -1
  20. package/dist/r/circular-metric-glass.json +1 -1
  21. package/dist/r/circular-progress-glass.json +1 -1
  22. package/dist/r/combobox-glass.json +1 -1
  23. package/dist/r/flag-alert-glass.json +1 -1
  24. package/dist/r/flags-section-glass.json +1 -1
  25. package/dist/r/insight-card-glass.json +26 -0
  26. package/dist/r/interactive-card.json +1 -1
  27. package/dist/r/language-bar-glass.json +1 -1
  28. package/dist/r/metric-card-glass.json +3 -2
  29. package/dist/r/metrics-grid-glass.json +1 -1
  30. package/dist/r/modal-glass.json +1 -1
  31. package/dist/r/progress-glass.json +1 -1
  32. package/dist/r/registry.json +19 -1
  33. package/dist/r/segmented-control-glass.json +1 -1
  34. package/dist/r/sparkline-glass.json +26 -0
  35. package/dist/r/stepper-glass.json +41 -0
  36. package/dist/r/tabs-glass.json +1 -1
  37. package/dist/r/trust-score-card-glass.json +1 -1
  38. package/dist/r/year-card-glass.json +1 -1
  39. package/dist/shadcn-glass-ui.css +1 -1
  40. package/dist/{theme-context-XtasSxRT.cjs → theme-context-CVW50BKW.cjs} +2 -2
  41. package/dist/{theme-context-XtasSxRT.cjs.map → theme-context-CVW50BKW.cjs.map} +1 -1
  42. package/dist/themes.cjs +1 -1
  43. package/dist/trust-score-card-glass-BcZbul0P.js +26895 -0
  44. package/dist/trust-score-card-glass-BcZbul0P.js.map +1 -0
  45. package/dist/trust-score-card-glass-r3qM09Jp.cjs +27689 -0
  46. package/dist/trust-score-card-glass-r3qM09Jp.cjs.map +1 -0
  47. package/dist/{use-focus-BbpE2qGq.cjs → use-focus-ZE8ozmZE.cjs} +2 -2
  48. package/dist/{use-focus-BbpE2qGq.cjs.map → use-focus-ZE8ozmZE.cjs.map} +1 -1
  49. package/dist/{use-wallpaper-tint-CIqtoETa.cjs → use-wallpaper-tint-BuS80tbN.cjs} +2 -2
  50. package/dist/{use-wallpaper-tint-CIqtoETa.cjs.map → use-wallpaper-tint-BuS80tbN.cjs.map} +1 -1
  51. package/dist/{utils-CGCOTvxT.js → utils-CcyeqpKQ.js} +1 -1
  52. package/dist/{utils-CGCOTvxT.js.map → utils-CcyeqpKQ.js.map} +1 -1
  53. package/dist/{utils-CriE74ig.cjs → utils-DLXayspX.cjs} +2 -2
  54. package/dist/{utils-CriE74ig.cjs.map → utils-DLXayspX.cjs.map} +1 -1
  55. package/dist/utils.cjs +1 -1
  56. package/dist/utils.js +1 -1
  57. package/docs/AI_IMPROVEMENTS_COMPLETE.md +574 -0
  58. package/docs/AI_USAGE.md +1328 -0
  59. package/docs/API_PATTERNS_COMPARISON.md +418 -0
  60. package/docs/BEST_PRACTICES.md +800 -0
  61. package/docs/COMPLIANCE_CHECKLIST.md +307 -0
  62. package/docs/COMPLIANCE_TESTING.md +436 -0
  63. package/docs/COMPONENTS_CATALOG.md +1076 -0
  64. package/docs/CSS_VARIABLES_AUDIT.md +306 -0
  65. package/docs/CSS_VARIABLES_REFACTORING_PLAN.md +330 -0
  66. package/docs/EXPORTS_MAP.json +875 -0
  67. package/docs/EXPORTS_STRUCTURE.md +729 -0
  68. package/docs/GETTING_STARTED.md +655 -0
  69. package/docs/METRIC_CARD_API_REDESIGN.md +354 -0
  70. package/docs/PRIMITIVE_MAPPING.md +404 -0
  71. package/docs/PUBLISHING.md +593 -0
  72. package/docs/REGISTRY_SUMMARY.md +96 -0
  73. package/docs/REGISTRY_USAGE.md +339 -0
  74. package/docs/SECURITY.md +117 -0
  75. package/docs/THEME_CREATION_GUIDE.md +455 -0
  76. package/docs/TOKEN_ARCHITECTURE.md +365 -0
  77. package/docs/announcements/v1.0.5-devto.md +363 -0
  78. package/docs/announcements/v1.0.5-reddit.md +115 -0
  79. package/docs/announcements/v1.0.5-twitter.md +70 -0
  80. package/docs/api/README.md +725 -0
  81. package/docs/api/functions/ThemeProvider.md +21 -0
  82. package/docs/api/functions/cn.md +27 -0
  83. package/docs/api/functions/getNextTheme.md +21 -0
  84. package/docs/api/functions/getThemeConfig.md +21 -0
  85. package/docs/api/functions/useFocus.md +53 -0
  86. package/docs/api/functions/useHover.md +47 -0
  87. package/docs/api/functions/useResponsive.md +31 -0
  88. package/docs/api/functions/useTheme.md +15 -0
  89. package/docs/api/functions/useWallpaperTint.md +36 -0
  90. package/docs/api/globals.md +139 -0
  91. package/docs/api/interfaces/AlertGlassProps.md +131 -0
  92. package/docs/api/interfaces/AvatarGlassProps.md +114 -0
  93. package/docs/api/interfaces/BadgeGlassProps.md +118 -0
  94. package/docs/api/interfaces/ButtonGlassProps.md +179 -0
  95. package/docs/api/interfaces/CheckboxGlassProps.md +125 -0
  96. package/docs/api/interfaces/DropdownGlassProps.md +123 -0
  97. package/docs/api/interfaces/DropdownItem.md +53 -0
  98. package/docs/api/interfaces/GlassCardProps.md +151 -0
  99. package/docs/api/interfaces/InputGlassProps.md +169 -0
  100. package/docs/api/interfaces/NotificationGlassProps.md +67 -0
  101. package/docs/api/interfaces/ProgressGlassProps.md +49 -0
  102. package/docs/api/interfaces/SkeletonGlassProps.md +41 -0
  103. package/docs/api/interfaces/SliderGlassProps.md +107 -0
  104. package/docs/api/interfaces/TabItem.md +25 -0
  105. package/docs/api/interfaces/ThemeConfig.md +25 -0
  106. package/docs/api/interfaces/ThemeContextValue.md +47 -0
  107. package/docs/api/interfaces/ToggleGlassProps.md +59 -0
  108. package/docs/api/interfaces/TooltipGlassProps.md +119 -0
  109. package/docs/api/type-aliases/AlertType.md +11 -0
  110. package/docs/api/type-aliases/AlertVariant.md +11 -0
  111. package/docs/api/type-aliases/AvatarSize.md +11 -0
  112. package/docs/api/type-aliases/AvatarStatus.md +13 -0
  113. package/docs/api/type-aliases/BadgeSize.md +11 -0
  114. package/docs/api/type-aliases/BadgeVariant.md +11 -0
  115. package/docs/api/type-aliases/ButtonGlassSize.md +11 -0
  116. package/docs/api/type-aliases/ButtonGlassVariant.md +11 -0
  117. package/docs/api/type-aliases/DropdownAlign.md +11 -0
  118. package/docs/api/type-aliases/GlowType.md +11 -0
  119. package/docs/api/type-aliases/InputGlassSize.md +11 -0
  120. package/docs/api/type-aliases/IntensityType.md +11 -0
  121. package/docs/api/type-aliases/ModalSize.md +11 -0
  122. package/docs/api/type-aliases/NotificationType.md +11 -0
  123. package/docs/api/type-aliases/PaddingType.md +11 -0
  124. package/docs/api/type-aliases/ProgressGradient.md +11 -0
  125. package/docs/api/type-aliases/ProgressSize.md +11 -0
  126. package/docs/api/type-aliases/SkeletonVariant.md +11 -0
  127. package/docs/api/type-aliases/Theme.md +11 -0
  128. package/docs/api/type-aliases/ToggleGlassSize.md +11 -0
  129. package/docs/api/type-aliases/TooltipPosition.md +11 -0
  130. package/docs/api/variables/AICardGlass.md +11 -0
  131. package/docs/api/variables/AlertGlass.md +11 -0
  132. package/docs/api/variables/AvatarGlass.md +11 -0
  133. package/docs/api/variables/BadgeGlass.md +11 -0
  134. package/docs/api/variables/BaseProgressGlass.md +11 -0
  135. package/docs/api/variables/ButtonGlass.md +11 -0
  136. package/docs/api/variables/CareerStatsGlass.md +11 -0
  137. package/docs/api/variables/CareerStatsHeaderGlass.md +11 -0
  138. package/docs/api/variables/CheckboxGlass.md +11 -0
  139. package/docs/api/variables/CircularMetricGlass.md +22 -0
  140. package/docs/api/variables/CircularProgressGlass.md +11 -0
  141. package/docs/api/variables/ComboBoxGlass.md +27 -0
  142. package/docs/api/variables/ContributionMetricsGlass.md +11 -0
  143. package/docs/api/variables/DropdownGlass.md +11 -0
  144. package/docs/api/variables/ExpandableHeaderGlass.md +11 -0
  145. package/docs/api/variables/FlagAlertGlass.md +11 -0
  146. package/docs/api/variables/FlagsSectionGlass.md +11 -0
  147. package/docs/api/variables/FormFieldWrapper.md +44 -0
  148. package/docs/api/variables/GlassCard.md +11 -0
  149. package/docs/api/variables/HeaderBrandingGlass.md +11 -0
  150. package/docs/api/variables/HeaderNavGlass.md +11 -0
  151. package/docs/api/variables/IconButtonGlass.md +11 -0
  152. package/docs/api/variables/InputGlass.md +11 -0
  153. package/docs/api/variables/InteractiveCard.md +45 -0
  154. package/docs/api/variables/LanguageBarGlass.md +11 -0
  155. package/docs/api/variables/MetricCardGlass.md +11 -0
  156. package/docs/api/variables/MetricsGridGlass.md +11 -0
  157. package/docs/api/variables/ModalGlass.md +72 -0
  158. package/docs/api/variables/NotificationGlass.md +11 -0
  159. package/docs/api/variables/PopoverGlass.md +11 -0
  160. package/docs/api/variables/ProfileAvatarGlass.md +11 -0
  161. package/docs/api/variables/ProfileHeaderGlass.md +11 -0
  162. package/docs/api/variables/ProgressGlass.md +11 -0
  163. package/docs/api/variables/ProjectsListGlass.md +11 -0
  164. package/docs/api/variables/RainbowProgressGlass.md +11 -0
  165. package/docs/api/variables/RepositoryCardGlass.md +11 -0
  166. package/docs/api/variables/RepositoryHeaderGlass.md +11 -0
  167. package/docs/api/variables/RepositoryMetadataGlass.md +11 -0
  168. package/docs/api/variables/SearchBoxGlass.md +11 -0
  169. package/docs/api/variables/SegmentedControlGlass.md +11 -0
  170. package/docs/api/variables/SkeletonGlass.md +11 -0
  171. package/docs/api/variables/SliderGlass.md +11 -0
  172. package/docs/api/variables/SortDropdownGlass.md +11 -0
  173. package/docs/api/variables/StatItemGlass.md +11 -0
  174. package/docs/api/variables/StatusIndicatorGlass.md +11 -0
  175. package/docs/api/variables/THEMES.md +11 -0
  176. package/docs/api/variables/THEME_CONFIG.md +11 -0
  177. package/docs/api/variables/TabsGlass.md +52 -0
  178. package/docs/api/variables/ThemeToggleGlass.md +11 -0
  179. package/docs/api/variables/ToggleGlass.md +11 -0
  180. package/docs/api/variables/TooltipGlass.md +11 -0
  181. package/docs/api/variables/TouchTarget.md +35 -0
  182. package/docs/api/variables/TrustScoreCardGlass.md +11 -0
  183. package/docs/api/variables/TrustScoreDisplayGlass.md +11 -0
  184. package/docs/api/variables/UserInfoGlass.md +11 -0
  185. package/docs/api/variables/UserStatsLineGlass.md +11 -0
  186. package/docs/api/variables/YearCardGlass.md +11 -0
  187. package/docs/api/variables/alertVariants.md +21 -0
  188. package/docs/api/variables/avatarSizes.md +21 -0
  189. package/docs/api/variables/badgeVariants.md +21 -0
  190. package/docs/api/variables/buttonGlassVariants.md +21 -0
  191. package/docs/api/variables/cardIntensity.md +21 -0
  192. package/docs/api/variables/dropdownAlign.md +21 -0
  193. package/docs/api/variables/inputVariants.md +21 -0
  194. package/docs/api/variables/modalSizes.md +21 -0
  195. package/docs/api/variables/notificationVariants.md +21 -0
  196. package/docs/api/variables/progressSizes.md +21 -0
  197. package/docs/api/variables/shadcnAlertVariants.md +21 -0
  198. package/docs/api/variables/shadcnBadgeVariants.md +21 -0
  199. package/docs/api/variables/shadcnButtonVariants.md +21 -0
  200. package/docs/api/variables/skeletonVariants.md +21 -0
  201. package/docs/api/variables/statusSizes.md +21 -0
  202. package/docs/api/variables/toggleSizes.md +21 -0
  203. package/docs/api/variables/tooltipPositions.md +21 -0
  204. package/docs/design-system/UI_DESIGN.md +628 -0
  205. package/docs/migration/CSS_VARIABLES_MIGRATION_2.0.md +325 -0
  206. package/docs/migration/modal-glass-compound-api.md +458 -0
  207. package/docs/migration/select-to-combobox.md +386 -0
  208. package/docs/migration/tabs-glass-compound-api.md +579 -0
  209. package/docs/technical/DEPENDENCIES.md +291 -0
  210. package/docs/visual-testing-guide.md +324 -0
  211. package/package.json +20 -3
  212. package/dist/trust-score-card-glass-CNcQveNY.cjs +0 -8231
  213. package/dist/trust-score-card-glass-CNcQveNY.cjs.map +0 -1
  214. package/dist/trust-score-card-glass-CowcDyxH.js +0 -7795
  215. package/dist/trust-score-card-glass-CowcDyxH.js.map +0 -1
@@ -0,0 +1,1328 @@
1
+ # AI Usage Guide for shadcn-glass-ui
2
+
3
+ This guide is specifically for **AI assistants** (Claude Code, GitHub Copilot, GPT-based tools)
4
+ helping users integrate shadcn-glass-ui into their projects.
5
+
6
+ ## 🎯 Quick Decision Tree
7
+
8
+ ### When a user asks "I want to use shadcn-glass-ui"
9
+
10
+ **Step 1: Identify their project type**
11
+
12
+ ```
13
+ Is this an existing shadcn/ui project?
14
+
15
+ ├─ YES → Use shadcn CLI (Option A)
16
+ │ ✅ Best for: Existing shadcn/ui projects
17
+ │ ✅ Benefits: Automatic dependency resolution, familiar workflow
18
+
19
+ └─ NO → Is this a new project?
20
+
21
+ ├─ YES → Use npm package (Option B)
22
+ │ ✅ Best for: New projects without shadcn/ui
23
+ │ ✅ Benefits: Faster setup, pre-built components
24
+
25
+ └─ NO → Use manual copy (Option C)
26
+ ✅ Best for: Custom setups, learning internals
27
+ ✅ Benefits: Full control, no dependencies on npm/registry
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Option A: shadcn CLI (Existing shadcn/ui Projects)
33
+
34
+ ### Prerequisites Check
35
+
36
+ Before suggesting this option, verify:
37
+
38
+ - `components.json` exists in project root
39
+ - `@/components/ui` alias configured
40
+ - Tailwind CSS installed
41
+
42
+ ### Installation Steps
43
+
44
+ **1. Add registry to `components.json`**
45
+
46
+ ```json
47
+ {
48
+ "registries": {
49
+ "@shadcn-glass-ui": {
50
+ "url": "https://raw.githubusercontent.com/Yhooi2/shadcn-glass-ui-library/main/public/r"
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ **2. Install components**
57
+
58
+ ```bash
59
+ npx shadcn@latest add @shadcn-glass-ui/button-glass
60
+ ```
61
+
62
+ **3. Import and use**
63
+
64
+ ```tsx
65
+ import { ButtonGlass } from '@/components/glass/ui/button-glass';
66
+
67
+ <ButtonGlass variant="primary">Click me</ButtonGlass>;
68
+ ```
69
+
70
+ ### Common Issues
71
+
72
+ **Issue: "Registry not found"**
73
+
74
+ - **Cause:** Missing registry configuration
75
+ - **Fix:** Ensure `registries` object in `components.json`
76
+
77
+ **Issue: "Component not found"**
78
+
79
+ - **Cause:** Wrong component name
80
+ - **Fix:** Use `@shadcn-glass-ui/` prefix (e.g., `@shadcn-glass-ui/button-glass`, not `ButtonGlass`)
81
+
82
+ ---
83
+
84
+ ## Option B: npm Package (New Projects)
85
+
86
+ ### Prerequisites
87
+
88
+ ```bash
89
+ # Check Node.js version (must be 20.16+, 22.19+, or 24+)
90
+ node --version
91
+
92
+ # Check React version (must be 18.0+ or 19.0+)
93
+ npm list react
94
+ ```
95
+
96
+ ### Installation Steps
97
+
98
+ **1. Install package**
99
+
100
+ ```bash
101
+ npm install shadcn-glass-ui
102
+ ```
103
+
104
+ **2. Install peer dependencies**
105
+
106
+ ```bash
107
+ npm install react@19 react-dom@19 tailwindcss@4
108
+ ```
109
+
110
+ **3. Configure Tailwind**
111
+
112
+ Create/update `tailwind.config.ts`:
113
+
114
+ ```typescript
115
+ import type { Config } from 'tailwindcss';
116
+
117
+ export default {
118
+ content: [
119
+ './src/**/*.{js,ts,jsx,tsx}',
120
+ './node_modules/shadcn-glass-ui/dist/**/*.{js,ts,jsx,tsx}',
121
+ ],
122
+ theme: {
123
+ extend: {
124
+ backdropBlur: {
125
+ sm: '8px',
126
+ md: '16px',
127
+ lg: '24px',
128
+ },
129
+ },
130
+ },
131
+ } satisfies Config;
132
+ ```
133
+
134
+ **4. Import CSS**
135
+
136
+ In your main CSS file (`src/index.css` or `src/globals.css`):
137
+
138
+ ```css
139
+ @import 'shadcn-glass-ui/dist/styles.css';
140
+ ```
141
+
142
+ **5. Wrap app with theme provider**
143
+
144
+ ```tsx
145
+ import { ThemeProvider } from 'shadcn-glass-ui';
146
+
147
+ function App() {
148
+ return (
149
+ <ThemeProvider defaultTheme="glass">
150
+ <YourApp />
151
+ </ThemeProvider>
152
+ );
153
+ }
154
+ ```
155
+
156
+ **6. Use components**
157
+
158
+ ```tsx
159
+ import { ButtonGlass, InputGlass } from 'shadcn-glass-ui';
160
+
161
+ <ButtonGlass variant="primary">Click me</ButtonGlass>
162
+ <InputGlass placeholder="Enter text..." />
163
+ ```
164
+
165
+ ### Verification Steps
166
+
167
+ **After installation, verify setup:**
168
+
169
+ ```bash
170
+ # 1. Check package installed
171
+ npm list shadcn-glass-ui
172
+
173
+ # 2. Check Tailwind can find CSS
174
+ npm run build # Should not show Tailwind warnings
175
+
176
+ # 3. Test component import
177
+ # Create test file: src/test-glass.tsx
178
+ ```
179
+
180
+ ```tsx
181
+ // src/test-glass.tsx
182
+ import { ButtonGlass } from 'shadcn-glass-ui';
183
+
184
+ export function Test() {
185
+ return <ButtonGlass>Test</ButtonGlass>;
186
+ }
187
+ ```
188
+
189
+ ### Common Issues
190
+
191
+ **Issue: "Module not found: 'shadcn-glass-ui'"**
192
+
193
+ - **Cause:** Package not installed
194
+ - **Fix:** `npm install shadcn-glass-ui`
195
+
196
+ **Issue: "Peer dependency warning"**
197
+
198
+ - **Cause:** Missing React or Tailwind
199
+ - **Fix:** `npm install react@19 react-dom@19 tailwindcss@4`
200
+
201
+ **Issue: "Styles not applied"**
202
+
203
+ - **Cause:** CSS not imported
204
+ - **Fix:** Add `@import 'shadcn-glass-ui/dist/styles.css';` to main CSS
205
+
206
+ ---
207
+
208
+ ## Option C: Manual Copy (Custom Setups)
209
+
210
+ ### When to Use
211
+
212
+ - Learning component internals
213
+ - Custom build systems
214
+ - Offline development
215
+ - No npm/yarn available
216
+
217
+ ### Steps
218
+
219
+ **1. Copy component files**
220
+
221
+ ```bash
222
+ # Example: Copy ButtonGlass
223
+ curl -o src/components/glass/ui/button-glass.tsx \
224
+ https://raw.githubusercontent.com/Yhooi2/shadcn-glass-ui-library/main/src/components/glass/ui/button-glass.tsx
225
+
226
+ curl -o src/lib/variants/button-glass-variants.ts \
227
+ https://raw.githubusercontent.com/Yhooi2/shadcn-glass-ui-library/main/src/lib/variants/button-glass-variants.ts
228
+ ```
229
+
230
+ **2. Install dependencies manually**
231
+
232
+ ```bash
233
+ npm install class-variance-authority clsx tailwind-merge
234
+ npm install @radix-ui/react-slot lucide-react
235
+ ```
236
+
237
+ **3. Create utilities file**
238
+
239
+ ```bash
240
+ curl -o src/lib/utils.ts \
241
+ https://raw.githubusercontent.com/Yhooi2/shadcn-glass-ui-library/main/src/lib/utils.ts
242
+ ```
243
+
244
+ ---
245
+
246
+ ## 🧠 AI Assistant Workflow
247
+
248
+ ### When user says: "Add a button to my app"
249
+
250
+ **Step 1: Ask clarifying questions**
251
+
252
+ ```
253
+ "I can help you add a glassmorphism button. First, let me check your setup:
254
+
255
+ 1. Do you have shadcn/ui already configured? (Check for components.json)
256
+ 2. If not, are you starting a new project or modifying an existing one?
257
+ 3. What's your React version? (Run: npm list react)
258
+ ```
259
+
260
+ **Step 2: Choose installation method**
261
+
262
+ Based on answers above, recommend Option A, B, or C.
263
+
264
+ **Step 3: Provide code**
265
+
266
+ ```tsx
267
+ import { ButtonGlass } from 'shadcn-glass-ui';
268
+
269
+ function MyComponent() {
270
+ return (
271
+ <ButtonGlass variant="primary" size="md" onClick={() => console.log('Clicked!')}>
272
+ Click me
273
+ </ButtonGlass>
274
+ );
275
+ }
276
+ ```
277
+
278
+ **Step 4: Suggest theme setup**
279
+
280
+ ```tsx
281
+ // If theme not configured:
282
+ "I notice you haven't set up the theme provider. Add this to your App.tsx:";
283
+
284
+ import { ThemeProvider } from 'shadcn-glass-ui';
285
+
286
+ function App() {
287
+ return (
288
+ <ThemeProvider defaultTheme="glass">
289
+ <MyComponent />
290
+ </ThemeProvider>
291
+ );
292
+ }
293
+ ```
294
+
295
+ ---
296
+
297
+ ## 📦 Component Selection Guide
298
+
299
+ ### Minimal Starter Kit (5 components)
300
+
301
+ Recommend these for new users:
302
+
303
+ ```bash
304
+ npx shadcn@latest add \
305
+ @shadcn-glass-ui/button-glass \
306
+ @shadcn-glass-ui/input-glass \
307
+ @shadcn-glass-ui/glass-card \
308
+ @shadcn-glass-ui/badge-glass \
309
+ @shadcn-glass-ui/modal-glass
310
+ ```
311
+
312
+ **Why these 5?**
313
+
314
+ - **ButtonGlass** - Most common UI element
315
+ - **InputGlass** - Forms need inputs
316
+ - **GlassCard** - Layout container
317
+ - **BadgeGlass** - Status indicators
318
+ - **ModalGlass** - Dialogs/confirmations
319
+
320
+ ### Use Case Based Recommendations
321
+
322
+ **User says: "I'm building a dashboard"**
323
+
324
+ ```bash
325
+ npx shadcn@latest add \
326
+ @shadcn-glass-ui/glass-card \
327
+ @shadcn-glass-ui/metric-card-glass \
328
+ @shadcn-glass-ui/progress-glass \
329
+ @shadcn-glass-ui/badge-glass \
330
+ @shadcn-glass-ui/tabs-glass
331
+ ```
332
+
333
+ **User says: "I need a login form"**
334
+
335
+ ```bash
336
+ npx shadcn@latest add \
337
+ @shadcn-glass-ui/input-glass \
338
+ @shadcn-glass-ui/button-glass \
339
+ @shadcn-glass-ui/checkbox-glass \
340
+ @shadcn-glass-ui/alert-glass
341
+ ```
342
+
343
+ **User says: "I'm creating a settings page"**
344
+
345
+ ```bash
346
+ npx shadcn@latest add \
347
+ @shadcn-glass-ui/toggle-glass \
348
+ @shadcn-glass-ui/checkbox-glass \
349
+ @shadcn-glass-ui/slider-glass \
350
+ @shadcn-glass-ui/tabs-glass
351
+ ```
352
+
353
+ ---
354
+
355
+ ## 🚨 Migration from v0.x to v1.0
356
+
357
+ ### Breaking Changes Summary
358
+
359
+ **1. ButtonGlass: `variant="danger"` removed**
360
+
361
+ ```tsx
362
+ // ❌ v0.x
363
+ <ButtonGlass variant="danger">Delete</ButtonGlass>
364
+
365
+ // ✅ v1.0
366
+ <ButtonGlass variant="destructive">Delete</ButtonGlass>
367
+ ```
368
+
369
+ **2. AlertGlass: `type` → `variant`**
370
+
371
+ ```tsx
372
+ // ❌ v0.x
373
+ <AlertGlass type="error" title="Error">Message</AlertGlass>
374
+
375
+ // ✅ v1.0
376
+ <AlertGlass variant="destructive" title="Error">Message</AlertGlass>
377
+ ```
378
+
379
+ **3. SelectGlass removed → Use ComboBoxGlass**
380
+
381
+ ```tsx
382
+ // ❌ v0.x
383
+ <SelectGlass options={options} value={value} onChange={setValue} />
384
+
385
+ // ✅ v1.0
386
+ <ComboBoxGlass options={options} value={value} onChange={setValue} />
387
+ ```
388
+
389
+ **4. ModalGlass: Legacy API removed**
390
+
391
+ ```tsx
392
+ // ❌ v0.x
393
+ <ModalGlass isOpen={true} onClose={() => {}} title="Test">
394
+ Content
395
+ </ModalGlass>
396
+
397
+ // ✅ v1.0 (Compound API)
398
+ <ModalGlass.Root open={true} onOpenChange={() => {}}>
399
+ <ModalGlass.Overlay />
400
+ <ModalGlass.Content>
401
+ <ModalGlass.Header>
402
+ <ModalGlass.Title>Test</ModalGlass.Title>
403
+ <ModalGlass.Close />
404
+ </ModalGlass.Header>
405
+ <ModalGlass.Body>Content</ModalGlass.Body>
406
+ </ModalGlass.Content>
407
+ </ModalGlass.Root>
408
+ ```
409
+
410
+ ### Migration Workflow for AI
411
+
412
+ **When user shows code with legacy API:**
413
+
414
+ 1. **Identify the version**
415
+ - Check `package.json` for version number
416
+ - Look for `variant="danger"` or `type="error"` → v0.x
417
+
418
+ 2. **Suggest upgrade**
419
+
420
+ ```bash
421
+ npm install shadcn-glass-ui@latest
422
+ ```
423
+
424
+ 3. **Provide migration code**
425
+ - Show side-by-side before/after
426
+ - Explain why it changed (shadcn/ui compatibility)
427
+
428
+ 4. **Update all usages**
429
+ - Search project for old patterns
430
+ - Replace systematically
431
+
432
+ ---
433
+
434
+ ## 🚨 v2.0.0 Breaking Changes (CSS Variables)
435
+
436
+ ### Overview
437
+
438
+ **v2.0.0 removes deprecated metric color CSS variables** in favor of semantic naming aligned with
439
+ shadcn/ui conventions.
440
+
441
+ **Impact:** Custom themes, inline styles, or Tailwind arbitrary values using old metric variables
442
+ will break.
443
+
444
+ **Migration time:** ~5-10 minutes (automated script provided)
445
+
446
+ ### Removed CSS Variables
447
+
448
+ | Removed (v1.x) | Replacement (v2.0+) | Semantic Meaning | Use Case |
449
+ | ------------------------- | ----------------------------- | ------------------ | ---------------- |
450
+ | `--metric-emerald-bg` | `--metric-success-bg` | Success background | Positive metrics |
451
+ | `--metric-emerald-text` | `--metric-success-text` | Success text | Positive values |
452
+ | `--metric-emerald-border` | `--metric-success-border` | Success border | Success cards |
453
+ | `--metric-emerald-glow` | `--metric-success-glow` | Success glow | Hover effects |
454
+ | `--metric-amber-bg` | `--metric-warning-bg` | Warning background | Warning metrics |
455
+ | `--metric-amber-text` | `--metric-warning-text` | Warning text | Alert values |
456
+ | `--metric-amber-border` | `--metric-warning-border` | Warning border | Warning cards |
457
+ | `--metric-amber-glow` | `--metric-warning-glow` | Warning glow | Hover effects |
458
+ | `--metric-blue-bg` | `--metric-default-bg` | Default background | Neutral metrics |
459
+ | `--metric-blue-text` | `--metric-default-text` | Default text | Normal values |
460
+ | `--metric-blue-border` | `--metric-default-border` | Default border | Neutral cards |
461
+ | `--metric-blue-glow` | `--metric-default-glow` | Default glow | Hover effects |
462
+ | `--metric-red-bg` | `--metric-destructive-bg` | Error background | Error metrics |
463
+ | `--metric-red-text` | `--metric-destructive-text` | Error text | Error values |
464
+ | `--metric-red-border` | `--metric-destructive-border` | Error border | Error cards |
465
+ | `--metric-red-glow` | `--metric-destructive-glow` | Error glow | Hover effects |
466
+
467
+ **Total affected:** 16 variables (4 color families × 4 properties)
468
+
469
+ ### Why This Change?
470
+
471
+ 1. **Semantic Clarity** - Color names (emerald, amber) → semantic roles (success, warning)
472
+ 2. **shadcn/ui Alignment** - Matches AlertGlass, BadgeGlass, ButtonGlass variant naming
473
+ 3. **Consistency** - All components now use same semantic vocabulary
474
+ 4. **3-Layer Token System** - Part of v2.0.0 token architecture migration
475
+
476
+ ### Automated Migration
477
+
478
+ **Step 1: Find affected files**
479
+
480
+ ```bash
481
+ grep -rn "metric-emerald\|metric-amber\|metric-blue\|metric-red" src/
482
+ ```
483
+
484
+ **Step 2: Automated replacement**
485
+
486
+ ```bash
487
+ # macOS/BSD sed
488
+ find src/ -type f \( -name "*.tsx" -o -name "*.ts" -o -name "*.css" -o -name "*.scss" \) -exec sed -i '' \
489
+ -e 's/--metric-emerald-/--metric-success-/g' \
490
+ -e 's/--metric-amber-/--metric-warning-/g' \
491
+ -e 's/--metric-blue-/--metric-default-/g' \
492
+ -e 's/--metric-red-/--metric-destructive-/g' \
493
+ {} +
494
+
495
+ # Linux sed
496
+ find src/ -type f \( -name "*.tsx" -o -name "*.ts" -o -name "*.css" -o -name "*.scss" \) -exec sed -i \
497
+ -e 's/--metric-emerald-/--metric-success-/g' \
498
+ -e 's/--metric-amber-/--metric-warning-/g' \
499
+ -e 's/--metric-blue-/--metric-default-/g' \
500
+ -e 's/--metric-red-/--metric-destructive-/g' \
501
+ {} +
502
+ ```
503
+
504
+ **Step 3: Verify changes**
505
+
506
+ ```bash
507
+ npm run typecheck # TypeScript validation
508
+ npm run lint # ESLint checks
509
+ npm test # Run test suite
510
+ npm run build # Production build test
511
+ ```
512
+
513
+ ### Manual Migration Examples
514
+
515
+ **Example 1: Custom CSS**
516
+
517
+ ```css
518
+ /* ❌ v1.x (REMOVED in v2.0.0) */
519
+ .metric-card-success {
520
+ background: var(--metric-emerald-bg);
521
+ color: var(--metric-emerald-text);
522
+ border: 1px solid var(--metric-emerald-border);
523
+ box-shadow: var(--metric-emerald-glow);
524
+ }
525
+
526
+ /* ✅ v2.0+ */
527
+ .metric-card-success {
528
+ background: var(--metric-success-bg);
529
+ color: var(--metric-success-text);
530
+ border: 1px solid var(--metric-success-border);
531
+ box-shadow: var(--metric-success-glow);
532
+ }
533
+ ```
534
+
535
+ **Example 2: Tailwind Arbitrary Values**
536
+
537
+ ```tsx
538
+ // ❌ v1.x
539
+ <div className="bg-[var(--metric-amber-bg)] text-[var(--metric-amber-text)]">
540
+ Warning
541
+ </div>
542
+
543
+ // ✅ v2.0+
544
+ <div className="bg-[var(--metric-warning-bg)] text-[var(--metric-warning-text)]">
545
+ Warning
546
+ </div>
547
+ ```
548
+
549
+ **Example 3: Inline Styles**
550
+
551
+ ```tsx
552
+ // ❌ v1.x
553
+ <div
554
+ style={{
555
+ background: 'var(--metric-blue-bg)',
556
+ color: 'var(--metric-blue-text)',
557
+ }}
558
+ >
559
+ Default
560
+ </div>
561
+
562
+ // ✅ v2.0+
563
+ <div
564
+ style={{
565
+ background: 'var(--metric-default-bg)',
566
+ color: 'var(--metric-default-text)',
567
+ }}
568
+ >
569
+ Default
570
+ </div>
571
+ ```
572
+
573
+ ### Affected Components
574
+
575
+ The following components may use metric color variables in **user custom implementations**:
576
+
577
+ - MetricCardGlass
578
+ - CircularMetricGlass
579
+ - MetricsGridGlass
580
+ - YearCardGlass (with sparkline metrics)
581
+ - Custom dashboard components
582
+ - Custom metric displays
583
+
584
+ **Note:** shadcn-glass-ui v2.0.0 library code is already migrated. This migration is only for **user
585
+ code** that references these variables.
586
+
587
+ ### AI Assistant Guidance
588
+
589
+ **When user reports "CSS variable not defined" errors:**
590
+
591
+ 1. **Check package version:**
592
+
593
+ ```bash
594
+ npm list shadcn-glass-ui
595
+ # If v2.0.0+ → old metric variables removed
596
+ ```
597
+
598
+ 2. **Identify deprecated usage:**
599
+
600
+ ```bash
601
+ grep -rn "metric-emerald\|metric-amber\|metric-blue\|metric-red" src/
602
+ ```
603
+
604
+ 3. **Provide automated fix:**
605
+
606
+ ```
607
+ I see you're using deprecated CSS variables from v1.x.
608
+ In v2.0.0, metric color variables were renamed to semantic names.
609
+
610
+ Run this command to automatically migrate:
611
+ [Provide bash script above]
612
+
613
+ This will update all occurrences in your codebase.
614
+ ```
615
+
616
+ 4. **Explain why:**
617
+ ```
618
+ This change aligns with shadcn/ui naming conventions:
619
+ - emerald → success (positive metrics)
620
+ - amber → warning (alert metrics)
621
+ - blue → default (neutral metrics)
622
+ - red → destructive (error metrics)
623
+ ```
624
+
625
+ ### Common Error Messages
626
+
627
+ **"CSS variable '--metric-emerald-bg' is not defined"**
628
+
629
+ - **Cause:** Using v1.x variable name in v2.0.0+
630
+ - **Fix:** Replace `--metric-emerald-bg` → `--metric-success-bg`
631
+
632
+ **"Unexpected color in metric card"**
633
+
634
+ - **Cause:** CSS fallback to default color due to undefined variable
635
+ - **Fix:** Run automated migration script
636
+
637
+ **"TypeScript error: Property '--metric-blue-text' does not exist"**
638
+
639
+ - **Cause:** TypeScript strict mode detecting undefined CSS variable
640
+ - **Fix:** Update to semantic naming (`--metric-default-text`)
641
+
642
+ ### Token System (v2.0.0+)
643
+
644
+ v2.0.0 introduces a **3-layer token architecture** that eliminates hardcoded colors:
645
+
646
+ ```
647
+ Layer 3: Component Tokens (--btn-primary-bg, --metric-success-bg)
648
+ ↓ references
649
+ Layer 2: Semantic Tokens (--semantic-primary, --semantic-success)
650
+ ↓ references
651
+ Layer 1: Primitive Tokens (--oklch-purple-500, --oklch-emerald-400)
652
+ ```
653
+
654
+ **Benefits:**
655
+
656
+ - **207 primitive tokens** - Single source of truth for all OKLCH colors
657
+ - **Zero hardcoded OKLCH** - 100% CSS variable coverage
658
+ - **15-minute theme creation** - Was 2-3 hours before refactor
659
+ - **Rapid theming** - 90% faster (2-3 hours → 10-15 minutes)
660
+
661
+ **For AI Assistants:**
662
+
663
+ When suggesting custom styling in v2.0.0+:
664
+
665
+ 1. **NEVER suggest hardcoded OKLCH values:**
666
+
667
+ ```css
668
+ /* ❌ BAD */
669
+ background: oklch(66.6% 0.159 303);
670
+ ```
671
+
672
+ 2. **ALWAYS use semantic tokens:**
673
+
674
+ ```css
675
+ /* ✅ GOOD */
676
+ background: var(--semantic-primary);
677
+ ```
678
+
679
+ 3. **Check if needed primitive exists:**
680
+ - Search `src/styles/tokens/oklch-primitives.css` for color
681
+ - If not found, suggest adding to appropriate family
682
+
683
+ 4. **Creating custom themes:**
684
+ - Reference [THEME_CREATION_GUIDE.md](THEME_CREATION_GUIDE.md)
685
+ - Only need ~50 lines of semantic mappings
686
+ - Component tokens inherited automatically
687
+
688
+ **Token Documentation:**
689
+
690
+ - [TOKEN_ARCHITECTURE.md](TOKEN_ARCHITECTURE.md) - Complete 3-layer system guide
691
+ - [THEME_CREATION_GUIDE.md](THEME_CREATION_GUIDE.md) - 15-minute theme creation
692
+ - [CSS_VARIABLES_MIGRATION_2.0.md](migration/CSS_VARIABLES_MIGRATION_2.0.md) - Full migration guide
693
+ - [PRIMITIVE_MAPPING.md](PRIMITIVE_MAPPING.md) - OKLCH primitive reference
694
+
695
+ ### Migration Checklist
696
+
697
+ - [ ] Search codebase for deprecated variables
698
+ (`grep -rn "metric-emerald|metric-amber|metric-blue|metric-red"`)
699
+ - [ ] Run automated replacement script
700
+ - [ ] Verify TypeScript compilation (`npm run typecheck`)
701
+ - [ ] Run linter (`npm run lint`)
702
+ - [ ] Run test suite (`npm test`)
703
+ - [ ] Test production build (`npm run build`)
704
+ - [ ] Visual regression testing (if applicable)
705
+ - [ ] Manual testing of affected components
706
+ - [ ] Update custom theme files (if any)
707
+ - [ ] Commit changes with message: `chore: migrate CSS variables to v2.0.0 semantic naming`
708
+
709
+ ### Timeline
710
+
711
+ | Version | Status | Deprecated Variables |
712
+ | -------------------- | ------------ | ------------------------------------------------ |
713
+ | **v1.0.0 - v1.0.11** | ✅ Supported | Work via CSS aliases (with deprecation warnings) |
714
+ | **v2.0.0** | 🚀 Current | ❌ **REMOVED** (breaking change) |
715
+ | **v2.1.0+** | ⏭️ Future | Only semantic variables supported |
716
+
717
+ ### Need Help?
718
+
719
+ - 📖 [Full Migration Guide](migration/CSS_VARIABLES_MIGRATION_2.0.md)
720
+ - 🎨 [Token Architecture](TOKEN_ARCHITECTURE.md)
721
+ - 🛠️ [Theme Creation Guide](THEME_CREATION_GUIDE.md)
722
+ - 🐛 [Report Issues](https://github.com/Yhooi2/shadcn-glass-ui-library/issues)
723
+
724
+ ---
725
+
726
+ ## 🧪 Testing Components
727
+
728
+ ### Verify Installation
729
+
730
+ **Test 1: Import works**
731
+
732
+ ```tsx
733
+ import { ButtonGlass } from 'shadcn-glass-ui';
734
+ // No TypeScript errors → ✅ Package installed correctly
735
+ ```
736
+
737
+ **Test 2: Styles applied**
738
+
739
+ ```tsx
740
+ <div className="theme-glass p-8">
741
+ <ButtonGlass variant="primary">Test</ButtonGlass>
742
+ </div>
743
+ // Button should have glass effect → ✅ CSS loaded correctly
744
+ ```
745
+
746
+ **Test 3: Theme switching**
747
+
748
+ ```tsx
749
+ import { ThemeProvider, useTheme } from 'shadcn-glass-ui';
750
+
751
+ function Test() {
752
+ const { theme, setTheme } = useTheme();
753
+ return (
754
+ <>
755
+ <button onClick={() => setTheme('glass')}>Glass</button>
756
+ <button onClick={() => setTheme('light')}>Light</button>
757
+ </>
758
+ );
759
+ }
760
+ // Clicking buttons changes theme → ✅ Theme system works
761
+ ```
762
+
763
+ ---
764
+
765
+ ## 🔍 Debugging Common Issues
766
+
767
+ ### Issue 1: "Cannot find module 'shadcn-glass-ui'"
768
+
769
+ **Diagnosis:**
770
+
771
+ ```bash
772
+ npm list shadcn-glass-ui
773
+ # If not found → package not installed
774
+ ```
775
+
776
+ **Fix:**
777
+
778
+ ```bash
779
+ npm install shadcn-glass-ui
780
+ ```
781
+
782
+ ### Issue 2: "Component has no styles"
783
+
784
+ **Diagnosis:**
785
+
786
+ - Check if CSS imported in `src/index.css`
787
+ - Check if Tailwind config includes `node_modules/shadcn-glass-ui/dist/**/*`
788
+
789
+ **Fix:**
790
+
791
+ ```css
792
+ /* src/index.css */
793
+ @import 'shadcn-glass-ui/dist/styles.css';
794
+ ```
795
+
796
+ ```typescript
797
+ // tailwind.config.ts
798
+ content: [
799
+ './src/**/*.{js,ts,jsx,tsx}',
800
+ './node_modules/shadcn-glass-ui/dist/**/*.{js,ts,jsx,tsx}',
801
+ ],
802
+ ```
803
+
804
+ ### Issue 3: "Theme not applying"
805
+
806
+ **Diagnosis:**
807
+
808
+ - Check if `ThemeProvider` wraps components
809
+ - Check if theme class applied to container
810
+
811
+ **Fix:**
812
+
813
+ ```tsx
814
+ import { ThemeProvider } from 'shadcn-glass-ui';
815
+
816
+ function App() {
817
+ return (
818
+ <ThemeProvider defaultTheme="glass">
819
+ <div className="theme-glass min-h-screen">
820
+ <YourApp />
821
+ </div>
822
+ </ThemeProvider>
823
+ );
824
+ }
825
+ ```
826
+
827
+ ---
828
+
829
+ ## 🖥️ CLI Commands
830
+
831
+ Explore components directly from the command line:
832
+
833
+ ```bash
834
+ # Get component info (fuzzy search supported)
835
+ npx shadcn-glass-ui info ButtonGlass
836
+ npx shadcn-glass-ui info button # Works with partial names
837
+ npx shadcn-glass-ui info modal # Finds ModalGlass
838
+
839
+ # List all components
840
+ npx shadcn-glass-ui list
841
+
842
+ # List by category
843
+ npx shadcn-glass-ui list --category=core
844
+ npx shadcn-glass-ui list --category=composite
845
+ npx shadcn-glass-ui list --level=1
846
+
847
+ # Show help
848
+ npx shadcn-glass-ui --help
849
+ ```
850
+
851
+ **Output for `npx shadcn-glass-ui info ButtonGlass`:**
852
+
853
+ ```
854
+ ButtonGlass
855
+ ──────────────────────────────────────────────────
856
+
857
+ Description:
858
+ Primary action button with glassmorphism effects
859
+
860
+ Category: core
861
+ Level: L1
862
+ Type: component
863
+ Props: ButtonGlassProps
864
+
865
+ Variants:
866
+ • default
867
+ • secondary
868
+ • destructive
869
+ • ghost
870
+
871
+ Sizes:
872
+ • sm
873
+ • md
874
+ • lg
875
+
876
+ ✓ shadcn/ui compatible
877
+ ✓ Supports asChild pattern
878
+
879
+ Usage Example:
880
+ ─────────────────────
881
+
882
+ import { ButtonGlass } from 'shadcn-glass-ui';
883
+
884
+ <ButtonGlass variant="default" size="sm">
885
+ {/* Content here */}
886
+ </ButtonGlass>
887
+ ```
888
+
889
+ ---
890
+
891
+ ## 🌐 Context7 MCP Integration
892
+
893
+ This library is indexed on [Context7](https://context7.com/yhooi2/shadcn-glass-ui-library) for AI
894
+ assistant discoverability. AI assistants can automatically fetch documentation, code examples, and
895
+ component specifications through the Context7 MCP server.
896
+
897
+ ### What is Context7?
898
+
899
+ Context7 is a library indexing service that makes open-source libraries discoverable and accessible
900
+ to AI coding assistants through the Model Context Protocol (MCP). When an AI assistant has Context7
901
+ MCP configured, it can:
902
+
903
+ - 🔍 **Search** for libraries by name or functionality
904
+ - 📖 **Fetch** up-to-date documentation automatically
905
+ - 💡 **Access** code examples and best practices
906
+ - 🎯 **Apply** library-specific rules and conventions
907
+ - 🔄 **Track** version history and breaking changes
908
+
909
+ ### Using Context7 MCP
910
+
911
+ #### Step 1: Resolve Library ID
912
+
913
+ First, resolve the library name to get the Context7-compatible ID:
914
+
915
+ ```
916
+ mcp__context7__resolve-library-id shadcn-glass-ui
917
+ ```
918
+
919
+ **Returns:** `/yhooi2/shadcn-glass-ui-library`
920
+
921
+ #### Step 2: Fetch Documentation
922
+
923
+ Once you have the library ID, fetch documentation for specific topics:
924
+
925
+ ```
926
+ // Get component API documentation
927
+ mcp__context7__get-library-docs /yhooi2/shadcn-glass-ui-library --topic="ButtonGlass"
928
+
929
+ // Get theming documentation
930
+ mcp__context7__get-library-docs /yhooi2/shadcn-glass-ui-library --topic="themes"
931
+
932
+ // Get installation guide
933
+ mcp__context7__get-library-docs /yhooi2/shadcn-glass-ui-library --topic="installation"
934
+
935
+ // Get token system documentation (v2.0.0+)
936
+ mcp__context7__get-library-docs /yhooi2/shadcn-glass-ui-library --topic="token architecture"
937
+ ```
938
+
939
+ #### Step 3: Access Specific Versions
940
+
941
+ You can also fetch documentation for specific versions:
942
+
943
+ ```
944
+ // Get v2.0.0 documentation
945
+ mcp__context7__get-library-docs /yhooi2/shadcn-glass-ui-library/v2.0.0
946
+
947
+ // Get v1.0.0 documentation (legacy)
948
+ mcp__context7__get-library-docs /yhooi2/shadcn-glass-ui-library/v1.0.0
949
+ ```
950
+
951
+ ### Context7 Benefits for AI Development
952
+
953
+ 1. **Always Up-to-Date** - Documentation syncs with latest releases via context7.json
954
+ 2. **Version-Aware** - Access docs for any tagged version (v1.0.0, v2.0.0, etc.)
955
+ 3. **Rule-Based Guidance** - 20+ library-specific rules prevent common mistakes
956
+ 4. **Zero Configuration** - No manual doc downloads or context copying
957
+ 5. **Fast Iteration** - AI assistants fetch examples instantly during development
958
+
959
+ ### Context7 Rules (20 total)
960
+
961
+ Key rules indexed for AI assistants:
962
+
963
+ **v2.0.0+ Breaking Changes:**
964
+
965
+ 1. Use `--metric-success-*` instead of `--metric-emerald-*` (REMOVED)
966
+ 2. Use `--metric-warning-*` instead of `--metric-amber-*` (REMOVED)
967
+ 3. Use `--metric-default-*` instead of `--metric-blue-*` (REMOVED)
968
+ 4. Use `--metric-destructive-*` instead of `--metric-red-*` (REMOVED)
969
+ 5. NEVER hardcode OKLCH values - use CSS variables from oklch-primitives.css
970
+ 6. Use 3-layer token system: Primitive → Semantic → Component tokens
971
+
972
+ **Component API:** 7. Use `variant` prop instead of `type` for AlertGlass/NotificationGlass 8. Use
973
+ `variant="destructive"` instead of `variant="danger"` for ButtonGlass 9. Always wrap components with
974
+ ThemeProvider 10. ModalGlass and TabsGlass use compound component API 11. StepperGlass uses compound
975
+ API: Root, Step, Title, Description, Indicator 12. Three themes: `glass`, `light`, `aurora` 13. Use
976
+ `asChild` prop for polymorphic rendering 14. Memoize ComboBoxGlass options with `useMemo` 15. Use
977
+ TooltipGlass with `aria-label` on icon buttons
978
+
979
+ **Theming:** 16. Create new themes in 15 minutes using THEME_CREATION_GUIDE.md 17. All 207 primitive
980
+ tokens defined in src/styles/tokens/oklch-primitives.css 18. Reference TOKEN_ARCHITECTURE.md for
981
+ token system documentation 19. Use exported hooks: useFocus, useHover, useResponsive,
982
+ useWallpaperTint 20. StepperGlass supports linear mode (wizard pattern) - set linear prop
983
+
984
+ Full rules available in [context7.json](../context7.json).
985
+
986
+ ### Example: AI-Assisted Development with Context7
987
+
988
+ **User Request:** "Add a stepper component to my checkout flow"
989
+
990
+ **AI Assistant with Context7:**
991
+
992
+ 1. Fetches StepperGlass documentation via MCP
993
+ 2. Reads rules: "StepperGlass uses compound API", "supports linear mode"
994
+ 3. Generates code following library conventions:
995
+
996
+ ```tsx
997
+ import { StepperGlass } from 'shadcn-glass-ui';
998
+
999
+ function CheckoutFlow() {
1000
+ const [currentStep, setCurrentStep] = useState(0);
1001
+
1002
+ return (
1003
+ <StepperGlass.Root value={currentStep} onValueChange={setCurrentStep} linear>
1004
+ <StepperGlass.Step value={0}>
1005
+ <StepperGlass.Indicator />
1006
+ <StepperGlass.Title>Cart Review</StepperGlass.Title>
1007
+ <StepperGlass.Description>Review your items</StepperGlass.Description>
1008
+ </StepperGlass.Step>
1009
+ {/* ... */}
1010
+ </StepperGlass.Root>
1011
+ );
1012
+ }
1013
+ ```
1014
+
1015
+ **Without Context7:** AI might use incorrect API, miss linear mode, or suggest non-existent props.
1016
+
1017
+ ### Configuring Context7 MCP
1018
+
1019
+ To enable Context7 in your AI assistant (Claude Code, Cursor, etc.):
1020
+
1021
+ 1. Install Context7 MCP server
1022
+ 2. Add to MCP settings:
1023
+ ```json
1024
+ {
1025
+ "mcpServers": {
1026
+ "context7": {
1027
+ "command": "npx",
1028
+ "args": ["-y", "@context7/mcp-server"]
1029
+ }
1030
+ }
1031
+ }
1032
+ ```
1033
+ 3. Restart your AI assistant
1034
+
1035
+ See
1036
+ [Context7 MCP Documentation](https://github.com/modelcontextprotocol/servers/tree/main/src/context7)
1037
+ for details.
1038
+
1039
+ ---
1040
+
1041
+ ## 📚 Resources for AI Assistants
1042
+
1043
+ ### Quick Reference
1044
+
1045
+ - **Package name:** `shadcn-glass-ui`
1046
+ - **Registry URL:** `https://raw.githubusercontent.com/Yhooi2/shadcn-glass-ui-library/main/public/r`
1047
+ - **Registry namespace:** `@shadcn-glass-ui`
1048
+ - **Context7 Library ID:** `/yhooi2/shadcn-glass-ui-library`
1049
+ - **Component count:** 58 (includes StepperGlass in v2.0.0+)
1050
+ - **React version:** 18.0+ or 19.0+
1051
+ - **Tailwind version:** 4.0+
1052
+ - **Node version:** 20.16+, 22.19+, or 24+
1053
+
1054
+ ### Import Patterns
1055
+
1056
+ **npm package:**
1057
+
1058
+ ```tsx
1059
+ import { ButtonGlass, InputGlass } from 'shadcn-glass-ui';
1060
+ import { ThemeProvider, useTheme } from 'shadcn-glass-ui';
1061
+ import 'shadcn-glass-ui/dist/styles.css';
1062
+ ```
1063
+
1064
+ **shadcn CLI:**
1065
+
1066
+ ```tsx
1067
+ import { ButtonGlass } from '@/components/glass/ui/button-glass';
1068
+ import { ThemeProvider } from '@/lib/theme-context';
1069
+ ```
1070
+
1071
+ ### Component Variants Reference
1072
+
1073
+ **ButtonGlass:**
1074
+
1075
+ - `primary`, `secondary`, `outline`, `ghost`, `link`, `destructive`
1076
+
1077
+ **BadgeGlass:**
1078
+
1079
+ - `default`, `secondary`, `outline`, `destructive`, `success`, `warning`, `info`
1080
+
1081
+ **AlertGlass:**
1082
+
1083
+ - `default`, `destructive`, `success`, `warning`
1084
+
1085
+ **GlassCard:**
1086
+
1087
+ - `glass`, `light`, `aurora`, `outline`
1088
+ - Intensity: `subtle`, `medium`, `strong`
1089
+
1090
+ ---
1091
+
1092
+ ## 💡 Best Practices for AI Assistants
1093
+
1094
+ ### DO ✅
1095
+
1096
+ 1. **Check project setup first**
1097
+ - Look for `package.json`
1098
+ - Check for `components.json`
1099
+ - Verify React/Tailwind versions
1100
+
1101
+ 2. **Recommend based on context**
1102
+ - Existing shadcn/ui → shadcn CLI
1103
+ - New project → npm package
1104
+ - Custom setup → manual copy
1105
+
1106
+ 3. **Provide complete code**
1107
+ - Include imports
1108
+ - Show theme setup
1109
+ - Add TypeScript types
1110
+
1111
+ 4. **Test before suggesting**
1112
+ - Verify component names
1113
+ - Check variant names
1114
+ - Ensure props exist
1115
+
1116
+ 5. **Explain breaking changes**
1117
+ - Show v0.x vs v1.0
1118
+ - Explain why changed
1119
+ - Provide migration path
1120
+
1121
+ ### DON'T ❌
1122
+
1123
+ 1. **Don't mix installation methods**
1124
+
1125
+ ```tsx
1126
+ // ❌ BAD: Mixing npm and shadcn CLI imports
1127
+ import { ButtonGlass } from 'shadcn-glass-ui';
1128
+ import { InputGlass } from '@/components/glass/ui/input-glass';
1129
+
1130
+ // ✅ GOOD: Consistent imports
1131
+ import { ButtonGlass, InputGlass } from 'shadcn-glass-ui';
1132
+ ```
1133
+
1134
+ 2. **Don't use deprecated APIs**
1135
+
1136
+ ```tsx
1137
+ // ❌ BAD: v0.x API
1138
+ <ButtonGlass variant="danger">Delete</ButtonGlass>
1139
+
1140
+ // ✅ GOOD: v1.0 API
1141
+ <ButtonGlass variant="destructive">Delete</ButtonGlass>
1142
+ ```
1143
+
1144
+ 3. **Don't skip theme setup**
1145
+
1146
+ ```tsx
1147
+ // ❌ BAD: No theme provider
1148
+ function App() {
1149
+ return <ButtonGlass>Click me</ButtonGlass>;
1150
+ }
1151
+
1152
+ // ✅ GOOD: With theme provider
1153
+ function App() {
1154
+ return (
1155
+ <ThemeProvider defaultTheme="glass">
1156
+ <ButtonGlass>Click me</ButtonGlass>
1157
+ </ThemeProvider>
1158
+ );
1159
+ }
1160
+ ```
1161
+
1162
+ 4. **Don't forget CSS import**
1163
+
1164
+ ```css
1165
+ /* ❌ BAD: Missing CSS import */
1166
+ @tailwind base;
1167
+ @tailwind components;
1168
+ @tailwind utilities;
1169
+
1170
+ /* ✅ GOOD: Include glass styles */
1171
+ @tailwind base;
1172
+ @tailwind components;
1173
+ @tailwind utilities;
1174
+ @import 'shadcn-glass-ui/dist/styles.css';
1175
+ ```
1176
+
1177
+ ---
1178
+
1179
+ ## 🎓 Learning Path for Users
1180
+
1181
+ ### Beginner (Week 1)
1182
+
1183
+ **Goal:** Get first component working
1184
+
1185
+ 1. Install package
1186
+ 2. Add ButtonGlass to app
1187
+ 3. Set up theme provider
1188
+ 4. Try 3 themes (glass, light, aurora)
1189
+
1190
+ **Example project:**
1191
+
1192
+ ```bash
1193
+ npx create-vite@latest my-glass-app --template react-ts
1194
+ cd my-glass-app
1195
+ npm install shadcn-glass-ui react@19 react-dom@19 tailwindcss@4
1196
+ # Follow Option B steps above
1197
+ ```
1198
+
1199
+ ### Intermediate (Week 2)
1200
+
1201
+ **Goal:** Build a form
1202
+
1203
+ 1. Add InputGlass, CheckboxGlass, ToggleGlass
1204
+ 2. Create form validation
1205
+ 3. Add AlertGlass for errors
1206
+ 4. Use ModalGlass for confirmations
1207
+
1208
+ **Example project:** Login form with validation
1209
+
1210
+ ### Advanced (Week 3+)
1211
+
1212
+ **Goal:** Build dashboard
1213
+
1214
+ 1. Use composite components (MetricCardGlass, etc.)
1215
+ 2. Create custom variants with CVA
1216
+ 3. Build section components (HeaderNavGlass, etc.)
1217
+ 4. Implement theme persistence
1218
+
1219
+ **Example project:** Analytics dashboard with glassmorphism
1220
+
1221
+ ---
1222
+
1223
+ ## 🤖 Prompts for AI Assistants
1224
+
1225
+ ### Prompt 1: "Help me install shadcn-glass-ui"
1226
+
1227
+ **Response template:**
1228
+
1229
+ ```
1230
+ I'll help you install shadcn-glass-ui. First, let me check your project setup:
1231
+
1232
+ 1. [Check package.json for React version]
1233
+ 2. [Check for components.json]
1234
+ 3. [Recommend installation method]
1235
+
1236
+ Based on your setup, I recommend [Option A/B/C].
1237
+
1238
+ Here are the steps:
1239
+ [Provide step-by-step instructions]
1240
+
1241
+ After installation, try this test component:
1242
+ [Provide test code]
1243
+ ```
1244
+
1245
+ ### Prompt 2: "Add a glass button"
1246
+
1247
+ **Response template:**
1248
+
1249
+ ````
1250
+ I'll add a glassmorphism button to your project.
1251
+
1252
+ [If not installed: Suggest installation first]
1253
+
1254
+ Here's the code:
1255
+
1256
+ ```tsx
1257
+ import { ButtonGlass } from 'shadcn-glass-ui';
1258
+
1259
+ function MyComponent() {
1260
+ return (
1261
+ <ButtonGlass
1262
+ variant="primary"
1263
+ size="md"
1264
+ onClick={() => alert('Clicked!')}
1265
+ >
1266
+ Click me
1267
+ </ButtonGlass>
1268
+ );
1269
+ }
1270
+ ````
1271
+
1272
+ Available variants:
1273
+
1274
+ - primary (purple gradient)
1275
+ - secondary (muted)
1276
+ - outline (border only)
1277
+ - ghost (transparent)
1278
+ - link (text only)
1279
+ - destructive (red for delete/danger)
1280
+
1281
+ [If theme not set up: Suggest ThemeProvider]
1282
+
1283
+ ```
1284
+
1285
+ ### Prompt 3: "Migrate from v0.x to v1.0"
1286
+
1287
+ **Response template:**
1288
+ ```
1289
+
1290
+ I'll help you migrate to v1.0. Here are the breaking changes in your code:
1291
+
1292
+ 1. [Identify deprecated APIs in user's code]
1293
+ 2. [Provide replacement code]
1294
+ 3. [Explain why changed]
1295
+
1296
+ Updated code: [Show before/after comparison]
1297
+
1298
+ After migration, test these components: [List affected components]
1299
+
1300
+ ```
1301
+
1302
+ ---
1303
+
1304
+ ## 📞 Support Escalation
1305
+
1306
+ ### When to recommend reading docs
1307
+
1308
+ - User wants to customize themes → [UI_DESIGN.md](design-system/UI_DESIGN.md)
1309
+ - User wants to understand architecture → [CLAUDE.md](../CLAUDE.md)
1310
+ - User wants to contribute → [CONTRIBUTING.md](../CONTRIBUTING.md)
1311
+
1312
+ ### When to recommend Storybook
1313
+
1314
+ - User wants to see all components → https://yhooi2.github.io/shadcn-glass-ui-library/
1315
+ - User wants to test interactivity → Storybook interactive mode
1316
+ - User wants to explore variants → Storybook controls
1317
+
1318
+ ### When to recommend GitHub Issues
1319
+
1320
+ - Bug in component
1321
+ - Missing feature
1322
+ - TypeScript type errors
1323
+ - Build failures
1324
+
1325
+ ---
1326
+
1327
+ **Made for AI assistants by shadcn-glass-ui team** 🤖✨
1328
+ ```