basalt-ui 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ # [0.2.0](https://github.com/jkrumm/basalt-ui/compare/v0.1.0...v0.2.0) (2026-02-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * enhance package exports and peer dependencies ([d34a2cf](https://github.com/jkrumm/basalt-ui/commit/d34a2cf38f30d25ab759d6e7922a737f163104f8))
9
+ * integrate fonts and improve CSS architecture ([b95fc24](https://github.com/jkrumm/basalt-ui/commit/b95fc24d8c6bcc1357e77ba9cfbadae0348f33ab))
10
+ * **JK-34:** add `shadcn` and `tw-animate-css` to basalt-ui dependencies ([20c5a10](https://github.com/jkrumm/basalt-ui/commit/20c5a10f2c9d0fda9eed1e2be3d0d16fca6253ff))
11
+
3
12
  # 0.1.0 (2025-12-12)
4
13
 
5
14
 
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  > Design system for the modern stack. One Tailwind theme that makes your components, docs, and charts look like they belong together.
7
7
 
8
- **[Documentation](https://basalt-ui.com)** · **[GitHub](https://github.com/jkrumm/basalt-ui)** · **[npm](https://www.npmjs.com/package/basalt-ui)**
8
+ **[Documentation](https://basalt-ui.com?utm_source=basalt_ui_readme)** · **[GitHub](https://github.com/jkrumm/basalt-ui)** · **[npm](https://www.npmjs.com/package/basalt-ui)**
9
9
 
10
10
  Building modern apps often means combining ShadCN components, Starlight docs, Tremor dashboards, and more — each with its own styling.
11
11
 
@@ -23,10 +23,13 @@ No rewrites. No heavy abstractions. Just consistent design, everywhere.
23
23
 
24
24
  ### What Basalt UI gives you
25
25
 
26
- - One Tailwind theme shared across apps, docs, and dashboards
27
- - Out-of-the-box support for ShadCN, Starlight, and Tremor
28
- - Matching light and dark modes by default
29
- - A consistent look without custom glue code
26
+ - **One Tailwind theme** shared across apps, docs, and dashboards
27
+ - **Zero configuration** - just import one CSS file
28
+ - **Self-hosted fonts** bundled automatically (Instrument Sans Variable, JetBrains Mono Variable)
29
+ - **Out-of-the-box support** for ShadCN, Starlight, and Tremor
30
+ - **Matching light and dark modes** by default
31
+ - **Framework-agnostic** - works with Next.js, Vite, Astro, and more
32
+ - **No config file needed** - uses Tailwind v4's CSS-first approach
30
33
 
31
34
  More integrations will be added over time.
32
35
 
@@ -36,22 +39,32 @@ More integrations will be added over time.
36
39
 
37
40
  ### Installation
38
41
 
42
+ **Step 1: Install basalt-ui and peer dependencies**
43
+
39
44
  ```bash
45
+ # Using Bun
40
46
  bun add basalt-ui
41
- # or
47
+ bun add -D @tailwindcss/typography shadcn tw-animate-css
48
+
49
+ # Using npm
42
50
  npm install basalt-ui
43
- ```
51
+ npm install -D @tailwindcss/typography shadcn tw-animate-css
44
52
 
45
- ### Setup
53
+ # Using pnpm
54
+ pnpm add basalt-ui
55
+ pnpm add -D @tailwindcss/typography shadcn tw-animate-css
56
+ ```
46
57
 
47
- Import the CSS in your main file:
58
+ **Step 2: Import the CSS**
48
59
 
49
60
  ```css
50
- /* src/index.css or app/globals.css */
51
- @import "basalt-ui";
61
+ /* src/styles/globals.css or app/globals.css */
62
+ @import "basalt-ui/css";
52
63
  ```
53
64
 
54
- Add dark mode support to your HTML:
65
+ **⚠️ Important:** Use `basalt-ui/css`, not `basalt-ui` or `basalt-ui/src/index.css`
66
+
67
+ **Step 3: Add dark mode support**
55
68
 
56
69
  ```html
57
70
  <html class="dark">
@@ -59,7 +72,11 @@ Add dark mode support to your HTML:
59
72
  </html>
60
73
  ```
61
74
 
62
- ### Use It
75
+ **📖 Complete Guide:** For framework-specific setup (Vite, Next.js, Astro), troubleshooting, font loading details, and advanced integration patterns, see the **[Installation Documentation](https://basalt-ui.com/docs/installation?utm_source=basalt_ui_readme)**.
76
+
77
+ ---
78
+
79
+ ## Usage Examples
63
80
 
64
81
  **Content areas** - Use `.prose` for automatic semantic styling:
65
82
 
@@ -82,556 +99,107 @@ Add dark mode support to your HTML:
82
99
 
83
100
  ---
84
101
 
85
- ## The Basalt UI Difference
86
-
87
- ### Before (Standard Tailwind + Global Styles)
88
-
89
- ```html
90
- <!-- Global styles conflict with components -->
91
- <article>
92
- <h2>Section Title</h2> <!-- Always styled globally -->
93
- <Table> <!-- Inherits global table styles -->
94
- <TableHeader>...</TableHeader> <!-- Styling conflicts! -->
95
- </Table>
96
- </article>
97
- ```
98
-
99
- **Problems:**
100
- - Global semantic HTML styles conflict with component libraries
101
- - Arbitrary values everywhere (`text-[17px]`, `p-[13px]`)
102
- - Tremor/ShadCN components inherit unwanted styles
103
- - Inconsistent spacing and sizing
104
-
105
- ### After (Basalt UI)
106
-
107
- ```html
108
- <!-- Content areas: Use .prose -->
109
- <article class="prose">
110
- <h2>Section Title</h2> <!-- Styled within .prose -->
111
- <p>Perfect typography...</p>
112
- </article>
113
-
114
- <!-- Components: Clean, no conflicts -->
115
- <Table> <!-- No inherited styles -->
116
- <TableHeader>...</TableHeader> <!-- Works perfectly -->
117
- </Table>
118
-
119
- <!-- Custom UI: Defined tokens -->
120
- <div class="p-4 rounded-md">
121
- <p class="text-h3">Use semantic sizes</p>
122
- </div>
123
- ```
124
-
125
- **Benefits:**
126
- - `.prose` for content, clean components for UI
127
- - No conflicts with ShadCN/Tremor
128
- - Consistent, predictable tokens only
129
- - Design system enforces consistency
130
-
131
- ---
132
-
133
- ## Color System
134
-
135
- ### Foundation Palette Architecture
102
+ ## How It Works
136
103
 
137
- Basalt UI uses a **three-layer color system** inspired by Nord's architecture:
104
+ ### Package Exports
138
105
 
139
- **1. Foundation Palette** → Core OKLCH values defined once
140
- **2. Semantic Tokens** → Meaningful names that reference foundation
141
- **3. UI Utilities** → Tailwind classes that use semantic tokens
106
+ Basalt UI exports CSS files only (no config needed):
142
107
 
143
- This DRY approach means changing `--light-2` once updates the background across your entire light mode.
144
-
145
- #### Light Tones
146
- Light mode backgrounds, dark mode text, elevated surfaces:
147
-
148
- ```css
149
- light-1 /* oklch(0.99 0.002 90) - Brightest (cards, popovers) */
150
- light-2 /* oklch(0.985 0.002 90) - Main background (light mode) */
151
- light-3 /* oklch(0.96 0.004 270) - Muted backgrounds */
152
- light-4 /* oklch(0.93 0.005 270) - Borders, inputs */
153
- ```
154
-
155
- #### Dark Tones
156
- Dark mode backgrounds, light mode text:
157
-
158
- ```css
159
- dark-1 /* oklch(0.195 0.012 285) - Near-black (reserved) */
160
- dark-2 /* oklch(0.24 0.012 285) - Main background (dark mode) */
161
- dark-3 /* oklch(0.26 0.012 285) - Cards (dark mode) */
162
- dark-4 /* oklch(0.31 0.012 285) - Borders, muted (dark mode) */
163
- ```
164
-
165
- #### Text Tones
166
- Subdued text for secondary information:
167
-
168
- ```css
169
- text-subdued-light /* oklch(0.5 0.014 285) - Muted text (light mode) */
170
- text-subdued-dark /* oklch(0.8 0.012 285) - Muted text (dark mode) */
171
- ```
172
-
173
- #### Extreme Tones
174
- High contrast text:
175
-
176
- ```css
177
- white /* oklch(0.99 0.002 90) - Text on dark backgrounds */
178
- ```
179
-
180
- ### Semantic Tokens (Reference Foundation)
181
-
182
- Semantic tokens provide meaningful names and reference the foundation palette:
183
-
184
- ```css
185
- /* Light Mode */
186
- background /* var(--light-2) - Main background */
187
- foreground /* var(--dark-4) - Primary text */
188
- card /* var(--light-1) - Elevated surfaces */
189
- muted /* var(--light-3) - Subtle backgrounds */
190
- border /* var(--light-4) - Borders, dividers */
191
- muted-foreground /* var(--text-subdued-light) - Secondary text */
192
-
193
- /* Dark Mode */
194
- background /* var(--dark-2) - Main background */
195
- foreground /* var(--light-3) - Soft white */
196
- card /* var(--dark-3) - Elevated surfaces */
197
- muted /* var(--dark-4) - Subtle backgrounds */
198
- border /* var(--dark-4) - Borders, dividers */
199
- muted-foreground /* var(--text-subdued-dark) - Secondary text */
200
- ```
201
-
202
- **Why this matters:** Change `--light-2` once → updates background across light mode everywhere.
203
-
204
- #### Blue Primary
205
-
206
- Professional, trustworthy accent for interactive elements:
207
-
208
- ```css
209
- blue /* oklch(0.6965 0.0591 248.69) - Primary blue */
210
- blue-foreground /* oklch(0.99 0.002 90) - White text on blue */
211
-
212
- blue-light /* oklch(0.78 0.045 249) - Hover states */
213
- blue-light-foreground /* oklch(0.265 0.015 285) - Dark text on blue-light */
214
-
215
- blue-deep /* oklch(0.5944 0.0772 254.03) - Strong emphasis */
216
- blue-deep-foreground /* oklch(0.99 0.002 90) - White text on blue-deep */
108
+ ```json
109
+ {
110
+ "exports": {
111
+ "./css": "./src/index.css", // Main design system
112
+ "./starlight": "./src/starlight.css" // Starlight docs integration
113
+ }
114
+ }
217
115
  ```
218
116
 
219
- #### Expressive Colors
117
+ **What you get:**
118
+ - Complete Tailwind v4 theme via `@theme inline` CSS
119
+ - Self-hosted variable fonts (bundled automatically)
120
+ - CSS variables for light/dark modes
121
+ - Typography plugin configuration
122
+ - Animation utilities
220
123
 
221
- Expressive, semantic colors for errors, warnings, success, and special states:
124
+ **What you DON'T need:**
125
+ - ❌ No `tailwind.config.js` file
126
+ - ❌ No manual font setup
127
+ - ❌ No theme configuration
128
+ - ❌ No PostCSS config
222
129
 
223
- ```css
224
- red /* oklch(0.6061 0.1206 15.34) - Errors, destructive actions */
225
- red-foreground /* oklch(0.99 0.002 90) - White text on red */
226
-
227
- orange /* oklch(0.6929 0.0963 38.24) - Warnings, annotations */
228
- orange-foreground /* oklch(0.265 0.015 285) - Dark text on orange */
130
+ ### Dependencies
229
131
 
230
- yellow /* oklch(0.8549 0.0892 84.09) - Caution, highlights */
231
- yellow-foreground /* oklch(0.265 0.015 285) - Dark text on yellow */
132
+ **Peer Dependencies** (you install):
133
+ - `tailwindcss` v4+ - Core CSS framework
134
+ - `@tailwindcss/typography` - Powers `.prose` class
135
+ - `shadcn` - Component CLI tool
136
+ - `tw-animate-css` - Animation utilities
232
137
 
233
- green /* oklch(0.7683 0.0749 131.06) - Success, confirmations */
234
- green-foreground /* oklch(0.265 0.015 285) - Dark text on green */
235
-
236
- purple /* oklch(0.6921 0.0625 332.66) - Special features */
237
- purple-foreground /* oklch(0.99 0.002 90) - White text on purple */
238
- ```
138
+ **Direct Dependencies** (bundled):
139
+ - `@fontsource-variable/instrument-sans` - Heading and body font
140
+ - `@fontsource-variable/jetbrains-mono` - Monospace font
239
141
 
240
- #### Sequential Chart Palette
142
+ **Why peer dependencies?**
143
+ - Prevents version conflicts across your project
144
+ - You control which versions to use
145
+ - Reduces duplicate packages in node_modules
146
+ - Standard practice for plugin ecosystems
241
147
 
242
- 8 blue tones for data visualization with perceptual uniformity:
243
-
244
- ```css
245
- chart-blue-1 /* oklch(0.90 0.030 249) - Lightest */
246
- chart-blue-2 /* oklch(0.80 0.040 249) */
247
- chart-blue-3 /* oklch(0.72 0.050 249) */
248
- chart-blue-4 /* oklch(0.65 0.059 249) */
249
- chart-blue-5 /* oklch(0.58 0.065 249) */
250
- chart-blue-6 /* oklch(0.50 0.070 249) */
251
- chart-blue-7 /* oklch(0.42 0.075 249) */
252
- chart-blue-8 /* oklch(0.34 0.077 249) - Darkest */
253
- ```
148
+ ---
254
149
 
255
- Progressive lightness with gradually increasing chroma for perceptual uniformity. All adjacent colors exceed WCAG 3:1 contrast requirements.
150
+ ## Framework & Library Compatibility
256
151
 
257
- ### Why OKLCH?
152
+ Basalt UI works seamlessly with:
258
153
 
259
- **HSL Problems:**
260
- ```css
261
- /* HSL: uneven perceived brightness */
262
- background: hsl(0, 0%, 50%);
263
- primary: hsl(120, 50%, 50%);
264
- /* These look completely different brightness! */
265
- ```
154
+ - ✅ **Next.js** - App Router with Tailwind v4
155
+ - ✅ **Vite** - React, Vue, Svelte, Solid
156
+ - ✅ **Astro** - Static sites and SSR
157
+ - ✅ **ShadCN UI** - All components work out of the box
158
+ - ✅ **Tremor** - Charts and dashboards
159
+ - ✅ **Starlight** - Documentation framework
266
160
 
267
- **OKLCH Solution:**
268
- ```css
269
- /* OKLCH: perceptually uniform */
270
- background: oklch(0.50 0 0);
271
- primary: oklch(0.50 0.10 135);
272
- /* These look similar brightness ✓ */
273
- ```
274
-
275
- Changes in L (lightness) and C (chroma) values match what your eyes perceive. No surprise gray zones in gradients.
161
+ See the **[Installation Guide](https://basalt-ui.com/docs/installation?utm_source=basalt_ui_readme)** for framework-specific setup examples and integration details.
276
162
 
277
163
  ---
278
164
 
279
- ## Typography
280
-
281
- ### Opt-In with `.prose`
165
+ ## The Basalt UI Difference
282
166
 
283
- Basalt UI uses the official `@tailwindcss/typography` plugin configured with Basalt design tokens.
167
+ ### Before (Standard Tailwind)
284
168
 
285
- **Content areas** (blog posts, articles, documentation):
286
169
  ```html
287
- <article class="prose">
288
- <h1>Primary Heading</h1>
289
- <h2>Section Header</h2>
290
- <p>Automatically styled paragraphs with <a href="#">links</a>.</p>
291
- <code>inline code</code>
292
- <pre><code>code blocks</code></pre>
293
- </article>
294
- ```
295
-
296
- **Component libraries** (ShadCN, Tremor, app UI):
297
- ```html
298
- <!-- No .prose class - components style themselves -->
299
- <Table>...</Table>
300
- <Button>Click Me</Button>
301
- <nav><a href="#">Link</a></nav>
170
+ <!-- Arbitrary values everywhere -->
171
+ <div class="text-[17px] p-[13px] bg-[#f3f3f3]">
172
+ <!-- Components conflict with global styles -->
173
+ <h2>Heading</h2> <!-- Styled globally -->
174
+ <Table>...</Table> <!-- Inherits unwanted styles -->
175
+ </div>
302
176
  ```
303
177
 
304
- ### Why Not Global Styling?
305
-
306
- Global semantic HTML defaults conflict with component libraries:
307
- - Tremor Table expects unstyled `<table>` elements
308
- - ShadCN Button shouldn't inherit link `<a>` styles
309
- - Navigation links don't want automatic blue underlines
310
-
311
- ### Automatic Dark Mode
178
+ **Problems:**
179
+ - Arbitrary values lead to inconsistency
180
+ - Global semantic HTML styles conflict with component libraries
181
+ - Tremor/ShadCN components inherit unwanted styles
312
182
 
313
- The `.prose` class uses Basalt CSS variables, so **no `dark:prose-invert` needed**:
183
+ ### After (Basalt UI)
314
184
 
315
185
  ```html
316
- <body class="dark">
186
+ <!-- Defined tokens only -->
187
+ <div class="text-body p-4 bg-card">
188
+ <!-- Content areas: Use .prose -->
317
189
  <article class="prose">
318
- <!-- Text colors switch automatically -->
190
+ <h2>Heading</h2> <!-- Styled within .prose -->
319
191
  </article>
320
- </body>
321
- ```
322
-
323
- ### Font Stack
324
-
325
- - **Headings**: Lato (700) - Modern, geometric, professional
326
- - **Body**: Nunito Sans (400) - Rounded, friendly, readable
327
- - **Mono**: JetBrains Mono (400) - Clear, developer-friendly
328
-
329
- ### Utility Classes
330
-
331
- For custom layouts outside `.prose`:
332
-
333
- ```html
334
- <div class="text-display">Hero Text (64px)</div>
335
- <div class="text-hero">Subhero (48px)</div>
336
- <h2 class="text-h2">Manual heading (32px)</h2>
337
- <span class="text-small">Metadata (14px)</span>
338
- <span class="text-caption">Fine print (12px)</span>
339
- ```
340
-
341
- **No arbitrary values:**
342
- - ✅ `text-h2`, `text-body`, `text-small`
343
- - ❌ `text-lg`, `text-xl`, `text-[17px]`
344
-
345
- ---
346
-
347
- ## Spacing System
348
-
349
- Based on 4px increments, limited to purposeful values:
350
-
351
- ```
352
- p-0 (0px) p-1 (4px) p-2 (8px) p-3 (12px)
353
- p-4 (16px) p-5 (20px) p-6 (24px) p-8 (32px)
354
- p-10 (40px) p-12 (48px) p-16 (64px) p-20 (80px)
355
- p-24 (96px) p-32 (128px)
356
- ```
357
-
358
- **What's missing?** `p-7`, `p-9`, `p-11`, `p-13-15`, `p-17-19`, etc.
359
-
360
- **Why?** Force consistency. If you need a spacing value that's not defined, it's probably inconsistent with the design system.
361
-
362
- ---
363
-
364
- ## Restrictions
365
-
366
- Basalt UI is **opinionated**. It disables arbitrary values and infinite scales.
367
192
 
368
- ### What Works ✅
369
-
370
- ```html
371
- <!-- Content areas with .prose -->
372
- <article class="prose">
373
- <h2>Section Title</h2>
374
- <p>Automatically styled</p>
375
- </article>
376
-
377
- <!-- Defined tokens -->
378
- <div class="p-4 text-body font-bold bg-primary">
379
-
380
- <!-- ShadCN/Tremor components (no conflicts) -->
381
- <Button variant="default">Click Me</Button>
382
- <Table>...</Table>
383
- ```
384
-
385
- ### What Doesn't Work ❌
386
-
387
- ```html
388
- <!-- Arbitrary values (disabled) -->
389
- <div class="p-[13px]"> ❌
390
- <div class="text-[17px]"> ❌
391
- <div class="bg-[#f3f3f3]"> ❌
392
-
393
- <!-- Undefined utilities -->
394
- <div class="p-7"> ❌ (use p-6 or p-8)
395
- <div class="text-lg"> ❌ (use text-h4 or text-small)
396
- <div class="font-semibold"> ❌ (use font-regular or font-bold)
397
- ```
398
-
399
- This is **intentional**. Consistency > flexibility.
400
-
401
- ---
402
-
403
- ## Component Library Compatibility
404
-
405
- ### ShadCN UI
406
-
407
- Basalt UI works seamlessly with ShadCN UI. All required tokens are defined:
408
-
409
- ```bash
410
- # Install ShadCN
411
- npx shadcn@latest init
412
-
413
- # Choose "Zinc" as base color
414
- # ShadCN components will use Basalt UI's volcanic palette
415
- ```
416
-
417
- Components automatically use:
418
- - Basalt color tokens
419
- - Restricted spacing scale
420
- - Semantic typography
421
- - Defined border radius
422
-
423
- ### Tremor Raw
424
-
425
- Basalt UI includes **full compatibility** with [Tremor Raw](https://tremor.so) chart components through automatic gray palette overrides:
426
-
427
- ```tsx
428
- import { AreaChart } from '@tremor/react';
429
-
430
- <AreaChart
431
- data={chartData}
432
- index="date"
433
- categories={['sales']}
434
- colors={['blue']} // Uses Basalt UI's OKLCH blue
435
- />
436
- ```
437
-
438
- **How it works:**
439
- - Basalt overrides Tailwind's default gray scale (`white`, `black`, `gray-50` through `gray-950`)
440
- - Tremor's hardcoded classes (`bg-white`, `text-gray-500`, `dark:bg-gray-950`) automatically use Basalt colors
441
- - No manual theme configuration needed in Tremor components
442
-
443
- **Supported chart colors:**
444
- - Named: `blue`, `red`, `emerald` (green), `amber` (yellow), `violet` (purple), `cyan`, `indigo`
445
- - Sequential: `chart-blue-1` through `chart-blue-8` (lightness progression)
446
- - Color shades: `blue-50` through `blue-950` for all chart colors
447
-
448
- **Tremor semantic tokens:**
449
- All Tremor tokens (`tremor-brand`, `tremor-background`, `tremor-content`, etc.) are mapped to Basalt's OKLCH foundation palette with proper light/dark mode support.
450
-
451
- ---
452
-
453
- ## Dark Mode
454
-
455
- Toggle dark mode by adding/removing the `dark` class:
456
-
457
- ```html
458
- <html class="dark">
459
- <!-- Dark mode active -->
460
- </html>
461
- ```
462
-
463
- All colors automatically adjust to warm, comfortable dark mode values.
464
-
465
- **Light mode:** Warm whites, rich dark grays
466
- **Dark mode:** Deep warm grays, soft whites
467
-
468
- Both modes avoid stark extremes for comfortable, professional interfaces.
469
-
470
- ---
471
-
472
- ## Available Utilities
473
-
474
- ### Colors
475
-
476
- ```css
477
- /* Foundation Palette */
478
- bg-light-1, bg-light-2, bg-light-3, bg-light-4
479
- bg-dark-1, bg-dark-2, bg-dark-3, bg-dark-4
480
- text-white
481
-
482
- /* Semantic Backgrounds */
483
- bg-background, bg-card, bg-muted, bg-primary
484
- bg-blue, bg-blue-light, bg-blue-deep
485
- bg-red, bg-orange, bg-yellow, bg-green, bg-purple
486
-
487
- /* Text (always pair with background) */
488
- text-foreground, text-muted-foreground
489
- text-primary-foreground, text-secondary-foreground
490
- text-blue-foreground, text-blue-light-foreground, text-blue-deep-foreground
491
- text-red-foreground, text-orange-foreground, text-yellow-foreground
492
- text-green-foreground, text-purple-foreground
493
-
494
- /* Borders */
495
- border-border, border-input, border-primary
496
-
497
- /* Focus rings */
498
- ring-ring, ring-primary
499
-
500
- /* Sequential Charts */
501
- bg-chart-blue-1, bg-chart-blue-2, ... bg-chart-blue-8
502
-
503
- /* Tailwind Gray Overrides (for Tremor compatibility) */
504
- bg-white, bg-black
505
- bg-gray-50, bg-gray-100, bg-gray-200, bg-gray-300
506
- bg-gray-400, bg-gray-500, bg-gray-600, bg-gray-700
507
- bg-gray-800, bg-gray-900, bg-gray-950
508
- /* Automatically mapped to Basalt foundation palette */
509
-
510
- /* Chart Color Shades (for Tremor charts) */
511
- bg-blue-50 through bg-blue-950
512
- bg-red-50 through bg-red-950
513
- bg-emerald-50 through bg-emerald-950
514
- bg-amber-50 through bg-amber-950
515
- bg-violet-50 through bg-violet-950
516
- bg-cyan-50 through bg-cyan-950
517
- bg-indigo-50 through bg-indigo-950
518
- ```
519
-
520
- ### Typography
521
-
522
- ```css
523
- /* Sizes (semantic) */
524
- text-display, text-hero, text-h1, text-h2, text-h3, text-h4, text-h5, text-h6
525
- text-body, text-small, text-caption
526
-
527
- /* Families */
528
- font-heading, font-body, font-mono
529
-
530
- /* Weights */
531
- font-regular, font-bold
532
-
533
- /* Letter spacing */
534
- tracking-tight, tracking-normal, tracking-wide
535
- ```
536
-
537
- ### Spacing
538
-
539
- ```css
540
- /* Padding/Margin */
541
- p-0, p-1, p-2, p-3, p-4, p-5, p-6, p-8, p-10, p-12, p-16, p-20, p-24, p-32
542
- m-0, m-1, m-2, m-3, m-4, m-5, m-6, m-8, m-10, m-12, m-16, m-20, m-24, m-32
543
-
544
- /* Gap (flexbox/grid) */
545
- gap-0, gap-1, gap-2, gap-3, gap-4, gap-5, gap-6, gap-8, gap-10, gap-12
546
- ```
547
-
548
- ### Border Radius
549
-
550
- ```css
551
- rounded-none, rounded-sm, rounded-md, rounded, rounded-lg, rounded-xl, rounded-full
552
- ```
553
-
554
- ### Shadows
555
-
556
- ```css
557
- shadow-sm, shadow, shadow-md, shadow-lg, shadow-xl
558
- ```
559
-
560
- ---
561
-
562
- ## Customization
563
-
564
- Want to adjust colors for your brand? Fork and modify `src/index.css`:
565
-
566
- ```css
567
- :root {
568
- /* Adjust OKLCH values */
569
- --primary: oklch(0.58 0.10 135); /* Change hue/chroma/lightness */
570
- --destructive: oklch(0.58 0.18 35);
571
- }
572
-
573
- .dark {
574
- /* Adjust dark mode */
575
- --primary: oklch(0.68 0.11 135); /* Lighter for dark backgrounds */
576
- }
577
- ```
578
-
579
- **Keep the philosophy:**
580
- - Use OKLCH color space
581
- - Maintain perceptual uniformity
582
- - Preserve semantic HTML defaults
583
- - Keep restrictions (no arbitrary values)
584
-
585
- ---
586
-
587
- ## Examples
588
-
589
- ### Card Component
590
-
591
- ```html
592
- <div class="bg-card p-6 rounded-lg shadow">
593
- <h3 class="text-h3 font-bold">Card Title</h3>
594
- <p class="text-muted-foreground">Card description text.</p>
595
- <button class="bg-primary text-primary-foreground px-4 py-2 rounded">
596
- Action
597
- </button>
193
+ <!-- Components: Clean, no conflicts -->
194
+ <Table>...</Table> <!-- Works perfectly -->
598
195
  </div>
599
196
  ```
600
197
 
601
- ### Hero Section
602
-
603
- ```html
604
- <header class="p-16 bg-background">
605
- <h1 class="text-display font-heading font-bold tracking-tight">
606
- Welcome to Your App
607
- </h1>
608
- <p class="text-h3 text-muted-foreground">
609
- Build something amazing with Basalt UI.
610
- </p>
611
- </header>
612
- ```
613
-
614
- ### Alert Component
615
-
616
- ```html
617
- <!-- Error alert with proper text pairing -->
618
- <div class="bg-destructive text-destructive-foreground p-4 rounded">
619
- <h4 class="text-h4 font-bold">Error</h4>
620
- <p class="text-small">Something went wrong. Please try again.</p>
621
- </div>
622
-
623
- <!-- Success alert -->
624
- <div class="bg-green text-green-foreground p-4 rounded">
625
- <h4 class="text-h4 font-bold">Success</h4>
626
- <p class="text-small">Your changes have been saved.</p>
627
- </div>
628
-
629
- <!-- Warning alert -->
630
- <div class="bg-orange text-orange-foreground p-4 rounded">
631
- <h4 class="text-h4 font-bold">Warning</h4>
632
- <p class="text-small">Please review your input before continuing.</p>
633
- </div>
634
- ```
198
+ **Benefits:**
199
+ - Consistent, predictable design tokens
200
+ - `.prose` for content, clean components for UI
201
+ - No conflicts with ShadCN/Tremor
202
+ - Design system enforces consistency
635
203
 
636
204
  ---
637
205
 
@@ -646,33 +214,18 @@ The design system embodies this aesthetic: professional structure with warm, nat
646
214
 
647
215
  ---
648
216
 
649
- ## Use Cases
650
-
651
- Perfect for:
652
- - 📊 **Dashboards** - Clean, data-focused interfaces
653
- - 📝 **Content platforms** - Blogs, documentation, marketing sites
654
- - 🛠️ **SaaS applications** - Professional, warm, accessible
655
- - 🎨 **Design showcases** - Demonstrates thoughtful design system architecture
656
-
657
- Not ideal for:
658
- - 🎮 Gaming interfaces (too restrained)
659
- - 🎨 Highly artistic sites (needs more flexibility)
660
- - 🌈 Colorful, playful brands (neutral-focused palette)
661
-
662
- ---
663
-
664
217
  ## Requirements
665
218
 
666
- - **Tailwind CSS v4+** (uses `@theme inline` syntax)
667
- - Modern browser with OKLCH support (Chrome, Edge, Safari, Firefox 2023+)
668
- - No additional dependencies
669
-
670
- ---
219
+ ### Peer Dependencies (Required)
220
+ - **Tailwind CSS v4+** - Core CSS framework (uses `@theme inline` syntax)
221
+ - **@tailwindcss/typography v0.5+** - Typography plugin for `.prose` class
222
+ - **tw-animate-css v1.4+** - Animation utilities
223
+ - **shadcn v3.8+** - Component utilities
671
224
 
672
- ## Documentation
225
+ All peer dependencies must be installed in your project.
673
226
 
674
- - [Full Design System Documentation](./CLAUDE.md) - Philosophy, architecture, guidelines
675
- - [Web Showcase](../../apps/web) - Interactive examples and component gallery
227
+ ### Browser Support
228
+ - Modern browsers with OKLCH support (Chrome 111+, Edge 111+, Safari 16.4+, Firefox 113+)
676
229
 
677
230
  ---
678
231
 
@@ -692,17 +245,7 @@ Open an issue before major changes to discuss alignment with project philosophy.
692
245
 
693
246
  ## License
694
247
 
695
- MIT License - Use freely, modify as needed, keep attribution.
696
-
697
- ---
698
-
699
- ## Inspiration
700
-
701
- - **Color Science**: OKLCH color space, Björn Ottosson's Oklab
702
- - **Nord Theme**: Inspired by expressive color approach for syntax highlighting
703
- - **Nature**: Volcanic landscapes, basalt formations, natural materials
704
- - **Design Systems**: ShadCN UI, Radix Colors, Tailwind Zinc
705
- - **Philosophy**: Restrictive design, semantic HTML, mature consistency
248
+ Apache 2.0 License - Use freely, modify as needed, keep attribution.
706
249
 
707
250
  ---
708
251
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "basalt-ui",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Unified Tailwind CSS design system for modern UI libraries",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -13,7 +13,7 @@
13
13
  "url": "https://github.com/jkrumm/basalt-ui.git",
14
14
  "directory": "packages/basalt-ui"
15
15
  },
16
- "homepage": "https://basalt-ui.com",
16
+ "homepage": "https://basalt-ui.com?utm_source=npm_package",
17
17
  "bugs": {
18
18
  "url": "https://github.com/jkrumm/basalt-ui/issues"
19
19
  },
@@ -30,9 +30,11 @@
30
30
  ],
31
31
  "exports": {
32
32
  "./css": {
33
+ "style": "./src/index.css",
33
34
  "import": "./src/index.css"
34
35
  },
35
36
  "./starlight": {
37
+ "style": "./src/starlight.css",
36
38
  "import": "./src/starlight.css"
37
39
  }
38
40
  },
@@ -43,12 +45,16 @@
43
45
  "CHANGELOG.md"
44
46
  ],
45
47
  "peerDependencies": {
46
- "tailwindcss": "^4.0.0"
48
+ "@tailwindcss/typography": "^0.5.19",
49
+ "shadcn": "^3.8.0",
50
+ "tailwindcss": "^4.0.0",
51
+ "tw-animate-css": "^1.4.0"
47
52
  },
48
53
  "publishConfig": {
49
54
  "access": "public"
50
55
  },
51
- "devDependencies": {
52
- "@tailwindcss/typography": "^0.5.19"
56
+ "dependencies": {
57
+ "@fontsource-variable/instrument-sans": "^5.2.8",
58
+ "@fontsource-variable/jetbrains-mono": "^5.2.8"
53
59
  }
54
60
  }
package/src/index.css CHANGED
@@ -1,4 +1,8 @@
1
1
  @import "tailwindcss";
2
+ @import "tw-animate-css";
3
+ @import "shadcn/tailwind.css";
4
+ @import "@fontsource-variable/instrument-sans/index.css";
5
+ @import "@fontsource-variable/jetbrains-mono/index.css";
2
6
  @plugin "@tailwindcss/typography";
3
7
  @config "../tailwind.config.js";
4
8
 
@@ -195,9 +199,11 @@
195
199
  --sidebar-ring: var(--blue);
196
200
 
197
201
  /* === TYPOGRAPHY: Modern, welcoming fonts === */
198
- --font-heading: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
199
- --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
200
- --font-mono: "JetBrains Mono", "Menlo", "Monaco", "Courier New", monospace;
202
+ --font-heading:
203
+ "Instrument Sans Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
204
+ --font-body:
205
+ "Instrument Sans Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
206
+ --font-mono: "JetBrains Mono Variable", "Menlo", "Monaco", "Courier New", monospace;
201
207
 
202
208
  /* === BORDER RADIUS: Subtly rounded (ShadCN style) === */
203
209
  --radius: 0.5rem; /* 8px - comfortable roundness */
package/src/starlight.css CHANGED
@@ -163,7 +163,7 @@
163
163
  --sl-text-h5: var(--font-size-h5);
164
164
 
165
165
  /* === FONTS === */
166
- --sl-font-system: var(--font-body); /* Nunito Sans */
166
+ --sl-font-system: var(--font-body); /* Instrument Sans Variable */
167
167
  --sl-font-system-mono: var(--font-mono); /* JetBrains Mono */
168
168
  --sl-font: var(--font-body); /* Override for custom font */
169
169
  --sl-font-mono: var(--font-mono); /* Override for custom mono font */
@@ -278,3 +278,31 @@
278
278
  [data-theme="light"] .pagination-links a {
279
279
  background-color: var(--light-1);
280
280
  }
281
+
282
+ /* ============================================================================
283
+ EXPRESSIVE CODE (Syntax Highlighting) OVERRIDES
284
+ ============================================================================
285
+
286
+ Override Expressive Code theme colors to use Basalt UI primary blue.
287
+ Expressive Code is used by Starlight for code syntax highlighting.
288
+
289
+ Variables Reference:
290
+ - --ec-frm-edActTabIndTopCol: Active tab indicator top color
291
+ - --ec-frm-edActTabBg: Active tab background
292
+ - --ec-frm-edActTabFg: Active tab foreground (text)
293
+ ============================================================================ */
294
+
295
+ :root {
296
+ /* Active tab indicator - use Basalt primary blue */
297
+ --ec-frm-edActTabIndTopCol: var(--blue);
298
+
299
+ /* Active tab colors */
300
+ --ec-frm-edActTabBg: var(--blue-light);
301
+ --ec-frm-edActTabFg: var(--dark-4);
302
+ }
303
+
304
+ :root[data-theme="light"] {
305
+ /* Light mode: darker active tab for contrast */
306
+ --ec-frm-edActTabBg: var(--blue);
307
+ --ec-frm-edActTabFg: var(--white);
308
+ }