@jungherz-de/glasskit 1.3.5 → 1.4.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 +51 -1
- package/README.md +21 -12
- package/SKILL.md +628 -361
- package/glasskit-styles.js +2 -2
- package/glasskit.css +236 -12
- package/glasskit.min.css +1 -1
- package/package.json +2 -2
package/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: glasskit-css
|
|
3
|
-
description: GlassKit is a pure CSS glassmorphism component library (v1.
|
|
3
|
+
description: GlassKit is a pure CSS glassmorphism component library (v1.4.0) with 24 components, Dark & Light mode, design tokens, and BEM-like naming. Use this reference whenever generating HTML that uses GlassKit classes to ensure correct structure, nesting, modifiers, and token usage.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# GlassKit CSS – AI Component Reference
|
|
@@ -10,61 +10,61 @@ description: GlassKit is a pure CSS glassmorphism component library (v1.3.5) wit
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## 1. Setup &
|
|
13
|
+
## 1. Setup & Boilerplate
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Including the Library
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
|
-
<!-- CDN (
|
|
19
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/glasskit@1.
|
|
18
|
+
<!-- CDN (recommended) -->
|
|
19
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/glasskit@1.4/glasskit.min.css">
|
|
20
20
|
|
|
21
|
-
<!--
|
|
21
|
+
<!-- Local -->
|
|
22
22
|
<link rel="stylesheet" href="glasskit.css">
|
|
23
23
|
|
|
24
|
-
<!-- Optional:
|
|
24
|
+
<!-- Optional: Load custom theme after base library -->
|
|
25
25
|
<link rel="stylesheet" href="theme-override.css">
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
### Minimal
|
|
28
|
+
### Minimal Template
|
|
29
29
|
|
|
30
30
|
```html
|
|
31
31
|
<!DOCTYPE html>
|
|
32
|
-
<html lang="
|
|
32
|
+
<html lang="en" data-theme="dark">
|
|
33
33
|
<head>
|
|
34
34
|
<meta charset="UTF-8">
|
|
35
35
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
36
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/glasskit@1.
|
|
36
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/glasskit@1.4/glasskit.min.css">
|
|
37
37
|
</head>
|
|
38
38
|
<body>
|
|
39
39
|
<div class="glass-bg">
|
|
40
|
-
<!--
|
|
40
|
+
<!-- All content goes here -->
|
|
41
41
|
</div>
|
|
42
42
|
</body>
|
|
43
43
|
</html>
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
###
|
|
46
|
+
### Naming Convention
|
|
47
47
|
|
|
48
|
-
- **Prefix:**
|
|
49
|
-
- **Utilities:**
|
|
50
|
-
- **BEM
|
|
48
|
+
- **Prefix:** All components use `glass-` (e.g. `glass-card`, `glass-btn`)
|
|
49
|
+
- **Utilities:** Use `gl-` (e.g. `gl-stack`, `gl-row`, `gl-mt-md`)
|
|
50
|
+
- **BEM logic:** `glass-component__element--modifier`
|
|
51
51
|
- Element: `glass-card__text`, `glass-modal__header`
|
|
52
52
|
- Modifier: `glass-btn--primary`, `glass-avatar--lg`
|
|
53
|
-
- **State
|
|
53
|
+
- **State classes:** `is-active`, `is-open`, `is-visible` (standalone, not BEM)
|
|
54
54
|
|
|
55
55
|
### Theming
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
The theme is controlled via `data-theme` on `<html>`:
|
|
58
58
|
|
|
59
59
|
```html
|
|
60
|
-
<!-- Dark Mode (
|
|
60
|
+
<!-- Dark Mode (default) -->
|
|
61
61
|
<html data-theme="dark">
|
|
62
62
|
|
|
63
63
|
<!-- Light Mode -->
|
|
64
64
|
<html data-theme="light">
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
Toggle theme via JavaScript:
|
|
68
68
|
|
|
69
69
|
```js
|
|
70
70
|
function toggleTheme() {
|
|
@@ -78,38 +78,38 @@ function toggleTheme() {
|
|
|
78
78
|
|
|
79
79
|
## 2. Design Tokens
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
All visual values are controlled via CSS Custom Properties. For custom theming, override them in a `theme-override.css`.
|
|
82
82
|
|
|
83
|
-
###
|
|
83
|
+
### Colors
|
|
84
84
|
|
|
85
|
-
| Token | Dark | Light |
|
|
85
|
+
| Token | Dark | Light | Usage |
|
|
86
86
|
|---|---|---|---|
|
|
87
|
-
| `--gl-color-primary` | `#f5a623` | `#e8852d` |
|
|
88
|
-
| `--gl-color-primary-dark` | `#d4692a` | `#c96a1e` | Gradient
|
|
89
|
-
| `--gl-color-primary-mid` | `#e07a24` | `#d97826` | Gradient
|
|
90
|
-
| `--gl-color-text` | `#ffffff` | `#1a2a36` |
|
|
91
|
-
| `--gl-color-text-muted` | `rgba(255,255,255,0.60)` | `rgba(26,42,54,0.55)` |
|
|
92
|
-
| `--gl-color-text-heading` | `#ffffff` | `#0f1f2a` |
|
|
93
|
-
| `--gl-color-success` | `#34c759` | `#28a745` |
|
|
94
|
-
| `--gl-color-error` | `#ff3b30` | `#dc3545` |
|
|
95
|
-
| `--gl-color-warning` | `#ffcc00` | `#e6a800` |
|
|
96
|
-
|
|
97
|
-
###
|
|
98
|
-
|
|
99
|
-
| Token | Dark |
|
|
87
|
+
| `--gl-color-primary` | `#f5a623` | `#e8852d` | Primary color, buttons, active elements |
|
|
88
|
+
| `--gl-color-primary-dark` | `#d4692a` | `#c96a1e` | Gradient end value |
|
|
89
|
+
| `--gl-color-primary-mid` | `#e07a24` | `#d97826` | Gradient midpoint |
|
|
90
|
+
| `--gl-color-text` | `#ffffff` | `#1a2a36` | Default text color |
|
|
91
|
+
| `--gl-color-text-muted` | `rgba(255,255,255,0.60)` | `rgba(26,42,54,0.55)` | Secondary text |
|
|
92
|
+
| `--gl-color-text-heading` | `#ffffff` | `#0f1f2a` | Headings |
|
|
93
|
+
| `--gl-color-success` | `#34c759` | `#28a745` | Success |
|
|
94
|
+
| `--gl-color-error` | `#ff3b30` | `#dc3545` | Error |
|
|
95
|
+
| `--gl-color-warning` | `#ffcc00` | `#e6a800` | Warning |
|
|
96
|
+
|
|
97
|
+
### Glass Surfaces
|
|
98
|
+
|
|
99
|
+
| Token | Dark | Usage |
|
|
100
100
|
|---|---|---|
|
|
101
|
-
| `--gl-surface-1` | `rgba(255,255,255, 0.08)` |
|
|
102
|
-
| `--gl-surface-2` | `rgba(255,255,255, 0.10)` |
|
|
103
|
-
| `--gl-surface-3` | `rgba(255,255,255, 0.14)` | Nav
|
|
104
|
-
| `--gl-surface-4` | `rgba(255,255,255, 0.16)` | Hover
|
|
105
|
-
| `--gl-surface-5` | `rgba(255,255,255, 0.22)` |
|
|
106
|
-
| `--gl-surface-milk` | `rgba(255,255,255, 0.55)` |
|
|
107
|
-
| `--gl-surface-milk-strong` | `rgba(255,255,255, 0.75)` | Secondary
|
|
108
|
-
| `--gl-surface-overlay` | `rgba(0,0,0, 0.50)` | Modal
|
|
101
|
+
| `--gl-surface-1` | `rgba(255,255,255, 0.08)` | Subtlest surface (status) |
|
|
102
|
+
| `--gl-surface-2` | `rgba(255,255,255, 0.10)` | Default (inputs, cards) |
|
|
103
|
+
| `--gl-surface-3` | `rgba(255,255,255, 0.14)` | Nav pills, badges |
|
|
104
|
+
| `--gl-surface-4` | `rgba(255,255,255, 0.16)` | Hover states |
|
|
105
|
+
| `--gl-surface-5` | `rgba(255,255,255, 0.22)` | Strong hover |
|
|
106
|
+
| `--gl-surface-milk` | `rgba(255,255,255, 0.55)` | Milky |
|
|
107
|
+
| `--gl-surface-milk-strong` | `rgba(255,255,255, 0.75)` | Secondary button |
|
|
108
|
+
| `--gl-surface-overlay` | `rgba(0,0,0, 0.50)` | Modal overlay |
|
|
109
109
|
|
|
110
110
|
### Borders
|
|
111
111
|
|
|
112
|
-
| Token |
|
|
112
|
+
| Token | Value |
|
|
113
113
|
|---|---|
|
|
114
114
|
| `--gl-border-subtle` | `rgba(255,255,255, 0.18)` |
|
|
115
115
|
| `--gl-border-medium` | `rgba(255,255,255, 0.30)` |
|
|
@@ -120,28 +120,28 @@ Alle visuellen Werte werden über CSS Custom Properties gesteuert. Für Custom-T
|
|
|
120
120
|
|
|
121
121
|
### Blur
|
|
122
122
|
|
|
123
|
-
| Token |
|
|
123
|
+
| Token | Value |
|
|
124
124
|
|---|---|
|
|
125
|
-
| `--gl-blur` | `24px` (
|
|
125
|
+
| `--gl-blur` | `24px` (default) |
|
|
126
126
|
| `--gl-blur-light` | `16px` |
|
|
127
127
|
| `--gl-blur-soft` | `12px` |
|
|
128
128
|
| `--gl-blur-heavy` | `40px` |
|
|
129
129
|
|
|
130
130
|
### Radii
|
|
131
131
|
|
|
132
|
-
| Token |
|
|
132
|
+
| Token | Value | Usage |
|
|
133
133
|
|---|---|---|
|
|
134
|
-
| `--gl-radius-xs` | `8px` |
|
|
135
|
-
| `--gl-radius-sm` | `12px` | Badges,
|
|
136
|
-
| `--gl-radius-input` | `14px` | Inputs,
|
|
134
|
+
| `--gl-radius-xs` | `8px` | Small elements |
|
|
135
|
+
| `--gl-radius-sm` | `12px` | Badges, small containers |
|
|
136
|
+
| `--gl-radius-input` | `14px` | Inputs, textareas |
|
|
137
137
|
| `--gl-radius-btn` | `16px` | Buttons |
|
|
138
138
|
| `--gl-radius-card` | `24px` | Cards |
|
|
139
|
-
| `--gl-radius-full` | `9999px` |
|
|
140
|
-
| `--gl-radius-pill` | `50%` |
|
|
139
|
+
| `--gl-radius-full` | `9999px` | Fully rounded |
|
|
140
|
+
| `--gl-radius-pill` | `50%` | Circle shape |
|
|
141
141
|
|
|
142
142
|
### Spacing
|
|
143
143
|
|
|
144
|
-
| Token |
|
|
144
|
+
| Token | Value |
|
|
145
145
|
|---|---|
|
|
146
146
|
| `--gl-space-2xs` | `4px` |
|
|
147
147
|
| `--gl-space-xs` | `8px` |
|
|
@@ -155,19 +155,19 @@ Alle visuellen Werte werden über CSS Custom Properties gesteuert. Für Custom-T
|
|
|
155
155
|
|
|
156
156
|
### Shadows
|
|
157
157
|
|
|
158
|
-
| Token |
|
|
158
|
+
| Token | Usage |
|
|
159
159
|
|---|---|
|
|
160
160
|
| `--gl-shadow-card` | Cards |
|
|
161
|
-
| `--gl-shadow-btn` |
|
|
162
|
-
| `--gl-shadow-btn-primary` | Primary
|
|
163
|
-
| `--gl-shadow-glow` | Glow
|
|
164
|
-
| `--gl-shadow-modal` | Modal
|
|
165
|
-
| `--gl-shadow-toast` | Toast
|
|
166
|
-
| `--gl-shadow-focus` | Focus
|
|
161
|
+
| `--gl-shadow-btn` | Default buttons |
|
|
162
|
+
| `--gl-shadow-btn-primary` | Primary button (orange glow) |
|
|
163
|
+
| `--gl-shadow-glow` | Glow effect |
|
|
164
|
+
| `--gl-shadow-modal` | Modal dialog |
|
|
165
|
+
| `--gl-shadow-toast` | Toast notifications |
|
|
166
|
+
| `--gl-shadow-focus` | Focus ring |
|
|
167
167
|
|
|
168
168
|
### Typography
|
|
169
169
|
|
|
170
|
-
| Token |
|
|
170
|
+
| Token | Value |
|
|
171
171
|
|---|---|
|
|
172
172
|
| `--gl-font-size-xs` | `13px` |
|
|
173
173
|
| `--gl-font-size-sm` | `14px` |
|
|
@@ -182,37 +182,37 @@ Alle visuellen Werte werden über CSS Custom Properties gesteuert. Für Custom-T
|
|
|
182
182
|
|
|
183
183
|
---
|
|
184
184
|
|
|
185
|
-
## 3.
|
|
185
|
+
## 3. Component Catalog
|
|
186
186
|
|
|
187
187
|
### 3.1 Background
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
The outermost container element. Creates the aurora background with light effects. **Must always be used as the wrapper for all content.**
|
|
190
190
|
|
|
191
191
|
```html
|
|
192
192
|
<div class="glass-bg">
|
|
193
|
-
<!--
|
|
193
|
+
<!-- All content goes here -->
|
|
194
194
|
</div>
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
With Tab-Bar (adds bottom padding):
|
|
198
198
|
|
|
199
199
|
```html
|
|
200
200
|
<div class="glass-bg glass-bg--has-tab-bar">
|
|
201
|
-
<!--
|
|
201
|
+
<!-- Content -->
|
|
202
202
|
<nav class="glass-tab-bar">...</nav>
|
|
203
203
|
</div>
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
-
|
|
|
206
|
+
| Class | Description |
|
|
207
207
|
|---|---|
|
|
208
|
-
| `.glass-bg` |
|
|
209
|
-
| `.glass-bg--has-tab-bar` | Modifier:
|
|
208
|
+
| `.glass-bg` | Full-screen background with aurora light effects |
|
|
209
|
+
| `.glass-bg--has-tab-bar` | Modifier: bottom padding for tab bar (82px) |
|
|
210
210
|
|
|
211
211
|
---
|
|
212
212
|
|
|
213
213
|
### 3.2 Navigation Bar
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
Transparent navigation bar. Typically contains `glass-pill` buttons.
|
|
216
216
|
|
|
217
217
|
```html
|
|
218
218
|
<nav class="glass-nav">
|
|
@@ -225,15 +225,15 @@ Transparente Navigationsleiste. Enthält typischerweise `glass-pill` Buttons.
|
|
|
225
225
|
</nav>
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
|
|
|
228
|
+
| Class | Description |
|
|
229
229
|
|---|---|
|
|
230
|
-
| `.glass-nav` | Flex
|
|
230
|
+
| `.glass-nav` | Flex container with `space-between`, padding |
|
|
231
231
|
|
|
232
232
|
---
|
|
233
233
|
|
|
234
|
-
### 3.3 Pill
|
|
234
|
+
### 3.3 Pill Button
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
Round glass icon buttons (46×46px). Used in nav bars and as standalone action buttons.
|
|
237
237
|
|
|
238
238
|
```html
|
|
239
239
|
<button class="glass-pill">
|
|
@@ -241,12 +241,12 @@ Runde Glas-Icon-Buttons (46×46px). Werden in Nav-Bars und als eigenständige Ak
|
|
|
241
241
|
</button>
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
-
|
|
|
244
|
+
| Class | Description |
|
|
245
245
|
|---|---|
|
|
246
|
-
| `.glass-pill` |
|
|
247
|
-
| `.glass-theme-toggle` |
|
|
246
|
+
| `.glass-pill` | Round glass button (46×46px) |
|
|
247
|
+
| `.glass-theme-toggle` | Specialized pill with automatic moon/sun switch |
|
|
248
248
|
|
|
249
|
-
Theme
|
|
249
|
+
Theme Toggle (specialized pill):
|
|
250
250
|
|
|
251
251
|
```html
|
|
252
252
|
<button class="glass-theme-toggle" onclick="toggleTheme()">
|
|
@@ -269,9 +269,9 @@ Theme-Toggle (spezialisierter Pill):
|
|
|
269
269
|
|
|
270
270
|
---
|
|
271
271
|
|
|
272
|
-
### 3.4 Tab
|
|
272
|
+
### 3.4 Tab Bar
|
|
273
273
|
|
|
274
|
-
|
|
274
|
+
Fixed bottom navigation with glass background. Requires `glass-bg--has-tab-bar` on the background container.
|
|
275
275
|
|
|
276
276
|
```html
|
|
277
277
|
<nav class="glass-tab-bar">
|
|
@@ -279,139 +279,139 @@ Fixierte Bottom-Navigation mit Glas-Hintergrund. Benötigt `glass-bg--has-tab-ba
|
|
|
279
279
|
<span class="glass-tab-bar__icon">
|
|
280
280
|
<svg viewBox="0 0 24 24"><!-- Icon --></svg>
|
|
281
281
|
</span>
|
|
282
|
-
<span class="glass-tab-bar__label">
|
|
282
|
+
<span class="glass-tab-bar__label">Home</span>
|
|
283
283
|
</button>
|
|
284
284
|
<button class="glass-tab-bar__item">
|
|
285
285
|
<span class="glass-tab-bar__icon">
|
|
286
286
|
<svg viewBox="0 0 24 24"><!-- Icon --></svg>
|
|
287
287
|
<span class="glass-tab-bar__badge">3</span>
|
|
288
288
|
</span>
|
|
289
|
-
<span class="glass-tab-bar__label">
|
|
289
|
+
<span class="glass-tab-bar__label">Contracts</span>
|
|
290
290
|
</button>
|
|
291
291
|
<button class="glass-tab-bar__item">
|
|
292
292
|
<span class="glass-tab-bar__icon">
|
|
293
293
|
<svg viewBox="0 0 24 24"><!-- Icon --></svg>
|
|
294
294
|
</span>
|
|
295
|
-
<span class="glass-tab-bar__label">
|
|
295
|
+
<span class="glass-tab-bar__label">Profile</span>
|
|
296
296
|
</button>
|
|
297
297
|
</nav>
|
|
298
298
|
```
|
|
299
299
|
|
|
300
|
-
|
|
|
300
|
+
| Class | Description |
|
|
301
301
|
|---|---|
|
|
302
|
-
| `.glass-tab-bar` | Container: fixed bottom,
|
|
303
|
-
| `.glass-tab-bar__item` |
|
|
304
|
-
| `.glass-tab-bar__item.is-active` |
|
|
305
|
-
| `.glass-tab-bar__icon` | Icon
|
|
306
|
-
| `.glass-tab-bar__badge` |
|
|
307
|
-
| `.glass-tab-bar__label` | Text
|
|
302
|
+
| `.glass-tab-bar` | Container: fixed bottom, glass blur |
|
|
303
|
+
| `.glass-tab-bar__item` | Individual tab |
|
|
304
|
+
| `.glass-tab-bar__item.is-active` | Active tab (primary color) |
|
|
305
|
+
| `.glass-tab-bar__icon` | Icon wrapper |
|
|
306
|
+
| `.glass-tab-bar__badge` | Numeric badge inside icon |
|
|
307
|
+
| `.glass-tab-bar__label` | Text label below icon |
|
|
308
308
|
|
|
309
309
|
---
|
|
310
310
|
|
|
311
311
|
### 3.5 Title
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
Page title with text shadow effect.
|
|
314
314
|
|
|
315
315
|
```html
|
|
316
|
-
<h1 class="glass-title">
|
|
316
|
+
<h1 class="glass-title">Page Title</h1>
|
|
317
317
|
```
|
|
318
318
|
|
|
319
|
-
|
|
|
319
|
+
| Class | Description |
|
|
320
320
|
|---|---|
|
|
321
|
-
| `.glass-title` |
|
|
321
|
+
| `.glass-title` | Large title (24px, bold, text-shadow) |
|
|
322
322
|
|
|
323
323
|
---
|
|
324
324
|
|
|
325
325
|
### 3.6 Card
|
|
326
326
|
|
|
327
|
-
|
|
327
|
+
Glassmorphism container for content. Optionally with glow effect (frosted glass gradient + light streak).
|
|
328
328
|
|
|
329
329
|
```html
|
|
330
330
|
<!-- Standard Card -->
|
|
331
331
|
<div class="glass-card">
|
|
332
|
-
<p class="glass-card__text">
|
|
332
|
+
<p class="glass-card__text">Content</p>
|
|
333
333
|
</div>
|
|
334
334
|
|
|
335
|
-
<!-- Glow Card
|
|
335
|
+
<!-- Glow Card with Icon -->
|
|
336
336
|
<div class="glass-card glass-card--glow">
|
|
337
337
|
<div class="glass-card__icon">
|
|
338
338
|
<svg viewBox="0 0 64 64"><!-- Icon SVG --></svg>
|
|
339
339
|
</div>
|
|
340
|
-
<p class="glass-card__text">
|
|
340
|
+
<p class="glass-card__text">Description text goes here.</p>
|
|
341
341
|
</div>
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
-
|
|
|
344
|
+
| Class | Description |
|
|
345
345
|
|---|---|
|
|
346
|
-
| `.glass-card` |
|
|
347
|
-
| `.glass-card--glow` |
|
|
348
|
-
| `.glass-card__icon` |
|
|
349
|
-
| `.glass-card__text` |
|
|
346
|
+
| `.glass-card` | Base glass container (border-radius: 24px) |
|
|
347
|
+
| `.glass-card--glow` | Frosted glass gradient with light streak effect |
|
|
348
|
+
| `.glass-card__icon` | Centered icon wrapper (SVG, 48×48px) |
|
|
349
|
+
| `.glass-card__text` | Description text (muted) |
|
|
350
350
|
|
|
351
351
|
---
|
|
352
352
|
|
|
353
353
|
### 3.7 Buttons
|
|
354
354
|
|
|
355
|
-
Full-
|
|
355
|
+
Full-width buttons (56px height) with three variants and size modifiers.
|
|
356
356
|
|
|
357
357
|
```html
|
|
358
|
-
<!-- Primary:
|
|
358
|
+
<!-- Primary: Color gradient, main action -->
|
|
359
359
|
<button class="glass-btn glass-btn--primary">
|
|
360
360
|
<svg viewBox="0 0 24 24"><!-- Optional: Icon --></svg>
|
|
361
|
-
|
|
361
|
+
Primary Action
|
|
362
362
|
</button>
|
|
363
363
|
|
|
364
|
-
<!-- Secondary:
|
|
365
|
-
<button class="glass-btn glass-btn--secondary">
|
|
364
|
+
<!-- Secondary: Milky white -->
|
|
365
|
+
<button class="glass-btn glass-btn--secondary">Secondary Action</button>
|
|
366
366
|
|
|
367
|
-
<!-- Tertiary:
|
|
368
|
-
<button class="glass-btn glass-btn--tertiary">
|
|
367
|
+
<!-- Tertiary: Subtle glass -->
|
|
368
|
+
<button class="glass-btn glass-btn--tertiary">Tertiary Action</button>
|
|
369
369
|
|
|
370
|
-
<!--
|
|
371
|
-
<button class="glass-btn glass-btn--primary glass-btn--sm">
|
|
372
|
-
<button class="glass-btn glass-btn--primary glass-btn--lg">
|
|
370
|
+
<!-- Sizes -->
|
|
371
|
+
<button class="glass-btn glass-btn--primary glass-btn--sm">Small (44px)</button>
|
|
372
|
+
<button class="glass-btn glass-btn--primary glass-btn--lg">Large (64px)</button>
|
|
373
373
|
|
|
374
|
-
<!-- Auto-
|
|
374
|
+
<!-- Auto-width (instead of full-width) -->
|
|
375
375
|
<button class="glass-btn glass-btn--primary glass-btn--auto">Auto</button>
|
|
376
376
|
```
|
|
377
377
|
|
|
378
|
-
|
|
|
378
|
+
| Class | Description |
|
|
379
379
|
|---|---|
|
|
380
|
-
| `.glass-btn` |
|
|
381
|
-
| `.glass-btn--primary` |
|
|
382
|
-
| `.glass-btn--secondary` |
|
|
383
|
-
| `.glass-btn--tertiary` |
|
|
384
|
-
| `.glass-btn--sm` | 44px
|
|
385
|
-
| `.glass-btn--lg` | 64px
|
|
386
|
-
| `.glass-btn--auto` | Width: auto
|
|
380
|
+
| `.glass-btn` | Base (56px height, width: 100%) |
|
|
381
|
+
| `.glass-btn--primary` | Color gradient (orange) |
|
|
382
|
+
| `.glass-btn--secondary` | Milky white, dark text |
|
|
383
|
+
| `.glass-btn--tertiary` | Subtle glass, more transparent |
|
|
384
|
+
| `.glass-btn--sm` | 44px height |
|
|
385
|
+
| `.glass-btn--lg` | 64px height |
|
|
386
|
+
| `.glass-btn--auto` | Width: auto instead of 100% |
|
|
387
387
|
|
|
388
|
-
**
|
|
388
|
+
**Important:** Buttons default to `width: 100%`. Use `--auto` for inline/auto-width buttons.
|
|
389
389
|
|
|
390
390
|
---
|
|
391
391
|
|
|
392
392
|
### 3.8 Badge
|
|
393
393
|
|
|
394
|
-
Tags
|
|
394
|
+
Tags and labels.
|
|
395
395
|
|
|
396
396
|
```html
|
|
397
|
-
<span class="glass-badge">
|
|
398
|
-
<span class="glass-badge glass-badge--primary">
|
|
399
|
-
<span class="glass-badge glass-badge--success">
|
|
400
|
-
<span class="glass-badge glass-badge--error">
|
|
397
|
+
<span class="glass-badge">Default</span>
|
|
398
|
+
<span class="glass-badge glass-badge--primary">Active</span>
|
|
399
|
+
<span class="glass-badge glass-badge--success">Done</span>
|
|
400
|
+
<span class="glass-badge glass-badge--error">Error</span>
|
|
401
401
|
```
|
|
402
402
|
|
|
403
|
-
|
|
|
403
|
+
| Class | Description |
|
|
404
404
|
|---|---|
|
|
405
|
-
| `.glass-badge` |
|
|
406
|
-
| `.glass-badge--primary` | Primary
|
|
407
|
-
| `.glass-badge--success` |
|
|
408
|
-
| `.glass-badge--error` |
|
|
405
|
+
| `.glass-badge` | Default (subtle glass) |
|
|
406
|
+
| `.glass-badge--primary` | Primary color |
|
|
407
|
+
| `.glass-badge--success` | Green |
|
|
408
|
+
| `.glass-badge--error` | Red |
|
|
409
409
|
|
|
410
410
|
---
|
|
411
411
|
|
|
412
412
|
### 3.9 Avatar
|
|
413
413
|
|
|
414
|
-
|
|
414
|
+
Glass circles in three sizes. For initials, icons, or images.
|
|
415
415
|
|
|
416
416
|
```html
|
|
417
417
|
<div class="glass-avatar glass-avatar--sm">S</div>
|
|
@@ -419,17 +419,17 @@ Glas-Kreise in drei Größen. Für Initialen, Icons oder Bilder.
|
|
|
419
419
|
<div class="glass-avatar glass-avatar--lg">L</div>
|
|
420
420
|
```
|
|
421
421
|
|
|
422
|
-
|
|
|
422
|
+
| Class | Description |
|
|
423
423
|
|---|---|
|
|
424
|
-
| `.glass-avatar` |
|
|
425
|
-
| `.glass-avatar--sm` |
|
|
426
|
-
| `.glass-avatar--lg` |
|
|
424
|
+
| `.glass-avatar` | Default size (medium) |
|
|
425
|
+
| `.glass-avatar--sm` | Small |
|
|
426
|
+
| `.glass-avatar--lg` | Large |
|
|
427
427
|
|
|
428
428
|
---
|
|
429
429
|
|
|
430
430
|
### 3.10 Divider
|
|
431
431
|
|
|
432
|
-
|
|
432
|
+
Horizontal separator line with fade effect.
|
|
433
433
|
|
|
434
434
|
```html
|
|
435
435
|
<hr class="glass-divider">
|
|
@@ -439,7 +439,7 @@ Horizontale Trennlinie mit Fade-Effekt.
|
|
|
439
439
|
|
|
440
440
|
### 3.11 Status Notice
|
|
441
441
|
|
|
442
|
-
Info
|
|
442
|
+
Info/notice card with icon and text.
|
|
443
443
|
|
|
444
444
|
```html
|
|
445
445
|
<div class="glass-status">
|
|
@@ -448,64 +448,64 @@ Info-/Hinweis-Card mit Icon und Text.
|
|
|
448
448
|
<line x1="12" y1="16" x2="12" y2="12"/>
|
|
449
449
|
<line x1="12" y1="8" x2="12" y2="8"/>
|
|
450
450
|
</svg>
|
|
451
|
-
<p>
|
|
451
|
+
<p>No documents captured yet.</p>
|
|
452
452
|
</div>
|
|
453
453
|
```
|
|
454
454
|
|
|
455
|
-
|
|
|
455
|
+
| Class | Description |
|
|
456
456
|
|---|---|
|
|
457
|
-
| `.glass-status` | Container
|
|
457
|
+
| `.glass-status` | Container with subtle glass surface |
|
|
458
458
|
|
|
459
459
|
---
|
|
460
460
|
|
|
461
461
|
### 3.12 Modal
|
|
462
462
|
|
|
463
|
-
|
|
463
|
+
Centered dialog with blur overlay. Controlled via the `is-active` state class on the overlay.
|
|
464
464
|
|
|
465
465
|
```html
|
|
466
466
|
<div class="glass-modal-overlay is-active">
|
|
467
467
|
<div class="glass-modal">
|
|
468
468
|
<div class="glass-modal__header">
|
|
469
|
-
<h2 class="glass-modal__title">
|
|
469
|
+
<h2 class="glass-modal__title">Delete contract?</h2>
|
|
470
470
|
</div>
|
|
471
471
|
<div class="glass-modal__body">
|
|
472
|
-
<p>
|
|
472
|
+
<p>This action cannot be undone.</p>
|
|
473
473
|
</div>
|
|
474
474
|
<div class="glass-modal__footer">
|
|
475
|
-
<button class="glass-modal__action">
|
|
476
|
-
<button class="glass-modal__action glass-modal__action--primary">
|
|
475
|
+
<button class="glass-modal__action">Cancel</button>
|
|
476
|
+
<button class="glass-modal__action glass-modal__action--primary">Confirm</button>
|
|
477
477
|
</div>
|
|
478
478
|
</div>
|
|
479
479
|
</div>
|
|
480
480
|
```
|
|
481
481
|
|
|
482
|
-
Danger
|
|
482
|
+
Danger variant:
|
|
483
483
|
|
|
484
484
|
```html
|
|
485
|
-
<button class="glass-modal__action glass-modal__action--danger">
|
|
485
|
+
<button class="glass-modal__action glass-modal__action--danger">Delete</button>
|
|
486
486
|
```
|
|
487
487
|
|
|
488
|
-
|
|
|
488
|
+
| Class | Description |
|
|
489
489
|
|---|---|
|
|
490
|
-
| `.glass-modal-overlay` | Fullscreen
|
|
491
|
-
| `.glass-modal-overlay.is-active` |
|
|
492
|
-
| `.glass-modal` | Dialog
|
|
493
|
-
| `.glass-modal__header` |
|
|
494
|
-
| `.glass-modal__title` |
|
|
495
|
-
| `.glass-modal__body` |
|
|
496
|
-
| `.glass-modal__footer` |
|
|
497
|
-
| `.glass-modal__action` | Action
|
|
498
|
-
| `.glass-modal__action--primary` |
|
|
499
|
-
| `.glass-modal__action--danger` |
|
|
490
|
+
| `.glass-modal-overlay` | Fullscreen container with blur |
|
|
491
|
+
| `.glass-modal-overlay.is-active` | Visible + animated |
|
|
492
|
+
| `.glass-modal` | Dialog box |
|
|
493
|
+
| `.glass-modal__header` | Header area |
|
|
494
|
+
| `.glass-modal__title` | Title (20px, bold) |
|
|
495
|
+
| `.glass-modal__body` | Content area |
|
|
496
|
+
| `.glass-modal__footer` | Action bar |
|
|
497
|
+
| `.glass-modal__action` | Action button in footer |
|
|
498
|
+
| `.glass-modal__action--primary` | Primary action (colored) |
|
|
499
|
+
| `.glass-modal__action--danger` | Dangerous action (red) |
|
|
500
500
|
|
|
501
|
-
**
|
|
501
|
+
**Important:** `is-active` goes on `.glass-modal-overlay`, **not** on `.glass-modal`.
|
|
502
502
|
|
|
503
|
-
JavaScript
|
|
503
|
+
JavaScript to open/close:
|
|
504
504
|
|
|
505
505
|
```js
|
|
506
|
-
//
|
|
506
|
+
// Open
|
|
507
507
|
document.querySelector('.glass-modal-overlay').classList.add('is-active');
|
|
508
|
-
//
|
|
508
|
+
// Close
|
|
509
509
|
document.querySelector('.glass-modal-overlay').classList.remove('is-active');
|
|
510
510
|
```
|
|
511
511
|
|
|
@@ -513,46 +513,46 @@ document.querySelector('.glass-modal-overlay').classList.remove('is-active');
|
|
|
513
513
|
|
|
514
514
|
### 3.13 Toast
|
|
515
515
|
|
|
516
|
-
|
|
516
|
+
Temporary notification. Visible via `is-visible`. Three variants.
|
|
517
517
|
|
|
518
518
|
```html
|
|
519
519
|
<div class="glass-toast glass-toast--success is-visible">
|
|
520
520
|
<svg class="glass-toast__icon" viewBox="0 0 24 24"><!-- Icon --></svg>
|
|
521
|
-
<span class="glass-toast__text">
|
|
521
|
+
<span class="glass-toast__text">Saved successfully!</span>
|
|
522
522
|
</div>
|
|
523
523
|
```
|
|
524
524
|
|
|
525
|
-
|
|
|
525
|
+
| Class | Description |
|
|
526
526
|
|---|---|
|
|
527
|
-
| `.glass-toast` |
|
|
528
|
-
| `.glass-toast--success` |
|
|
529
|
-
| `.glass-toast--error` |
|
|
530
|
-
| `.glass-toast--warning` |
|
|
531
|
-
| `.glass-toast.is-visible` |
|
|
527
|
+
| `.glass-toast` | Base container |
|
|
528
|
+
| `.glass-toast--success` | Green accent |
|
|
529
|
+
| `.glass-toast--error` | Red accent |
|
|
530
|
+
| `.glass-toast--warning` | Yellow accent |
|
|
531
|
+
| `.glass-toast.is-visible` | Visible + faded in |
|
|
532
532
|
| `.glass-toast__icon` | Icon (SVG) |
|
|
533
|
-
| `.glass-toast__text` |
|
|
533
|
+
| `.glass-toast__text` | Message text |
|
|
534
534
|
|
|
535
535
|
---
|
|
536
536
|
|
|
537
537
|
### 3.14 Input
|
|
538
538
|
|
|
539
|
-
|
|
539
|
+
Text fields with glass background. Wrapped in a `glass-input-group` with label and optional hint.
|
|
540
540
|
|
|
541
541
|
```html
|
|
542
542
|
<div class="glass-input-group">
|
|
543
|
-
<label class="glass-label">
|
|
544
|
-
<input class="glass-input" type="text" placeholder="
|
|
545
|
-
<span class="glass-hint">
|
|
543
|
+
<label class="glass-label">Contract Name</label>
|
|
544
|
+
<input class="glass-input" type="text" placeholder="e.g. Rental Agreement">
|
|
545
|
+
<span class="glass-hint">Optional help text</span>
|
|
546
546
|
</div>
|
|
547
547
|
```
|
|
548
548
|
|
|
549
|
-
Error
|
|
549
|
+
Error state:
|
|
550
550
|
|
|
551
551
|
```html
|
|
552
552
|
<div class="glass-input-group">
|
|
553
|
-
<label class="glass-label">
|
|
553
|
+
<label class="glass-label">Email</label>
|
|
554
554
|
<input class="glass-input glass-input--error" type="email" value="invalid@">
|
|
555
|
-
<span class="glass-hint glass-hint--error">
|
|
555
|
+
<span class="glass-hint glass-hint--error">Please enter a valid email address</span>
|
|
556
556
|
</div>
|
|
557
557
|
```
|
|
558
558
|
|
|
@@ -562,52 +562,52 @@ Disabled:
|
|
|
562
562
|
<input class="glass-input" type="text" disabled>
|
|
563
563
|
```
|
|
564
564
|
|
|
565
|
-
|
|
|
565
|
+
| Class | Description |
|
|
566
566
|
|---|---|
|
|
567
|
-
| `.glass-input-group` | Wrapper
|
|
568
|
-
| `.glass-label` | Label (
|
|
569
|
-
| `.glass-input` | Text
|
|
570
|
-
| `.glass-input--error` |
|
|
571
|
-
| `.glass-hint` |
|
|
572
|
-
| `.glass-hint--error` |
|
|
567
|
+
| `.glass-input-group` | Wrapper for label + input + hint |
|
|
568
|
+
| `.glass-label` | Label (small, muted, uppercase) |
|
|
569
|
+
| `.glass-input` | Text input (glass background) |
|
|
570
|
+
| `.glass-input--error` | Red border for error state |
|
|
571
|
+
| `.glass-hint` | Help text below input |
|
|
572
|
+
| `.glass-hint--error` | Red help text |
|
|
573
573
|
|
|
574
574
|
---
|
|
575
575
|
|
|
576
576
|
### 3.15 Textarea
|
|
577
577
|
|
|
578
|
-
|
|
578
|
+
Multi-line text field.
|
|
579
579
|
|
|
580
580
|
```html
|
|
581
|
-
<textarea class="glass-textarea" placeholder="
|
|
581
|
+
<textarea class="glass-textarea" placeholder="Optional notes…"></textarea>
|
|
582
582
|
```
|
|
583
583
|
|
|
584
|
-
|
|
|
584
|
+
| Class | Description |
|
|
585
585
|
|---|---|
|
|
586
|
-
| `.glass-textarea` |
|
|
586
|
+
| `.glass-textarea` | Multi-line glass input |
|
|
587
587
|
|
|
588
588
|
---
|
|
589
589
|
|
|
590
590
|
### 3.16 Select
|
|
591
591
|
|
|
592
|
-
Dropdown
|
|
592
|
+
Dropdown with glass styling and custom chevron.
|
|
593
593
|
|
|
594
594
|
```html
|
|
595
595
|
<select class="glass-select">
|
|
596
|
-
<option>
|
|
597
|
-
<option>
|
|
598
|
-
<option>
|
|
596
|
+
<option>Please select…</option>
|
|
597
|
+
<option>Insurance</option>
|
|
598
|
+
<option>Rental Agreement</option>
|
|
599
599
|
</select>
|
|
600
600
|
```
|
|
601
601
|
|
|
602
|
-
|
|
|
602
|
+
| Class | Description |
|
|
603
603
|
|---|---|
|
|
604
|
-
| `.glass-select` | Styled
|
|
604
|
+
| `.glass-select` | Styled dropdown |
|
|
605
605
|
|
|
606
606
|
---
|
|
607
607
|
|
|
608
608
|
### 3.17 Search
|
|
609
609
|
|
|
610
|
-
|
|
610
|
+
Search field with embedded search icon.
|
|
611
611
|
|
|
612
612
|
```html
|
|
613
613
|
<div class="glass-search">
|
|
@@ -615,22 +615,22 @@ Suchfeld mit eingebettetem Such-Icon.
|
|
|
615
615
|
<circle cx="11" cy="11" r="8"/>
|
|
616
616
|
<line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
|
617
617
|
</svg>
|
|
618
|
-
<input class="glass-input" type="search" placeholder="
|
|
618
|
+
<input class="glass-input" type="search" placeholder="Search contracts…">
|
|
619
619
|
</div>
|
|
620
620
|
```
|
|
621
621
|
|
|
622
|
-
|
|
|
622
|
+
| Class | Description |
|
|
623
623
|
|---|---|
|
|
624
624
|
| `.glass-search` | Wrapper (position: relative) |
|
|
625
|
-
| `.glass-search__icon` |
|
|
625
|
+
| `.glass-search__icon` | Positioned search icon (left) |
|
|
626
626
|
|
|
627
|
-
**
|
|
627
|
+
**Important:** The input inside `.glass-search` uses the regular `.glass-input` class.
|
|
628
628
|
|
|
629
629
|
---
|
|
630
630
|
|
|
631
631
|
### 3.18 Toggle Switch
|
|
632
632
|
|
|
633
|
-
iOS-
|
|
633
|
+
iOS-style switch.
|
|
634
634
|
|
|
635
635
|
```html
|
|
636
636
|
<label class="glass-toggle">
|
|
@@ -638,25 +638,25 @@ iOS-artiger Schalter.
|
|
|
638
638
|
<span class="glass-toggle__track">
|
|
639
639
|
<span class="glass-toggle__thumb"></span>
|
|
640
640
|
</span>
|
|
641
|
-
<span class="glass-toggle__label">
|
|
641
|
+
<span class="glass-toggle__label">Notifications</span>
|
|
642
642
|
</label>
|
|
643
643
|
```
|
|
644
644
|
|
|
645
|
-
|
|
|
645
|
+
| Class | Description |
|
|
646
646
|
|---|---|
|
|
647
|
-
| `.glass-toggle` |
|
|
648
|
-
| `.glass-toggle__input` |
|
|
649
|
-
| `.glass-toggle__track` |
|
|
650
|
-
| `.glass-toggle__thumb` |
|
|
651
|
-
| `.glass-toggle__label` | Text
|
|
647
|
+
| `.glass-toggle` | Outer label (flex container) |
|
|
648
|
+
| `.glass-toggle__input` | Hidden checkbox input |
|
|
649
|
+
| `.glass-toggle__track` | Visible track |
|
|
650
|
+
| `.glass-toggle__thumb` | Movable thumb |
|
|
651
|
+
| `.glass-toggle__label` | Text label |
|
|
652
652
|
|
|
653
|
-
**State:** `:checked`
|
|
653
|
+
**State:** `:checked` on the input activates the toggle visually.
|
|
654
654
|
|
|
655
655
|
---
|
|
656
656
|
|
|
657
657
|
### 3.19 Checkbox
|
|
658
658
|
|
|
659
|
-
|
|
659
|
+
Animated checkbox with checkmark SVG.
|
|
660
660
|
|
|
661
661
|
```html
|
|
662
662
|
<label class="glass-checkbox">
|
|
@@ -664,26 +664,26 @@ Animierte Checkbox mit Checkmark-SVG.
|
|
|
664
664
|
<span class="glass-checkbox__box">
|
|
665
665
|
<svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>
|
|
666
666
|
</span>
|
|
667
|
-
<span class="glass-checkbox__label">
|
|
667
|
+
<span class="glass-checkbox__label">Accept terms of service</span>
|
|
668
668
|
</label>
|
|
669
669
|
```
|
|
670
670
|
|
|
671
|
-
|
|
|
671
|
+
| Class | Description |
|
|
672
672
|
|---|---|
|
|
673
|
-
| `.glass-checkbox` |
|
|
674
|
-
| `.glass-checkbox__input` |
|
|
675
|
-
| `.glass-checkbox__box` |
|
|
676
|
-
| `.glass-checkbox__label` | Text
|
|
673
|
+
| `.glass-checkbox` | Outer label |
|
|
674
|
+
| `.glass-checkbox__input` | Hidden checkbox input |
|
|
675
|
+
| `.glass-checkbox__box` | Visible box with checkmark SVG |
|
|
676
|
+
| `.glass-checkbox__label` | Text label |
|
|
677
677
|
|
|
678
678
|
---
|
|
679
679
|
|
|
680
680
|
### 3.20 Radio Button
|
|
681
681
|
|
|
682
|
-
|
|
682
|
+
Animated radio button with dot.
|
|
683
683
|
|
|
684
684
|
```html
|
|
685
685
|
<label class="glass-radio">
|
|
686
|
-
<input class="glass-radio__input" type="radio" name="
|
|
686
|
+
<input class="glass-radio__input" type="radio" name="group" checked>
|
|
687
687
|
<span class="glass-radio__circle">
|
|
688
688
|
<span class="glass-radio__dot"></span>
|
|
689
689
|
</span>
|
|
@@ -691,7 +691,7 @@ Animierter Radio-Button mit Dot.
|
|
|
691
691
|
</label>
|
|
692
692
|
|
|
693
693
|
<label class="glass-radio">
|
|
694
|
-
<input class="glass-radio__input" type="radio" name="
|
|
694
|
+
<input class="glass-radio__input" type="radio" name="group">
|
|
695
695
|
<span class="glass-radio__circle">
|
|
696
696
|
<span class="glass-radio__dot"></span>
|
|
697
697
|
</span>
|
|
@@ -699,26 +699,26 @@ Animierter Radio-Button mit Dot.
|
|
|
699
699
|
</label>
|
|
700
700
|
```
|
|
701
701
|
|
|
702
|
-
|
|
|
702
|
+
| Class | Description |
|
|
703
703
|
|---|---|
|
|
704
|
-
| `.glass-radio` |
|
|
705
|
-
| `.glass-radio__input` |
|
|
706
|
-
| `.glass-radio__circle` |
|
|
707
|
-
| `.glass-radio__dot` |
|
|
708
|
-
| `.glass-radio__label` | Text
|
|
704
|
+
| `.glass-radio` | Outer label |
|
|
705
|
+
| `.glass-radio__input` | Hidden radio input |
|
|
706
|
+
| `.glass-radio__circle` | Visible circle |
|
|
707
|
+
| `.glass-radio__dot` | Inner dot (visible on :checked) |
|
|
708
|
+
| `.glass-radio__label` | Text label |
|
|
709
709
|
|
|
710
|
-
**
|
|
710
|
+
**Important:** Radio buttons in the same group need the same `name` attribute value.
|
|
711
711
|
|
|
712
712
|
---
|
|
713
713
|
|
|
714
714
|
### 3.21 Range Slider
|
|
715
715
|
|
|
716
|
-
Slider
|
|
716
|
+
Slider with gradient thumb. Used in a group with header and value display.
|
|
717
717
|
|
|
718
718
|
```html
|
|
719
719
|
<div class="glass-range-group">
|
|
720
720
|
<div class="glass-range-header">
|
|
721
|
-
<label class="glass-label">
|
|
721
|
+
<label class="glass-label">Image Quality</label>
|
|
722
722
|
<span class="glass-range-value" id="range-val">75%</span>
|
|
723
723
|
</div>
|
|
724
724
|
<input class="glass-range" type="range" min="0" max="100" value="75"
|
|
@@ -726,18 +726,18 @@ Slider mit Gradient-Thumb. Wird in einer Gruppe mit Header und Wertanzeige verwe
|
|
|
726
726
|
</div>
|
|
727
727
|
```
|
|
728
728
|
|
|
729
|
-
|
|
|
729
|
+
| Class | Description |
|
|
730
730
|
|---|---|
|
|
731
731
|
| `.glass-range-group` | Wrapper |
|
|
732
|
-
| `.glass-range-header` | Flex
|
|
733
|
-
| `.glass-range-value` |
|
|
734
|
-
| `.glass-range` |
|
|
732
|
+
| `.glass-range-header` | Flex container for label + value |
|
|
733
|
+
| `.glass-range-value` | Value display (right) |
|
|
734
|
+
| `.glass-range` | The actual slider |
|
|
735
735
|
|
|
736
736
|
---
|
|
737
737
|
|
|
738
738
|
### 3.22 Progress Bar
|
|
739
739
|
|
|
740
|
-
|
|
740
|
+
Progress bar with optional shimmer effect.
|
|
741
741
|
|
|
742
742
|
```html
|
|
743
743
|
<div class="glass-progress">
|
|
@@ -751,76 +751,218 @@ Fortschrittsbalken mit optionalem Shimmer-Effekt.
|
|
|
751
751
|
</div>
|
|
752
752
|
```
|
|
753
753
|
|
|
754
|
-
|
|
|
754
|
+
| Class | Description |
|
|
755
755
|
|---|---|
|
|
756
|
-
| `.glass-progress` |
|
|
757
|
-
| `.glass-progress--sm` |
|
|
758
|
-
| `.glass-progress--lg` |
|
|
759
|
-
| `.glass-progress--success` |
|
|
760
|
-
| `.glass-progress--error` |
|
|
761
|
-
| `.glass-progress__header` | Flex
|
|
762
|
-
| `.glass-progress__label` |
|
|
763
|
-
| `.glass-progress__value` |
|
|
764
|
-
| `.glass-progress__track` |
|
|
765
|
-
| `.glass-progress__fill` |
|
|
766
|
-
|
|
767
|
-
**
|
|
756
|
+
| `.glass-progress` | Base container |
|
|
757
|
+
| `.glass-progress--sm` | Narrow track (4px) |
|
|
758
|
+
| `.glass-progress--lg` | Wide track (12px) |
|
|
759
|
+
| `.glass-progress--success` | Green bar |
|
|
760
|
+
| `.glass-progress--error` | Red bar |
|
|
761
|
+
| `.glass-progress__header` | Flex container for label + value |
|
|
762
|
+
| `.glass-progress__label` | Label (left) |
|
|
763
|
+
| `.glass-progress__value` | Percentage value (right) |
|
|
764
|
+
| `.glass-progress__track` | Background track |
|
|
765
|
+
| `.glass-progress__fill` | Filled area (width via `style="width: X%"`) |
|
|
766
|
+
|
|
767
|
+
**Important:** Progress width is controlled via inline `style="width: X%"` on `.glass-progress__fill`.
|
|
768
768
|
|
|
769
769
|
---
|
|
770
770
|
|
|
771
771
|
### 3.23 Accordion
|
|
772
772
|
|
|
773
|
-
|
|
773
|
+
Collapsible content sections. Controlled via `is-open` on items.
|
|
774
774
|
|
|
775
775
|
```html
|
|
776
776
|
<div class="glass-accordion">
|
|
777
777
|
<div class="glass-accordion__item is-open">
|
|
778
778
|
<button class="glass-accordion__trigger" onclick="this.parentElement.classList.toggle('is-open')">
|
|
779
|
-
<span>
|
|
779
|
+
<span>Question one?</span>
|
|
780
780
|
<span class="glass-accordion__trigger-icon">
|
|
781
781
|
<svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
|
|
782
782
|
</span>
|
|
783
783
|
</button>
|
|
784
784
|
<div class="glass-accordion__content">
|
|
785
785
|
<div class="glass-accordion__body">
|
|
786
|
-
|
|
786
|
+
The answer to question one.
|
|
787
787
|
</div>
|
|
788
788
|
</div>
|
|
789
789
|
</div>
|
|
790
790
|
|
|
791
791
|
<div class="glass-accordion__item">
|
|
792
792
|
<button class="glass-accordion__trigger" onclick="this.parentElement.classList.toggle('is-open')">
|
|
793
|
-
<span>
|
|
793
|
+
<span>Question two?</span>
|
|
794
794
|
<span class="glass-accordion__trigger-icon">
|
|
795
795
|
<svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
|
|
796
796
|
</span>
|
|
797
797
|
</button>
|
|
798
798
|
<div class="glass-accordion__content">
|
|
799
799
|
<div class="glass-accordion__body">
|
|
800
|
-
|
|
800
|
+
The answer to question two.
|
|
801
801
|
</div>
|
|
802
802
|
</div>
|
|
803
803
|
</div>
|
|
804
804
|
</div>
|
|
805
805
|
```
|
|
806
806
|
|
|
807
|
-
|
|
|
807
|
+
| Class | Description |
|
|
808
808
|
|---|---|
|
|
809
809
|
| `.glass-accordion` | Container |
|
|
810
|
-
| `.glass-accordion__item` |
|
|
811
|
-
| `.glass-accordion__item.is-open` |
|
|
812
|
-
| `.glass-accordion__trigger` |
|
|
813
|
-
| `.glass-accordion__trigger-icon` | Chevron
|
|
814
|
-
| `.glass-accordion__content` | Wrapper
|
|
815
|
-
| `.glass-accordion__body` |
|
|
810
|
+
| `.glass-accordion__item` | Individual item |
|
|
811
|
+
| `.glass-accordion__item.is-open` | Expanded item |
|
|
812
|
+
| `.glass-accordion__trigger` | Clickable header button |
|
|
813
|
+
| `.glass-accordion__trigger-icon` | Chevron icon (rotates on open) |
|
|
814
|
+
| `.glass-accordion__content` | Wrapper for animated height |
|
|
815
|
+
| `.glass-accordion__body` | Actual content |
|
|
816
816
|
|
|
817
817
|
---
|
|
818
818
|
|
|
819
|
-
|
|
819
|
+
### 3.24 List
|
|
820
820
|
|
|
821
|
-
|
|
821
|
+
iOS-style grouped settings list. Items can carry a leading icon, a title with optional subtitle, and a trailing element (chevron, value, button). Dividers between items are drawn automatically via `::after` — **never add divider markup manually**.
|
|
822
822
|
|
|
823
|
-
|
|
823
|
+
```html
|
|
824
|
+
<!-- Settings-style list with icons + subtitles + trailing -->
|
|
825
|
+
<ul class="glass-list">
|
|
826
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
827
|
+
<span class="glass-list__leading">
|
|
828
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
829
|
+
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
|
|
830
|
+
<polyline points="7 10 12 15 17 10"/>
|
|
831
|
+
<line x1="12" y1="15" x2="12" y2="3"/>
|
|
832
|
+
</svg>
|
|
833
|
+
</span>
|
|
834
|
+
<div class="glass-list__content">
|
|
835
|
+
<div class="glass-list__title">iOS 26.4 Update</div>
|
|
836
|
+
<div class="glass-list__subtitle">2.1 GB · Available now</div>
|
|
837
|
+
</div>
|
|
838
|
+
<div class="glass-list__trailing">
|
|
839
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
840
|
+
<polyline points="9 18 15 12 9 6"/>
|
|
841
|
+
</svg>
|
|
842
|
+
</div>
|
|
843
|
+
</li>
|
|
844
|
+
|
|
845
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
846
|
+
<span class="glass-list__leading">
|
|
847
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
848
|
+
<rect x="2" y="5" width="20" height="14" rx="2"/>
|
|
849
|
+
<line x1="2" y1="10" x2="22" y2="10"/>
|
|
850
|
+
</svg>
|
|
851
|
+
</span>
|
|
852
|
+
<div class="glass-list__content">
|
|
853
|
+
<div class="glass-list__title">Apple One</div>
|
|
854
|
+
<div class="glass-list__subtitle">Family — renews Apr 28</div>
|
|
855
|
+
</div>
|
|
856
|
+
<div class="glass-list__trailing">$22.95</div>
|
|
857
|
+
</li>
|
|
858
|
+
|
|
859
|
+
<li class="glass-list__item glass-list__item--center glass-list__item--interactive">
|
|
860
|
+
View all subscriptions
|
|
861
|
+
</li>
|
|
862
|
+
</ul>
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
```html
|
|
866
|
+
<!-- Compact menu (centered text only, no icons) -->
|
|
867
|
+
<ul class="glass-list">
|
|
868
|
+
<li class="glass-list__item glass-list__item--center glass-list__item--interactive">Share</li>
|
|
869
|
+
<li class="glass-list__item glass-list__item--center glass-list__item--interactive">Duplicate</li>
|
|
870
|
+
<li class="glass-list__item glass-list__item--center glass-list__item--interactive">Delete</li>
|
|
871
|
+
</ul>
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
| Class | Description |
|
|
875
|
+
|---|---|
|
|
876
|
+
| `.glass-list` | Grouped surface container |
|
|
877
|
+
| `.glass-list--flush` | Edge-to-edge variant (no side margin / radius). Assumes parent has `--gl-space-lg` horizontal padding. |
|
|
878
|
+
| `.glass-list--bare` | Strips background, border & shadow — for embedding inside `.glass-popover` or `.glass-card`. |
|
|
879
|
+
| `.glass-list__item` | List row (use `<li>`, `<a>`, or `<button>`) |
|
|
880
|
+
| `.glass-list__item--interactive` | Adds hover / focus / active states |
|
|
881
|
+
| `.glass-list__item--center` | Centered single-text variant with ellipsis truncation |
|
|
882
|
+
| `.glass-list__leading` | Leading slot (28×28, holds an icon SVG) |
|
|
883
|
+
| `.glass-list__content` | Flexible middle slot — takes remaining width, enables truncation |
|
|
884
|
+
| `.glass-list__title` | Primary text (medium weight, ellipsis) |
|
|
885
|
+
| `.glass-list__subtitle` | Secondary text (small, muted, ellipsis) |
|
|
886
|
+
| `.glass-list__trailing` | Trailing slot — chevron, value, button, badge |
|
|
887
|
+
|
|
888
|
+
**Notes:**
|
|
889
|
+
- Dividers are auto-rendered via `::after`. The last item never has a divider.
|
|
890
|
+
- Items **with** a `__leading` slot get an icon-aligned divider inset; items **without** a leading slot get a standard left/right padding inset (handled via `:has()`).
|
|
891
|
+
- SVG icon convention: `24px` for leading, `18px` for trailing, `stroke: currentColor`, `stroke-width: 2`.
|
|
892
|
+
- Use `<ul>` + `<li>` for semantic lists. For interactive rows wrap in `<a>` or `<button>` instead of `<li>` if a single-row list is needed.
|
|
893
|
+
|
|
894
|
+
---
|
|
895
|
+
|
|
896
|
+
### 3.25 Popover
|
|
897
|
+
|
|
898
|
+
Anchored dropdown / menu container. Wrap a trigger button and a `.glass-popover` inside a `.glass-popover-anchor`. Visibility is controlled via `.is-open` — toggling requires a tiny bit of JavaScript.
|
|
899
|
+
|
|
900
|
+
```html
|
|
901
|
+
<div class="glass-popover-anchor">
|
|
902
|
+
<button class="glass-btn glass-btn--secondary glass-btn--auto"
|
|
903
|
+
onclick="gkTogglePopover(this, event)">
|
|
904
|
+
Open menu
|
|
905
|
+
</button>
|
|
906
|
+
<div class="glass-popover">
|
|
907
|
+
<ul class="glass-list glass-list--bare">
|
|
908
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
909
|
+
<span class="glass-list__leading">
|
|
910
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
911
|
+
<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/>
|
|
912
|
+
<polyline points="16 6 12 2 8 6"/>
|
|
913
|
+
<line x1="12" y1="2" x2="12" y2="15"/>
|
|
914
|
+
</svg>
|
|
915
|
+
</span>
|
|
916
|
+
<div class="glass-list__content"><div class="glass-list__title">Share</div></div>
|
|
917
|
+
</li>
|
|
918
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
919
|
+
<div class="glass-list__content"><div class="glass-list__title">Duplicate</div></div>
|
|
920
|
+
</li>
|
|
921
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
922
|
+
<div class="glass-list__content"><div class="glass-list__title">Delete</div></div>
|
|
923
|
+
</li>
|
|
924
|
+
</ul>
|
|
925
|
+
</div>
|
|
926
|
+
</div>
|
|
927
|
+
|
|
928
|
+
<script>
|
|
929
|
+
// ⚠️ Do NOT name this function `togglePopover` — it collides with the
|
|
930
|
+
// native HTMLElement.togglePopover() method from the HTML Popover API.
|
|
931
|
+
function gkTogglePopover(btn, e) {
|
|
932
|
+
const popover = btn.nextElementSibling;
|
|
933
|
+
const wasOpen = popover.classList.contains('is-open');
|
|
934
|
+
document.querySelectorAll('.glass-popover.is-open')
|
|
935
|
+
.forEach(p => p.classList.remove('is-open'));
|
|
936
|
+
if (!wasOpen) popover.classList.add('is-open');
|
|
937
|
+
if (e) e.stopPropagation();
|
|
938
|
+
}
|
|
939
|
+
document.addEventListener('click', e => {
|
|
940
|
+
if (!e.target.closest('.glass-popover-anchor')) {
|
|
941
|
+
document.querySelectorAll('.glass-popover.is-open')
|
|
942
|
+
.forEach(p => p.classList.remove('is-open'));
|
|
943
|
+
}
|
|
944
|
+
});
|
|
945
|
+
</script>
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
| Class | Description |
|
|
949
|
+
|---|---|
|
|
950
|
+
| `.glass-popover-anchor` | Positioning context — wraps trigger + popover |
|
|
951
|
+
| `.glass-popover` | Floating glass surface, hidden until `.is-open` |
|
|
952
|
+
| `.glass-popover.is-open` | Visible state — fade + scale animation |
|
|
953
|
+
| `.glass-popover--top` | Opens upward (above the trigger) |
|
|
954
|
+
| `.glass-popover--start` | Aligns left edge with trigger |
|
|
955
|
+
| `.glass-popover--end` | Aligns right edge with trigger |
|
|
956
|
+
|
|
957
|
+
**Note:** name your toggle function anything except `togglePopover` — that name collides with the native `HTMLElement.togglePopover()` method (HTML Popover API) and inline `onclick` handlers will throw `NotSupportedError`. Use a prefix like `gkTogglePopover` or `myToggle`.
|
|
958
|
+
|
|
959
|
+
---
|
|
960
|
+
|
|
961
|
+
## 4. Utility Classes
|
|
962
|
+
|
|
963
|
+
### Stack (Vertical)
|
|
964
|
+
|
|
965
|
+
Flexbox column with gap.
|
|
824
966
|
|
|
825
967
|
```html
|
|
826
968
|
<div class="gl-stack gl-stack--md">
|
|
@@ -829,9 +971,9 @@ Flexbox-Column mit Gap.
|
|
|
829
971
|
</div>
|
|
830
972
|
```
|
|
831
973
|
|
|
832
|
-
|
|
|
974
|
+
| Class | Gap |
|
|
833
975
|
|---|---|
|
|
834
|
-
| `.gl-stack` |
|
|
976
|
+
| `.gl-stack` | Default |
|
|
835
977
|
| `.gl-stack--2xs` | 4px |
|
|
836
978
|
| `.gl-stack--xs` | 8px |
|
|
837
979
|
| `.gl-stack--sm` | 12px |
|
|
@@ -841,7 +983,7 @@ Flexbox-Column mit Gap.
|
|
|
841
983
|
|
|
842
984
|
### Row (Horizontal)
|
|
843
985
|
|
|
844
|
-
Flexbox
|
|
986
|
+
Flexbox row with gap.
|
|
845
987
|
|
|
846
988
|
```html
|
|
847
989
|
<div class="gl-row gl-row--sm">
|
|
@@ -850,16 +992,16 @@ Flexbox-Row mit Gap.
|
|
|
850
992
|
</div>
|
|
851
993
|
```
|
|
852
994
|
|
|
853
|
-
|
|
|
995
|
+
| Class | Gap |
|
|
854
996
|
|---|---|
|
|
855
|
-
| `.gl-row` |
|
|
997
|
+
| `.gl-row` | Default |
|
|
856
998
|
| `.gl-row--xs` | 8px |
|
|
857
999
|
| `.gl-row--sm` | 12px |
|
|
858
1000
|
| `.gl-row--md` | 16px |
|
|
859
1001
|
|
|
860
1002
|
### Margin
|
|
861
1003
|
|
|
862
|
-
|
|
|
1004
|
+
| Class | Value |
|
|
863
1005
|
|---|---|
|
|
864
1006
|
| `.gl-mt-sm` | margin-top: 12px |
|
|
865
1007
|
| `.gl-mt-md` | margin-top: 16px |
|
|
@@ -872,38 +1014,38 @@ Flexbox-Row mit Gap.
|
|
|
872
1014
|
|
|
873
1015
|
### Text
|
|
874
1016
|
|
|
875
|
-
|
|
|
1017
|
+
| Class | Description |
|
|
876
1018
|
|---|---|
|
|
877
1019
|
| `.gl-text-center` | text-align: center |
|
|
878
|
-
| `.gl-text-muted` |
|
|
879
|
-
| `.gl-text-sm` |
|
|
1020
|
+
| `.gl-text-muted` | Muted text color |
|
|
1021
|
+
| `.gl-text-sm` | Smaller font size |
|
|
880
1022
|
|
|
881
1023
|
### Layout
|
|
882
1024
|
|
|
883
|
-
|
|
|
1025
|
+
| Class | Description |
|
|
884
1026
|
|---|---|
|
|
885
|
-
| `.gl-px` |
|
|
1027
|
+
| `.gl-px` | Horizontal padding |
|
|
886
1028
|
| `.gl-w-full` | width: 100% |
|
|
887
1029
|
| `.gl-flex-1` | flex: 1 |
|
|
888
1030
|
|
|
889
1031
|
---
|
|
890
1032
|
|
|
891
|
-
## 5. State
|
|
1033
|
+
## 5. State Classes Overview
|
|
892
1034
|
|
|
893
|
-
| State
|
|
1035
|
+
| State Class | Used on | Description |
|
|
894
1036
|
|---|---|---|
|
|
895
|
-
| `.is-active` | `.glass-modal-overlay`, `.glass-tab-bar__item` | Element
|
|
896
|
-
| `.is-open` | `.glass-accordion__item` | Accordion
|
|
897
|
-
| `.is-visible` | `.glass-toast` | Toast
|
|
898
|
-
| `:checked` | Toggle, Checkbox, Radio (
|
|
899
|
-
| `:focus` | Input, Textarea, Select, Range | Focus
|
|
900
|
-
| `:disabled` | `.glass-input` |
|
|
1037
|
+
| `.is-active` | `.glass-modal-overlay`, `.glass-tab-bar__item` | Element is active/visible |
|
|
1038
|
+
| `.is-open` | `.glass-accordion__item`, `.glass-popover` | Accordion item expanded / popover visible |
|
|
1039
|
+
| `.is-visible` | `.glass-toast` | Toast is visible |
|
|
1040
|
+
| `:checked` | Toggle, Checkbox, Radio (on the input) | Native checked state |
|
|
1041
|
+
| `:focus` | Input, Textarea, Select, Range | Focus ring |
|
|
1042
|
+
| `:disabled` | `.glass-input` | Disabled input |
|
|
901
1043
|
|
|
902
1044
|
---
|
|
903
1045
|
|
|
904
1046
|
## 6. Composition Patterns
|
|
905
1047
|
|
|
906
|
-
### Login
|
|
1048
|
+
### Login Screen
|
|
907
1049
|
|
|
908
1050
|
```html
|
|
909
1051
|
<div class="glass-bg">
|
|
@@ -917,27 +1059,27 @@ Flexbox-Row mit Gap.
|
|
|
917
1059
|
</button>
|
|
918
1060
|
</nav>
|
|
919
1061
|
|
|
920
|
-
<h1 class="glass-title">
|
|
1062
|
+
<h1 class="glass-title">Sign In</h1>
|
|
921
1063
|
|
|
922
1064
|
<div class="gl-stack gl-stack--md">
|
|
923
1065
|
<div class="glass-input-group">
|
|
924
|
-
<label class="glass-label">
|
|
925
|
-
<input class="glass-input" type="email" placeholder="name@
|
|
1066
|
+
<label class="glass-label">Email</label>
|
|
1067
|
+
<input class="glass-input" type="email" placeholder="name@example.com">
|
|
926
1068
|
</div>
|
|
927
1069
|
<div class="glass-input-group">
|
|
928
|
-
<label class="glass-label">
|
|
1070
|
+
<label class="glass-label">Password</label>
|
|
929
1071
|
<input class="glass-input" type="password" placeholder="••••••••">
|
|
930
1072
|
</div>
|
|
931
1073
|
</div>
|
|
932
1074
|
|
|
933
1075
|
<div class="gl-stack gl-stack--sm gl-mt-lg">
|
|
934
|
-
<button class="glass-btn glass-btn--primary">
|
|
935
|
-
<button class="glass-btn glass-btn--tertiary">
|
|
1076
|
+
<button class="glass-btn glass-btn--primary">Log In</button>
|
|
1077
|
+
<button class="glass-btn glass-btn--tertiary">Forgot password?</button>
|
|
936
1078
|
</div>
|
|
937
1079
|
</div>
|
|
938
1080
|
```
|
|
939
1081
|
|
|
940
|
-
### Dashboard
|
|
1082
|
+
### Dashboard with Cards
|
|
941
1083
|
|
|
942
1084
|
```html
|
|
943
1085
|
<div class="glass-bg glass-bg--has-tab-bar">
|
|
@@ -953,35 +1095,35 @@ Flexbox-Row mit Gap.
|
|
|
953
1095
|
<div class="glass-card__icon">
|
|
954
1096
|
<svg viewBox="0 0 64 64"><!-- Icon --></svg>
|
|
955
1097
|
</div>
|
|
956
|
-
<p class="glass-card__text">
|
|
1098
|
+
<p class="glass-card__text">Capture and upload documents.</p>
|
|
957
1099
|
</div>
|
|
958
1100
|
|
|
959
1101
|
<div class="glass-card glass-card--glow">
|
|
960
1102
|
<div class="glass-card__icon">
|
|
961
1103
|
<svg viewBox="0 0 64 64"><!-- Icon --></svg>
|
|
962
1104
|
</div>
|
|
963
|
-
<p class="glass-card__text">
|
|
1105
|
+
<p class="glass-card__text">Manage and archive contracts.</p>
|
|
964
1106
|
</div>
|
|
965
1107
|
</div>
|
|
966
1108
|
|
|
967
1109
|
<nav class="glass-tab-bar">
|
|
968
1110
|
<button class="glass-tab-bar__item is-active">
|
|
969
1111
|
<span class="glass-tab-bar__icon"><svg viewBox="0 0 24 24"><!-- Home --></svg></span>
|
|
970
|
-
<span class="glass-tab-bar__label">
|
|
1112
|
+
<span class="glass-tab-bar__label">Home</span>
|
|
971
1113
|
</button>
|
|
972
1114
|
<button class="glass-tab-bar__item">
|
|
973
1115
|
<span class="glass-tab-bar__icon"><svg viewBox="0 0 24 24"><!-- Docs --></svg></span>
|
|
974
|
-
<span class="glass-tab-bar__label">
|
|
1116
|
+
<span class="glass-tab-bar__label">Contracts</span>
|
|
975
1117
|
</button>
|
|
976
1118
|
<button class="glass-tab-bar__item">
|
|
977
1119
|
<span class="glass-tab-bar__icon"><svg viewBox="0 0 24 24"><!-- Profile --></svg></span>
|
|
978
|
-
<span class="glass-tab-bar__label">
|
|
1120
|
+
<span class="glass-tab-bar__label">Profile</span>
|
|
979
1121
|
</button>
|
|
980
1122
|
</nav>
|
|
981
1123
|
</div>
|
|
982
1124
|
```
|
|
983
1125
|
|
|
984
|
-
###
|
|
1126
|
+
### Form Page
|
|
985
1127
|
|
|
986
1128
|
```html
|
|
987
1129
|
<div class="glass-bg">
|
|
@@ -991,63 +1133,63 @@ Flexbox-Row mit Gap.
|
|
|
991
1133
|
</button>
|
|
992
1134
|
</nav>
|
|
993
1135
|
|
|
994
|
-
<h1 class="glass-title">
|
|
1136
|
+
<h1 class="glass-title">New Contract</h1>
|
|
995
1137
|
|
|
996
1138
|
<div class="gl-stack gl-stack--md">
|
|
997
1139
|
<div class="glass-input-group">
|
|
998
|
-
<label class="glass-label">
|
|
999
|
-
<input class="glass-input" type="text" placeholder="
|
|
1140
|
+
<label class="glass-label">Contract Name</label>
|
|
1141
|
+
<input class="glass-input" type="text" placeholder="e.g. Rental Agreement">
|
|
1000
1142
|
</div>
|
|
1001
1143
|
|
|
1002
1144
|
<div class="glass-input-group">
|
|
1003
|
-
<label class="glass-label">
|
|
1145
|
+
<label class="glass-label">Category</label>
|
|
1004
1146
|
<select class="glass-select">
|
|
1005
|
-
<option>
|
|
1006
|
-
<option>
|
|
1007
|
-
<option>
|
|
1008
|
-
<option>
|
|
1147
|
+
<option>Please select…</option>
|
|
1148
|
+
<option>Insurance</option>
|
|
1149
|
+
<option>Rental Agreement</option>
|
|
1150
|
+
<option>Employment Contract</option>
|
|
1009
1151
|
</select>
|
|
1010
1152
|
</div>
|
|
1011
1153
|
|
|
1012
1154
|
<div class="glass-input-group">
|
|
1013
|
-
<label class="glass-label">
|
|
1014
|
-
<textarea class="glass-textarea" placeholder="
|
|
1155
|
+
<label class="glass-label">Notes</label>
|
|
1156
|
+
<textarea class="glass-textarea" placeholder="Optional notes…"></textarea>
|
|
1015
1157
|
</div>
|
|
1016
1158
|
|
|
1017
1159
|
<label class="glass-toggle">
|
|
1018
1160
|
<input class="glass-toggle__input" type="checkbox">
|
|
1019
1161
|
<span class="glass-toggle__track"><span class="glass-toggle__thumb"></span></span>
|
|
1020
|
-
<span class="glass-toggle__label">
|
|
1162
|
+
<span class="glass-toggle__label">Enable reminder</span>
|
|
1021
1163
|
</label>
|
|
1022
1164
|
|
|
1023
1165
|
<hr class="glass-divider">
|
|
1024
1166
|
|
|
1025
|
-
<button class="glass-btn glass-btn--primary">
|
|
1026
|
-
<button class="glass-btn glass-btn--tertiary">
|
|
1167
|
+
<button class="glass-btn glass-btn--primary">Save</button>
|
|
1168
|
+
<button class="glass-btn glass-btn--tertiary">Cancel</button>
|
|
1027
1169
|
</div>
|
|
1028
1170
|
</div>
|
|
1029
1171
|
```
|
|
1030
1172
|
|
|
1031
|
-
###
|
|
1173
|
+
### Delete Confirmation (Modal)
|
|
1032
1174
|
|
|
1033
1175
|
```html
|
|
1034
1176
|
<div class="glass-modal-overlay is-active">
|
|
1035
1177
|
<div class="glass-modal">
|
|
1036
1178
|
<div class="glass-modal__header">
|
|
1037
|
-
<h2 class="glass-modal__title">
|
|
1179
|
+
<h2 class="glass-modal__title">Delete contract?</h2>
|
|
1038
1180
|
</div>
|
|
1039
1181
|
<div class="glass-modal__body">
|
|
1040
|
-
<p>
|
|
1182
|
+
<p>Do you want to permanently delete this contract? This action cannot be undone.</p>
|
|
1041
1183
|
</div>
|
|
1042
1184
|
<div class="glass-modal__footer">
|
|
1043
|
-
<button class="glass-modal__action" onclick="closeModal()">
|
|
1044
|
-
<button class="glass-modal__action glass-modal__action--danger" onclick="deleteContract()">
|
|
1185
|
+
<button class="glass-modal__action" onclick="closeModal()">Cancel</button>
|
|
1186
|
+
<button class="glass-modal__action glass-modal__action--danger" onclick="deleteContract()">Delete</button>
|
|
1045
1187
|
</div>
|
|
1046
1188
|
</div>
|
|
1047
1189
|
</div>
|
|
1048
1190
|
```
|
|
1049
1191
|
|
|
1050
|
-
### Settings
|
|
1192
|
+
### Settings Page
|
|
1051
1193
|
|
|
1052
1194
|
```html
|
|
1053
1195
|
<div class="glass-bg">
|
|
@@ -1057,13 +1199,13 @@ Flexbox-Row mit Gap.
|
|
|
1057
1199
|
</button>
|
|
1058
1200
|
</nav>
|
|
1059
1201
|
|
|
1060
|
-
<h1 class="glass-title">
|
|
1202
|
+
<h1 class="glass-title">Settings</h1>
|
|
1061
1203
|
|
|
1062
1204
|
<div class="gl-stack gl-stack--md">
|
|
1063
1205
|
<label class="glass-toggle">
|
|
1064
1206
|
<input class="glass-toggle__input" type="checkbox" checked>
|
|
1065
1207
|
<span class="glass-toggle__track"><span class="glass-toggle__thumb"></span></span>
|
|
1066
|
-
<span class="glass-toggle__label">Push
|
|
1208
|
+
<span class="glass-toggle__label">Push Notifications</span>
|
|
1067
1209
|
</label>
|
|
1068
1210
|
|
|
1069
1211
|
<hr class="glass-divider">
|
|
@@ -1071,14 +1213,14 @@ Flexbox-Row mit Gap.
|
|
|
1071
1213
|
<label class="glass-toggle">
|
|
1072
1214
|
<input class="glass-toggle__input" type="checkbox">
|
|
1073
1215
|
<span class="glass-toggle__track"><span class="glass-toggle__thumb"></span></span>
|
|
1074
|
-
<span class="glass-toggle__label">
|
|
1216
|
+
<span class="glass-toggle__label">Dark Mode</span>
|
|
1075
1217
|
</label>
|
|
1076
1218
|
|
|
1077
1219
|
<hr class="glass-divider">
|
|
1078
1220
|
|
|
1079
1221
|
<div class="glass-range-group">
|
|
1080
1222
|
<div class="glass-range-header">
|
|
1081
|
-
<label class="glass-label">
|
|
1223
|
+
<label class="glass-label">Font Size</label>
|
|
1082
1224
|
<span class="glass-range-value">100%</span>
|
|
1083
1225
|
</div>
|
|
1084
1226
|
<input class="glass-range" type="range" min="80" max="150" value="100">
|
|
@@ -1089,14 +1231,14 @@ Flexbox-Row mit Gap.
|
|
|
1089
1231
|
<div class="glass-accordion">
|
|
1090
1232
|
<div class="glass-accordion__item">
|
|
1091
1233
|
<button class="glass-accordion__trigger" onclick="this.parentElement.classList.toggle('is-open')">
|
|
1092
|
-
<span>
|
|
1234
|
+
<span>Advanced Settings</span>
|
|
1093
1235
|
<span class="glass-accordion__trigger-icon">
|
|
1094
1236
|
<svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
|
|
1095
1237
|
</span>
|
|
1096
1238
|
</button>
|
|
1097
1239
|
<div class="glass-accordion__content">
|
|
1098
1240
|
<div class="glass-accordion__body">
|
|
1099
|
-
|
|
1241
|
+
Advanced options go here…
|
|
1100
1242
|
</div>
|
|
1101
1243
|
</div>
|
|
1102
1244
|
</div>
|
|
@@ -1105,7 +1247,123 @@ Flexbox-Row mit Gap.
|
|
|
1105
1247
|
</div>
|
|
1106
1248
|
```
|
|
1107
1249
|
|
|
1108
|
-
###
|
|
1250
|
+
### iOS-style Settings Screen (List + Popover)
|
|
1251
|
+
|
|
1252
|
+
A grouped settings screen using `glass-list` for the rows and `glass-popover` for an inline action menu. Reproduces the layout of native iOS Settings screens.
|
|
1253
|
+
|
|
1254
|
+
```html
|
|
1255
|
+
<div class="glass-bg">
|
|
1256
|
+
<nav class="glass-nav">
|
|
1257
|
+
<button class="glass-pill">
|
|
1258
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1259
|
+
<polyline points="15 18 9 12 15 6"/>
|
|
1260
|
+
</svg>
|
|
1261
|
+
</button>
|
|
1262
|
+
<h1 class="glass-title">Settings</h1>
|
|
1263
|
+
|
|
1264
|
+
<!-- Inline action menu (popover) -->
|
|
1265
|
+
<div class="glass-popover-anchor">
|
|
1266
|
+
<button class="glass-pill" onclick="gkTogglePopover(this, event)" aria-label="More">
|
|
1267
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1268
|
+
<circle cx="12" cy="5" r="1.5" fill="currentColor"/>
|
|
1269
|
+
<circle cx="12" cy="12" r="1.5" fill="currentColor"/>
|
|
1270
|
+
<circle cx="12" cy="19" r="1.5" fill="currentColor"/>
|
|
1271
|
+
</svg>
|
|
1272
|
+
</button>
|
|
1273
|
+
<div class="glass-popover glass-popover--end">
|
|
1274
|
+
<ul class="glass-list glass-list--bare">
|
|
1275
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
1276
|
+
<div class="glass-list__content"><div class="glass-list__title">Edit profile</div></div>
|
|
1277
|
+
</li>
|
|
1278
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
1279
|
+
<div class="glass-list__content"><div class="glass-list__title">Sign out</div></div>
|
|
1280
|
+
</li>
|
|
1281
|
+
</ul>
|
|
1282
|
+
</div>
|
|
1283
|
+
</div>
|
|
1284
|
+
</nav>
|
|
1285
|
+
|
|
1286
|
+
<!-- Account section -->
|
|
1287
|
+
<p class="gl-text-muted gl-text-sm gl-mb-sm">ACCOUNT</p>
|
|
1288
|
+
<ul class="glass-list gl-mb-lg">
|
|
1289
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
1290
|
+
<span class="glass-list__leading">
|
|
1291
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1292
|
+
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/>
|
|
1293
|
+
<circle cx="12" cy="7" r="4"/>
|
|
1294
|
+
</svg>
|
|
1295
|
+
</span>
|
|
1296
|
+
<div class="glass-list__content">
|
|
1297
|
+
<div class="glass-list__title">Marcel Jungherz</div>
|
|
1298
|
+
<div class="glass-list__subtitle">marcel@jungherz.com</div>
|
|
1299
|
+
</div>
|
|
1300
|
+
<div class="glass-list__trailing">
|
|
1301
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1302
|
+
<polyline points="9 18 15 12 9 6"/>
|
|
1303
|
+
</svg>
|
|
1304
|
+
</div>
|
|
1305
|
+
</li>
|
|
1306
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
1307
|
+
<span class="glass-list__leading">
|
|
1308
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1309
|
+
<rect x="2" y="5" width="20" height="14" rx="2"/>
|
|
1310
|
+
<line x1="2" y1="10" x2="22" y2="10"/>
|
|
1311
|
+
</svg>
|
|
1312
|
+
</span>
|
|
1313
|
+
<div class="glass-list__content">
|
|
1314
|
+
<div class="glass-list__title">Subscriptions</div>
|
|
1315
|
+
</div>
|
|
1316
|
+
<div class="glass-list__trailing">
|
|
1317
|
+
$34.94
|
|
1318
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1319
|
+
<polyline points="9 18 15 12 9 6"/>
|
|
1320
|
+
</svg>
|
|
1321
|
+
</div>
|
|
1322
|
+
</li>
|
|
1323
|
+
</ul>
|
|
1324
|
+
|
|
1325
|
+
<!-- Notifications section -->
|
|
1326
|
+
<p class="gl-text-muted gl-text-sm gl-mb-sm">NOTIFICATIONS</p>
|
|
1327
|
+
<ul class="glass-list gl-mb-lg">
|
|
1328
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
1329
|
+
<span class="glass-list__leading">
|
|
1330
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1331
|
+
<path d="M18 8a6 6 0 1 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"/>
|
|
1332
|
+
<path d="M13.73 21a2 2 0 0 1-3.46 0"/>
|
|
1333
|
+
</svg>
|
|
1334
|
+
</span>
|
|
1335
|
+
<div class="glass-list__content"><div class="glass-list__title">Push notifications</div></div>
|
|
1336
|
+
<div class="glass-list__trailing">On</div>
|
|
1337
|
+
</li>
|
|
1338
|
+
<li class="glass-list__item glass-list__item--interactive">
|
|
1339
|
+
<span class="glass-list__leading">
|
|
1340
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1341
|
+
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>
|
|
1342
|
+
<polyline points="22 6 12 13 2 6"/>
|
|
1343
|
+
</svg>
|
|
1344
|
+
</span>
|
|
1345
|
+
<div class="glass-list__content"><div class="glass-list__title">Email digest</div></div>
|
|
1346
|
+
<div class="glass-list__trailing">Weekly</div>
|
|
1347
|
+
</li>
|
|
1348
|
+
<li class="glass-list__item glass-list__item--center glass-list__item--interactive">
|
|
1349
|
+
Reset to defaults
|
|
1350
|
+
</li>
|
|
1351
|
+
</ul>
|
|
1352
|
+
</div>
|
|
1353
|
+
```
|
|
1354
|
+
|
|
1355
|
+
Key points in this composition:
|
|
1356
|
+
|
|
1357
|
+
- **Two grouped sections** — labeled by small uppercase muted text above each list, matching iOS settings.
|
|
1358
|
+
- **Auto-dividers** — no `<hr>` between rows; the `::after` pseudo-element handles them.
|
|
1359
|
+
- **Mixed trailing types** — chevron, value text, value + chevron, all in the same list.
|
|
1360
|
+
- **Centered destructive action** — last item uses `--center` for a "Reset to defaults" style row, gets a full-width divider above (no leading icon → standard padding inset).
|
|
1361
|
+
- **Popover in nav** — `glass-popover--end` aligns the menu to the right edge of the trigger so it doesn't overflow the viewport.
|
|
1362
|
+
- **Bare list inside popover** — `glass-list--bare` strips the inner glass surface so the popover stays the only glass layer.
|
|
1363
|
+
|
|
1364
|
+
---
|
|
1365
|
+
|
|
1366
|
+
### Progress + Toast
|
|
1109
1367
|
|
|
1110
1368
|
```html
|
|
1111
1369
|
<!-- Progress -->
|
|
@@ -1119,55 +1377,62 @@ Flexbox-Row mit Gap.
|
|
|
1119
1377
|
</div>
|
|
1120
1378
|
</div>
|
|
1121
1379
|
|
|
1122
|
-
<!-- Toast (
|
|
1380
|
+
<!-- Toast (shown via JS) -->
|
|
1123
1381
|
<div class="glass-toast glass-toast--success is-visible">
|
|
1124
1382
|
<svg class="glass-toast__icon" viewBox="0 0 24 24">
|
|
1125
1383
|
<polyline points="20 6 9 17 4 12"/>
|
|
1126
1384
|
</svg>
|
|
1127
|
-
<span class="glass-toast__text">Upload
|
|
1385
|
+
<span class="glass-toast__text">Upload successful!</span>
|
|
1128
1386
|
</div>
|
|
1129
1387
|
```
|
|
1130
1388
|
|
|
1131
1389
|
---
|
|
1132
1390
|
|
|
1133
|
-
## 7.
|
|
1391
|
+
## 7. Rules & Common Mistakes
|
|
1134
1392
|
|
|
1135
|
-
### ✅
|
|
1393
|
+
### ✅ Always follow
|
|
1136
1394
|
|
|
1137
|
-
1. **`glass-bg`
|
|
1138
|
-
2. **`glass-bg--has-tab-bar`** –
|
|
1139
|
-
3. **Buttons
|
|
1140
|
-
4. **
|
|
1141
|
-
5. **
|
|
1142
|
-
- `is-active` →
|
|
1143
|
-
- `is-active` →
|
|
1144
|
-
- `is-open` →
|
|
1145
|
-
- `is-
|
|
1146
|
-
|
|
1147
|
-
|
|
1395
|
+
1. **`glass-bg` as outermost container** – Without the background wrapper, the aurora background is missing and glass effects won't render correctly.
|
|
1396
|
+
2. **`glass-bg--has-tab-bar`** – When a tab bar is present, this modifier must be set on `glass-bg`, otherwise the tab bar covers the bottom content.
|
|
1397
|
+
3. **Buttons are full-width** – `glass-btn` has `width: 100%`. Always add `glass-btn--auto` for inline buttons.
|
|
1398
|
+
4. **Wrap inputs in `glass-input-group`** – For correct label/hint spacing.
|
|
1399
|
+
5. **Place state classes correctly:**
|
|
1400
|
+
- `is-active` → on `.glass-modal-overlay` (not on `.glass-modal`)
|
|
1401
|
+
- `is-active` → on `.glass-tab-bar__item`
|
|
1402
|
+
- `is-open` → on `.glass-accordion__item`
|
|
1403
|
+
- `is-open` → on `.glass-popover` (not on the trigger or anchor)
|
|
1404
|
+
- `is-visible` → on `.glass-toast`
|
|
1405
|
+
6. **SVG icons** – GlassKit uses inline SVGs (stroke-based, not fill). Typical attributes: `viewBox="0 0 24 24"`, stroke via `currentColor`.
|
|
1406
|
+
7. **`data-theme`** – Always set on `<html>`, never on `<body>` or deeper elements.
|
|
1407
|
+
8. **List dividers are automatic** – Never add a `<hr>` or divider element between `.glass-list__item`s. The divider is rendered via `::after` and respects `:has(.glass-list__leading)` for the inset.
|
|
1408
|
+
9. **Popover toggle naming** – Never name your popover toggle JS function `togglePopover`. It collides with the native `HTMLElement.togglePopover()` method. Use a prefix like `gkTogglePopover`.
|
|
1148
1409
|
|
|
1149
|
-
### ❌
|
|
1410
|
+
### ❌ Common Mistakes
|
|
1150
1411
|
|
|
1151
|
-
|
|
|
1412
|
+
| Mistake | Correction |
|
|
1152
1413
|
|---|---|
|
|
1153
|
-
| `is-active`
|
|
1154
|
-
| `glass-btn`
|
|
1155
|
-
| Inputs
|
|
1156
|
-
| `glass-tab-bar`
|
|
1157
|
-
| `data-theme`
|
|
1158
|
-
| Progress
|
|
1159
|
-
| Toggle
|
|
1414
|
+
| `is-active` on `.glass-modal` instead of `.glass-modal-overlay` | Set `is-active` on the overlay |
|
|
1415
|
+
| `glass-btn` without variant (`--primary` etc.) | Always specify a variant |
|
|
1416
|
+
| Inputs without `glass-input-group` wrapper | Wrap in `glass-input-group` |
|
|
1417
|
+
| `glass-tab-bar` without `glass-bg--has-tab-bar` | Add modifier to the background container |
|
|
1418
|
+
| `data-theme` on `<body>` | Set on `<html>` |
|
|
1419
|
+
| Progress width via class instead of inline style | Use `style="width: X%"` on `.glass-progress__fill` |
|
|
1420
|
+
| Toggle without `__track > __thumb` nesting | Follow correct BEM hierarchy |
|
|
1421
|
+
| Manually adding `<hr>` or divider element between `.glass-list__item`s | Remove it — dividers are automatic via `::after` |
|
|
1422
|
+
| Putting `glass-list` inside `glass-popover` without `--bare` | Add `.glass-list--bare` to strip the double glass surface |
|
|
1423
|
+
| JS function named `togglePopover()` | Rename to `gkTogglePopover()` or similar to avoid native API clash |
|
|
1424
|
+
| Putting `.is-open` on the trigger button instead of `.glass-popover` | The state class belongs on the popover element |
|
|
1160
1425
|
|
|
1161
1426
|
---
|
|
1162
1427
|
|
|
1163
|
-
## 8.
|
|
1428
|
+
## 8. Quick Class Reference
|
|
1164
1429
|
|
|
1165
|
-
|
|
|
1430
|
+
| Component | Base Class | Modifiers / States |
|
|
1166
1431
|
|---|---|---|
|
|
1167
1432
|
| Background | `.glass-bg` | `--has-tab-bar` |
|
|
1168
1433
|
| Navigation | `.glass-nav` | – |
|
|
1169
|
-
| Pill
|
|
1170
|
-
| Theme
|
|
1434
|
+
| Pill Button | `.glass-pill` | – |
|
|
1435
|
+
| Theme Toggle | `.glass-theme-toggle` | – |
|
|
1171
1436
|
| Title | `.glass-title` | – |
|
|
1172
1437
|
| Card | `.glass-card` | `--glow` |
|
|
1173
1438
|
| Button | `.glass-btn` | `--primary`, `--secondary`, `--tertiary`, `--sm`, `--lg`, `--auto` |
|
|
@@ -1189,14 +1454,16 @@ Flexbox-Row mit Gap.
|
|
|
1189
1454
|
| Progress | `.glass-progress` | `--sm`, `--lg`, `--success`, `--error` |
|
|
1190
1455
|
| Modal | `.glass-modal-overlay` | `.is-active` |
|
|
1191
1456
|
| Toast | `.glass-toast` | `--success`, `--error`, `--warning`, `.is-visible` |
|
|
1192
|
-
| Tab
|
|
1193
|
-
| Accordion | `.glass-accordion` | `.is-open`
|
|
1457
|
+
| Tab Bar | `.glass-tab-bar` | `.is-active` on items |
|
|
1458
|
+
| Accordion | `.glass-accordion` | `.is-open` on items |
|
|
1459
|
+
| List | `.glass-list` | `--flush`, `--bare`, `__item--interactive`, `__item--center` |
|
|
1460
|
+
| Popover | `.glass-popover` | `--top`, `--start`, `--end`, `.is-open` |
|
|
1194
1461
|
|
|
1195
1462
|
---
|
|
1196
1463
|
|
|
1197
1464
|
## 9. Web Components / Shadow DOM
|
|
1198
1465
|
|
|
1199
|
-
GlassKit
|
|
1466
|
+
GlassKit ships a Constructable Stylesheet for Shadow DOM usage:
|
|
1200
1467
|
|
|
1201
1468
|
```js
|
|
1202
1469
|
import { glassSheet } from '@jungherz-de/glasskit/glasskit-styles.js';
|
|
@@ -1216,18 +1483,18 @@ class MyCard extends HTMLElement {
|
|
|
1216
1483
|
customElements.define('my-card', MyCard);
|
|
1217
1484
|
```
|
|
1218
1485
|
|
|
1219
|
-
| Export |
|
|
1486
|
+
| Export | Type | Description |
|
|
1220
1487
|
|---|---|---|
|
|
1221
|
-
| `glassSheet` | `CSSStyleSheet` | Constructable Stylesheet
|
|
1222
|
-
| `css` | `string` | CSS
|
|
1488
|
+
| `glassSheet` | `CSSStyleSheet` | Constructable Stylesheet for `adoptedStyleSheets` |
|
|
1489
|
+
| `css` | `string` | CSS as string (fallback) |
|
|
1223
1490
|
|
|
1224
|
-
**
|
|
1491
|
+
**Note:** CSS Custom Properties (`--gl-*`) penetrate the shadow boundary automatically. Theme switching works globally.
|
|
1225
1492
|
|
|
1226
1493
|
---
|
|
1227
1494
|
|
|
1228
1495
|
## 10. Custom Theming
|
|
1229
1496
|
|
|
1230
|
-
|
|
1497
|
+
Load custom brand colors via `theme-override.css` after the base library:
|
|
1231
1498
|
|
|
1232
1499
|
```css
|
|
1233
1500
|
:root {
|
|
@@ -1244,8 +1511,8 @@ Eigene Markenfarben über `theme-override.css` nach der Basis-Library laden:
|
|
|
1244
1511
|
}
|
|
1245
1512
|
```
|
|
1246
1513
|
|
|
1247
|
-
|
|
1514
|
+
Included theme templates in `theme-override.css`:
|
|
1248
1515
|
- 🔵 Ocean Blue
|
|
1249
1516
|
- 🟢 Emerald Green
|
|
1250
1517
|
- 🌹 Rose
|
|
1251
|
-
- 🎨 Custom (
|
|
1518
|
+
- 🎨 Custom (empty, ready to fill)
|