@trinityui/design-system-css 2.3.4 → 2.3.5
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 +58 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
# @trinityui/design-system-css
|
|
2
2
|
|
|
3
|
-
CSS-only package for Trinity Design System.
|
|
3
|
+
CSS-only package for [Trinity Design System](https://www.npmjs.com/package/@trinityui/design-system). Provides all design tokens as CSS custom properties (`--trinity-*`) for Angular, Vue, static HTML, or any non-React application.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@trinityui/design-system-css)
|
|
6
|
+
|
|
7
|
+
## What's Included
|
|
8
|
+
|
|
9
|
+
- **All design tokens as CSS variables** — colors (6 brand palettes), spacing (20-step scale), typography, border radius, shadows, z-index, motion, opacity
|
|
10
|
+
- **Light and dark mode** — toggle via `data-theme="dark"` attribute
|
|
11
|
+
- **Base element styles** — sensible defaults for headings, body text, links, and form elements using Trinity styling
|
|
6
12
|
|
|
7
13
|
## Install
|
|
8
14
|
|
|
9
15
|
```bash
|
|
10
|
-
|
|
16
|
+
pnpm add @trinityui/design-system-css
|
|
11
17
|
```
|
|
12
18
|
|
|
13
19
|
## Usage
|
|
14
20
|
|
|
21
|
+
### CSS import
|
|
22
|
+
|
|
23
|
+
```css
|
|
24
|
+
@import "@trinityui/design-system-css/css";
|
|
25
|
+
```
|
|
26
|
+
|
|
15
27
|
### Angular (`angular.json`)
|
|
16
28
|
|
|
17
29
|
```json
|
|
@@ -23,8 +35,49 @@ npm install @trinityui/design-system-css
|
|
|
23
35
|
}
|
|
24
36
|
```
|
|
25
37
|
|
|
26
|
-
###
|
|
38
|
+
### Vue / Vite
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
// main.ts
|
|
42
|
+
import '@trinityui/design-system-css/dist/trinity.css';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Static HTML
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<link rel="stylesheet" href="node_modules/@trinityui/design-system-css/dist/trinity.css" />
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Dark Mode
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<html data-theme="dark">
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## CSS Variable Examples
|
|
27
58
|
|
|
28
59
|
```css
|
|
29
|
-
|
|
60
|
+
/* Brand colors */
|
|
61
|
+
var(--trinity-color-navy-900) /* #050742 */
|
|
62
|
+
var(--trinity-color-coral-800) /* #C65D4D */
|
|
63
|
+
|
|
64
|
+
/* Semantic colors */
|
|
65
|
+
var(--trinity-card-bg) /* #FFFFFF (light) / #1C1C1F (dark) */
|
|
66
|
+
var(--trinity-text-primary) /* #09090B (light) / #FAFAFA (dark) */
|
|
67
|
+
|
|
68
|
+
/* Spacing */
|
|
69
|
+
var(--trinity-spacing-4) /* 16px */
|
|
70
|
+
|
|
71
|
+
/* Radius */
|
|
72
|
+
var(--trinity-radius-card) /* 12px */
|
|
73
|
+
var(--trinity-radius-button) /* 9999px (pill) */
|
|
74
|
+
|
|
75
|
+
/* Shadows */
|
|
76
|
+
var(--trinity-shadow-card)
|
|
77
|
+
var(--trinity-shadow-modal)
|
|
30
78
|
```
|
|
79
|
+
|
|
80
|
+
## Related
|
|
81
|
+
|
|
82
|
+
- [`@trinityui/design-system`](https://www.npmjs.com/package/@trinityui/design-system) — Full React component library (100+ components)
|
|
83
|
+
- See the [main README](https://github.com/Trinity-UI-Components/trinity-design-system#readme) for the complete component catalog and architecture overview
|