@jungherz-de/glasskit 1.3.3 → 1.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/SKILL.md ADDED
@@ -0,0 +1,1251 @@
1
+ ---
2
+ name: glasskit-css
3
+ description: GlassKit is a pure CSS glassmorphism component library (v1.3.5) with 22 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
+ ---
5
+
6
+ # GlassKit CSS – AI Component Reference
7
+
8
+ > **Purpose:** This document is an AI-optimized reference for generating correct GlassKit HTML markup.
9
+ > It replaces the need to parse `docs.html` and provides copy-paste-ready structures, rules, and composition patterns.
10
+
11
+ ---
12
+
13
+ ## 1. Setup & Grundgerüst
14
+
15
+ ### Einbindung
16
+
17
+ ```html
18
+ <!-- CDN (empfohlen) -->
19
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/glasskit@1.3/glasskit.min.css">
20
+
21
+ <!-- Lokal -->
22
+ <link rel="stylesheet" href="glasskit.css">
23
+
24
+ <!-- Optional: Custom Theme danach laden -->
25
+ <link rel="stylesheet" href="theme-override.css">
26
+ ```
27
+
28
+ ### Minimal-Template
29
+
30
+ ```html
31
+ <!DOCTYPE html>
32
+ <html lang="de" data-theme="dark">
33
+ <head>
34
+ <meta charset="UTF-8">
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.3/glasskit.min.css">
37
+ </head>
38
+ <body>
39
+ <div class="glass-bg">
40
+ <!-- Alle Inhalte hier -->
41
+ </div>
42
+ </body>
43
+ </html>
44
+ ```
45
+
46
+ ### Namenskonvention
47
+
48
+ - **Prefix:** Alle Komponenten nutzen `glass-` (z.B. `glass-card`, `glass-btn`)
49
+ - **Utilities:** Nutzen `gl-` (z.B. `gl-stack`, `gl-row`, `gl-mt-md`)
50
+ - **BEM-Logik:** `glass-component__element--modifier`
51
+ - Element: `glass-card__text`, `glass-modal__header`
52
+ - Modifier: `glass-btn--primary`, `glass-avatar--lg`
53
+ - **State-Klassen:** `is-active`, `is-open`, `is-visible` (nicht BEM, sondern eigenständig)
54
+
55
+ ### Theming
56
+
57
+ Das Theme wird über `data-theme` auf `<html>` gesteuert:
58
+
59
+ ```html
60
+ <!-- Dark Mode (Standard) -->
61
+ <html data-theme="dark">
62
+
63
+ <!-- Light Mode -->
64
+ <html data-theme="light">
65
+ ```
66
+
67
+ Theme-Wechsel per JavaScript:
68
+
69
+ ```js
70
+ function toggleTheme() {
71
+ const html = document.documentElement;
72
+ const current = html.getAttribute('data-theme');
73
+ html.setAttribute('data-theme', current === 'dark' ? 'light' : 'dark');
74
+ }
75
+ ```
76
+
77
+ ---
78
+
79
+ ## 2. Design Tokens
80
+
81
+ Alle visuellen Werte werden über CSS Custom Properties gesteuert. Für Custom-Theming können diese in einer `theme-override.css` überschrieben werden.
82
+
83
+ ### Farben
84
+
85
+ | Token | Dark | Light | Verwendung |
86
+ |---|---|---|---|
87
+ | `--gl-color-primary` | `#f5a623` | `#e8852d` | Primärfarbe, Buttons, aktive Elemente |
88
+ | `--gl-color-primary-dark` | `#d4692a` | `#c96a1e` | Gradient-Endwert |
89
+ | `--gl-color-primary-mid` | `#e07a24` | `#d97826` | Gradient-Mitte |
90
+ | `--gl-color-text` | `#ffffff` | `#1a2a36` | Standard-Textfarbe |
91
+ | `--gl-color-text-muted` | `rgba(255,255,255,0.60)` | `rgba(26,42,54,0.55)` | Sekundärer Text |
92
+ | `--gl-color-text-heading` | `#ffffff` | `#0f1f2a` | Überschriften |
93
+ | `--gl-color-success` | `#34c759` | `#28a745` | Erfolg |
94
+ | `--gl-color-error` | `#ff3b30` | `#dc3545` | Fehler |
95
+ | `--gl-color-warning` | `#ffcc00` | `#e6a800` | Warnung |
96
+
97
+ ### Glas-Oberflächen
98
+
99
+ | Token | Dark | Verwendung |
100
+ |---|---|---|
101
+ | `--gl-surface-1` | `rgba(255,255,255, 0.08)` | Subtilste Oberfläche (Status) |
102
+ | `--gl-surface-2` | `rgba(255,255,255, 0.10)` | Standard (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)` | Starker Hover |
106
+ | `--gl-surface-milk` | `rgba(255,255,255, 0.55)` | Milchig |
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
+
110
+ ### Borders
111
+
112
+ | Token | Wert |
113
+ |---|---|
114
+ | `--gl-border-subtle` | `rgba(255,255,255, 0.18)` |
115
+ | `--gl-border-medium` | `rgba(255,255,255, 0.30)` |
116
+ | `--gl-border-strong` | `rgba(255,255,255, 0.40)` |
117
+ | `--gl-border-milk` | `rgba(255,255,255, 0.60)` |
118
+ | `--gl-border-warm` | `rgba(255,200,100, 0.35)` |
119
+ | `--gl-border-focus` | `rgba(245,166,35, 0.60)` |
120
+
121
+ ### Blur
122
+
123
+ | Token | Wert |
124
+ |---|---|
125
+ | `--gl-blur` | `24px` (Standard) |
126
+ | `--gl-blur-light` | `16px` |
127
+ | `--gl-blur-soft` | `12px` |
128
+ | `--gl-blur-heavy` | `40px` |
129
+
130
+ ### Radii
131
+
132
+ | Token | Wert | Verwendung |
133
+ |---|---|---|
134
+ | `--gl-radius-xs` | `8px` | Kleine Elemente |
135
+ | `--gl-radius-sm` | `12px` | Badges, kleine Container |
136
+ | `--gl-radius-input` | `14px` | Inputs, Textareas |
137
+ | `--gl-radius-btn` | `16px` | Buttons |
138
+ | `--gl-radius-card` | `24px` | Cards |
139
+ | `--gl-radius-full` | `9999px` | Komplett rund |
140
+ | `--gl-radius-pill` | `50%` | Kreisform |
141
+
142
+ ### Spacing
143
+
144
+ | Token | Wert |
145
+ |---|---|
146
+ | `--gl-space-2xs` | `4px` |
147
+ | `--gl-space-xs` | `8px` |
148
+ | `--gl-space-sm` | `12px` |
149
+ | `--gl-space-md` | `16px` |
150
+ | `--gl-space-lg` | `20px` |
151
+ | `--gl-space-xl` | `24px` |
152
+ | `--gl-space-2xl` | `32px` |
153
+ | `--gl-space-3xl` | `40px` |
154
+ | `--gl-space-4xl` | `56px` |
155
+
156
+ ### Shadows
157
+
158
+ | Token | Verwendung |
159
+ |---|---|
160
+ | `--gl-shadow-card` | Cards |
161
+ | `--gl-shadow-btn` | Standard-Buttons |
162
+ | `--gl-shadow-btn-primary` | Primary Button (orange glow) |
163
+ | `--gl-shadow-glow` | Glow-Effekt |
164
+ | `--gl-shadow-modal` | Modal-Dialog |
165
+ | `--gl-shadow-toast` | Toast-Benachrichtigungen |
166
+ | `--gl-shadow-focus` | Focus-Ring |
167
+
168
+ ### Typography
169
+
170
+ | Token | Wert |
171
+ |---|---|
172
+ | `--gl-font-size-xs` | `13px` |
173
+ | `--gl-font-size-sm` | `14px` |
174
+ | `--gl-font-size-base` | `15px` |
175
+ | `--gl-font-size-btn` | `16px` |
176
+ | `--gl-font-size-lg` | `18px` |
177
+ | `--gl-font-size-title` | `24px` |
178
+ | `--gl-font-size-modal` | `20px` |
179
+ | `--gl-font-weight-normal` | `400` |
180
+ | `--gl-font-weight-medium` | `500` |
181
+ | `--gl-font-weight-semibold` | `600` |
182
+
183
+ ---
184
+
185
+ ## 3. Komponenten-Katalog
186
+
187
+ ### 3.1 Background
188
+
189
+ Das äußerste Container-Element. Erzeugt den Aurora-Hintergrund mit Lichteffekten. **Muss immer als Wrapper für alle Inhalte verwendet werden.**
190
+
191
+ ```html
192
+ <div class="glass-bg">
193
+ <!-- Alle Inhalte hier -->
194
+ </div>
195
+ ```
196
+
197
+ Mit Tab-Bar (fügt unten Padding hinzu):
198
+
199
+ ```html
200
+ <div class="glass-bg glass-bg--has-tab-bar">
201
+ <!-- Inhalte -->
202
+ <nav class="glass-tab-bar">...</nav>
203
+ </div>
204
+ ```
205
+
206
+ | Klasse | Beschreibung |
207
+ |---|---|
208
+ | `.glass-bg` | Vollflächiger Hintergrund mit Aurora-Lichteffekten |
209
+ | `.glass-bg--has-tab-bar` | Modifier: Bottom-Padding für Tab-Bar (82px) |
210
+
211
+ ---
212
+
213
+ ### 3.2 Navigation Bar
214
+
215
+ Transparente Navigationsleiste. Enthält typischerweise `glass-pill` Buttons.
216
+
217
+ ```html
218
+ <nav class="glass-nav">
219
+ <button class="glass-pill">
220
+ <svg viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"/></svg>
221
+ </button>
222
+ <button class="glass-pill">
223
+ <svg viewBox="0 0 24 24"><!-- Icon --></svg>
224
+ </button>
225
+ </nav>
226
+ ```
227
+
228
+ | Klasse | Beschreibung |
229
+ |---|---|
230
+ | `.glass-nav` | Flex-Container mit `space-between`, Padding |
231
+
232
+ ---
233
+
234
+ ### 3.3 Pill-Button
235
+
236
+ Runde Glas-Icon-Buttons (46×46px). Werden in Nav-Bars und als eigenständige Aktions-Buttons verwendet.
237
+
238
+ ```html
239
+ <button class="glass-pill">
240
+ <svg viewBox="0 0 24 24"><!-- Icon SVG --></svg>
241
+ </button>
242
+ ```
243
+
244
+ | Klasse | Beschreibung |
245
+ |---|---|
246
+ | `.glass-pill` | Runder Glas-Button (46×46px) |
247
+ | `.glass-theme-toggle` | Spezieller Pill mit automatischem Moon/Sun-Switch |
248
+
249
+ Theme-Toggle (spezialisierter Pill):
250
+
251
+ ```html
252
+ <button class="glass-theme-toggle" onclick="toggleTheme()">
253
+ <svg class="icon-moon" viewBox="0 0 24 24">
254
+ <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
255
+ </svg>
256
+ <svg class="icon-sun" viewBox="0 0 24 24">
257
+ <circle cx="12" cy="12" r="5"/>
258
+ <line x1="12" y1="1" x2="12" y2="3"/>
259
+ <line x1="12" y1="21" x2="12" y2="23"/>
260
+ <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
261
+ <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
262
+ <line x1="1" y1="12" x2="3" y2="12"/>
263
+ <line x1="21" y1="12" x2="23" y2="12"/>
264
+ <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
265
+ <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
266
+ </svg>
267
+ </button>
268
+ ```
269
+
270
+ ---
271
+
272
+ ### 3.4 Tab-Bar
273
+
274
+ Fixierte Bottom-Navigation mit Glas-Hintergrund. Benötigt `glass-bg--has-tab-bar` auf dem Background-Container.
275
+
276
+ ```html
277
+ <nav class="glass-tab-bar">
278
+ <button class="glass-tab-bar__item is-active">
279
+ <span class="glass-tab-bar__icon">
280
+ <svg viewBox="0 0 24 24"><!-- Icon --></svg>
281
+ </span>
282
+ <span class="glass-tab-bar__label">Start</span>
283
+ </button>
284
+ <button class="glass-tab-bar__item">
285
+ <span class="glass-tab-bar__icon">
286
+ <svg viewBox="0 0 24 24"><!-- Icon --></svg>
287
+ <span class="glass-tab-bar__badge">3</span>
288
+ </span>
289
+ <span class="glass-tab-bar__label">Verträge</span>
290
+ </button>
291
+ <button class="glass-tab-bar__item">
292
+ <span class="glass-tab-bar__icon">
293
+ <svg viewBox="0 0 24 24"><!-- Icon --></svg>
294
+ </span>
295
+ <span class="glass-tab-bar__label">Profil</span>
296
+ </button>
297
+ </nav>
298
+ ```
299
+
300
+ | Klasse | Beschreibung |
301
+ |---|---|
302
+ | `.glass-tab-bar` | Container: fixed bottom, Glas-Blur |
303
+ | `.glass-tab-bar__item` | Einzelner Tab |
304
+ | `.glass-tab-bar__item.is-active` | Aktiver Tab (Primary-Farbe) |
305
+ | `.glass-tab-bar__icon` | Icon-Wrapper |
306
+ | `.glass-tab-bar__badge` | Numerisches Badge im Icon |
307
+ | `.glass-tab-bar__label` | Text-Label unter dem Icon |
308
+
309
+ ---
310
+
311
+ ### 3.5 Title
312
+
313
+ Seitentitel mit Text-Shadow-Effekt.
314
+
315
+ ```html
316
+ <h1 class="glass-title">Seitentitel</h1>
317
+ ```
318
+
319
+ | Klasse | Beschreibung |
320
+ |---|---|
321
+ | `.glass-title` | Großer Titel (24px, bold, text-shadow) |
322
+
323
+ ---
324
+
325
+ ### 3.6 Card
326
+
327
+ Glasmorphismus-Container für Inhalte. Optional mit Glow-Effekt (Milchglas-Gradient + Lichtstreifen).
328
+
329
+ ```html
330
+ <!-- Standard Card -->
331
+ <div class="glass-card">
332
+ <p class="glass-card__text">Inhalt</p>
333
+ </div>
334
+
335
+ <!-- Glow Card mit Icon -->
336
+ <div class="glass-card glass-card--glow">
337
+ <div class="glass-card__icon">
338
+ <svg viewBox="0 0 64 64"><!-- Icon SVG --></svg>
339
+ </div>
340
+ <p class="glass-card__text">Beschreibungstext</p>
341
+ </div>
342
+ ```
343
+
344
+ | Klasse | Beschreibung |
345
+ |---|---|
346
+ | `.glass-card` | Basis-Glas-Container (border-radius: 24px) |
347
+ | `.glass-card--glow` | Milchglas-Gradient mit Lichtstreifen-Effekt |
348
+ | `.glass-card__icon` | Zentrierter Icon-Wrapper (SVG, 48×48px) |
349
+ | `.glass-card__text` | Beschreibungstext (muted) |
350
+
351
+ ---
352
+
353
+ ### 3.7 Buttons
354
+
355
+ Full-Width-Buttons (56px Höhe) mit drei Varianten und Größen-Modifiern.
356
+
357
+ ```html
358
+ <!-- Primary: Farbgradient, Hauptaktion -->
359
+ <button class="glass-btn glass-btn--primary">
360
+ <svg viewBox="0 0 24 24"><!-- Optional: Icon --></svg>
361
+ Primäre Aktion
362
+ </button>
363
+
364
+ <!-- Secondary: Milchig-weiß -->
365
+ <button class="glass-btn glass-btn--secondary">Sekundäre Aktion</button>
366
+
367
+ <!-- Tertiary: Subtiles Glas -->
368
+ <button class="glass-btn glass-btn--tertiary">Tertiäre Aktion</button>
369
+
370
+ <!-- Größen -->
371
+ <button class="glass-btn glass-btn--primary glass-btn--sm">Klein (44px)</button>
372
+ <button class="glass-btn glass-btn--primary glass-btn--lg">Groß (64px)</button>
373
+
374
+ <!-- Auto-Width (statt full-width) -->
375
+ <button class="glass-btn glass-btn--primary glass-btn--auto">Auto</button>
376
+ ```
377
+
378
+ | Klasse | Beschreibung |
379
+ |---|---|
380
+ | `.glass-btn` | Basis (56px Höhe, width: 100%) |
381
+ | `.glass-btn--primary` | Farbgradient (orange) |
382
+ | `.glass-btn--secondary` | Milchig-weiß, dunkler Text |
383
+ | `.glass-btn--tertiary` | Subtiles Glas, transparenter |
384
+ | `.glass-btn--sm` | 44px Höhe |
385
+ | `.glass-btn--lg` | 64px Höhe |
386
+ | `.glass-btn--auto` | Width: auto statt 100% |
387
+
388
+ **Wichtig:** Buttons sind standardmäßig `width: 100%`. Für inline/auto-breite Buttons `--auto` verwenden.
389
+
390
+ ---
391
+
392
+ ### 3.8 Badge
393
+
394
+ Tags und Labels.
395
+
396
+ ```html
397
+ <span class="glass-badge">Standard</span>
398
+ <span class="glass-badge glass-badge--primary">Aktiv</span>
399
+ <span class="glass-badge glass-badge--success">Fertig</span>
400
+ <span class="glass-badge glass-badge--error">Fehler</span>
401
+ ```
402
+
403
+ | Klasse | Beschreibung |
404
+ |---|---|
405
+ | `.glass-badge` | Standard (subtiles Glas) |
406
+ | `.glass-badge--primary` | Primary-Farbe |
407
+ | `.glass-badge--success` | Grün |
408
+ | `.glass-badge--error` | Rot |
409
+
410
+ ---
411
+
412
+ ### 3.9 Avatar
413
+
414
+ Glas-Kreise in drei Größen. Für Initialen, Icons oder Bilder.
415
+
416
+ ```html
417
+ <div class="glass-avatar glass-avatar--sm">S</div>
418
+ <div class="glass-avatar">M</div>
419
+ <div class="glass-avatar glass-avatar--lg">L</div>
420
+ ```
421
+
422
+ | Klasse | Beschreibung |
423
+ |---|---|
424
+ | `.glass-avatar` | Standard-Größe (Medium) |
425
+ | `.glass-avatar--sm` | Klein |
426
+ | `.glass-avatar--lg` | Groß |
427
+
428
+ ---
429
+
430
+ ### 3.10 Divider
431
+
432
+ Horizontale Trennlinie mit Fade-Effekt.
433
+
434
+ ```html
435
+ <hr class="glass-divider">
436
+ ```
437
+
438
+ ---
439
+
440
+ ### 3.11 Status Notice
441
+
442
+ Info-/Hinweis-Card mit Icon und Text.
443
+
444
+ ```html
445
+ <div class="glass-status">
446
+ <svg viewBox="0 0 24 24">
447
+ <circle cx="12" cy="12" r="10"/>
448
+ <line x1="12" y1="16" x2="12" y2="12"/>
449
+ <line x1="12" y1="8" x2="12" y2="8"/>
450
+ </svg>
451
+ <p>Noch keine Dokumente erfasst.</p>
452
+ </div>
453
+ ```
454
+
455
+ | Klasse | Beschreibung |
456
+ |---|---|
457
+ | `.glass-status` | Container mit subtiler Glas-Oberfläche |
458
+
459
+ ---
460
+
461
+ ### 3.12 Modal
462
+
463
+ Zentrierter Dialog mit Blur-Overlay. Wird über die State-Klasse `is-active` auf dem Overlay gesteuert.
464
+
465
+ ```html
466
+ <div class="glass-modal-overlay is-active">
467
+ <div class="glass-modal">
468
+ <div class="glass-modal__header">
469
+ <h2 class="glass-modal__title">Vertrag löschen?</h2>
470
+ </div>
471
+ <div class="glass-modal__body">
472
+ <p>Dieser Vorgang kann nicht rückgängig gemacht werden.</p>
473
+ </div>
474
+ <div class="glass-modal__footer">
475
+ <button class="glass-modal__action">Abbrechen</button>
476
+ <button class="glass-modal__action glass-modal__action--primary">Bestätigen</button>
477
+ </div>
478
+ </div>
479
+ </div>
480
+ ```
481
+
482
+ Danger-Variante:
483
+
484
+ ```html
485
+ <button class="glass-modal__action glass-modal__action--danger">Löschen</button>
486
+ ```
487
+
488
+ | Klasse | Beschreibung |
489
+ |---|---|
490
+ | `.glass-modal-overlay` | Fullscreen-Container mit Blur |
491
+ | `.glass-modal-overlay.is-active` | Sichtbar + animiert |
492
+ | `.glass-modal` | Dialog-Box |
493
+ | `.glass-modal__header` | Kopfbereich |
494
+ | `.glass-modal__title` | Titel (20px, bold) |
495
+ | `.glass-modal__body` | Inhaltsbereich |
496
+ | `.glass-modal__footer` | Aktionsleiste |
497
+ | `.glass-modal__action` | Action-Button im Footer |
498
+ | `.glass-modal__action--primary` | Primäre Aktion (farbig) |
499
+ | `.glass-modal__action--danger` | Gefährliche Aktion (rot) |
500
+
501
+ **Wichtig:** `is-active` kommt auf `.glass-modal-overlay`, **nicht** auf `.glass-modal`.
502
+
503
+ JavaScript zum Öffnen/Schließen:
504
+
505
+ ```js
506
+ // Öffnen
507
+ document.querySelector('.glass-modal-overlay').classList.add('is-active');
508
+ // Schließen
509
+ document.querySelector('.glass-modal-overlay').classList.remove('is-active');
510
+ ```
511
+
512
+ ---
513
+
514
+ ### 3.13 Toast
515
+
516
+ Temporäre Benachrichtigung. Sichtbar über `is-visible`. Drei Varianten.
517
+
518
+ ```html
519
+ <div class="glass-toast glass-toast--success is-visible">
520
+ <svg class="glass-toast__icon" viewBox="0 0 24 24"><!-- Icon --></svg>
521
+ <span class="glass-toast__text">Erfolgreich gespeichert!</span>
522
+ </div>
523
+ ```
524
+
525
+ | Klasse | Beschreibung |
526
+ |---|---|
527
+ | `.glass-toast` | Basis-Container |
528
+ | `.glass-toast--success` | Grüner Akzent |
529
+ | `.glass-toast--error` | Roter Akzent |
530
+ | `.glass-toast--warning` | Gelber Akzent |
531
+ | `.glass-toast.is-visible` | Sichtbar + eingeblendet |
532
+ | `.glass-toast__icon` | Icon (SVG) |
533
+ | `.glass-toast__text` | Nachrichtentext |
534
+
535
+ ---
536
+
537
+ ### 3.14 Input
538
+
539
+ Textfelder mit Glas-Hintergrund. Werden in einer `glass-input-group` mit Label und optionalem Hint gewrappt.
540
+
541
+ ```html
542
+ <div class="glass-input-group">
543
+ <label class="glass-label">Vertragsname</label>
544
+ <input class="glass-input" type="text" placeholder="z.B. Mietvertrag">
545
+ <span class="glass-hint">Optionaler Hilfetext</span>
546
+ </div>
547
+ ```
548
+
549
+ Error-State:
550
+
551
+ ```html
552
+ <div class="glass-input-group">
553
+ <label class="glass-label">E-Mail</label>
554
+ <input class="glass-input glass-input--error" type="email" value="invalid@">
555
+ <span class="glass-hint glass-hint--error">Bitte gültige E-Mail eingeben</span>
556
+ </div>
557
+ ```
558
+
559
+ Disabled:
560
+
561
+ ```html
562
+ <input class="glass-input" type="text" disabled>
563
+ ```
564
+
565
+ | Klasse | Beschreibung |
566
+ |---|---|
567
+ | `.glass-input-group` | Wrapper für Label + Input + Hint |
568
+ | `.glass-label` | Label (klein, muted, uppercase) |
569
+ | `.glass-input` | Text-Input (Glas-Hintergrund) |
570
+ | `.glass-input--error` | Roter Border für Fehlerzustand |
571
+ | `.glass-hint` | Hilfetext unter dem Input |
572
+ | `.glass-hint--error` | Roter Hilfetext |
573
+
574
+ ---
575
+
576
+ ### 3.15 Textarea
577
+
578
+ Mehrzeiliges Textfeld.
579
+
580
+ ```html
581
+ <textarea class="glass-textarea" placeholder="Optionale Anmerkungen…"></textarea>
582
+ ```
583
+
584
+ | Klasse | Beschreibung |
585
+ |---|---|
586
+ | `.glass-textarea` | Mehrzeiliges Glas-Input |
587
+
588
+ ---
589
+
590
+ ### 3.16 Select
591
+
592
+ Dropdown mit Glas-Styling und Custom-Chevron.
593
+
594
+ ```html
595
+ <select class="glass-select">
596
+ <option>Bitte wählen…</option>
597
+ <option>Versicherung</option>
598
+ <option>Mietvertrag</option>
599
+ </select>
600
+ ```
601
+
602
+ | Klasse | Beschreibung |
603
+ |---|---|
604
+ | `.glass-select` | Styled Dropdown |
605
+
606
+ ---
607
+
608
+ ### 3.17 Search
609
+
610
+ Suchfeld mit eingebettetem Such-Icon.
611
+
612
+ ```html
613
+ <div class="glass-search">
614
+ <svg class="glass-search__icon" viewBox="0 0 24 24">
615
+ <circle cx="11" cy="11" r="8"/>
616
+ <line x1="21" y1="21" x2="16.65" y2="16.65"/>
617
+ </svg>
618
+ <input class="glass-input" type="search" placeholder="Verträge durchsuchen…">
619
+ </div>
620
+ ```
621
+
622
+ | Klasse | Beschreibung |
623
+ |---|---|
624
+ | `.glass-search` | Wrapper (position: relative) |
625
+ | `.glass-search__icon` | Positioniertes Such-Icon (links) |
626
+
627
+ **Wichtig:** Das Input innerhalb von `.glass-search` nutzt die reguläre `.glass-input` Klasse.
628
+
629
+ ---
630
+
631
+ ### 3.18 Toggle Switch
632
+
633
+ iOS-artiger Schalter.
634
+
635
+ ```html
636
+ <label class="glass-toggle">
637
+ <input class="glass-toggle__input" type="checkbox" checked>
638
+ <span class="glass-toggle__track">
639
+ <span class="glass-toggle__thumb"></span>
640
+ </span>
641
+ <span class="glass-toggle__label">Benachrichtigungen</span>
642
+ </label>
643
+ ```
644
+
645
+ | Klasse | Beschreibung |
646
+ |---|---|
647
+ | `.glass-toggle` | Äußeres Label (Flex-Container) |
648
+ | `.glass-toggle__input` | Verstecktes Checkbox-Input |
649
+ | `.glass-toggle__track` | Sichtbare Schiene |
650
+ | `.glass-toggle__thumb` | Beweglicher Knopf |
651
+ | `.glass-toggle__label` | Text-Label |
652
+
653
+ **State:** `:checked` auf dem Input aktiviert den Toggle visuell.
654
+
655
+ ---
656
+
657
+ ### 3.19 Checkbox
658
+
659
+ Animierte Checkbox mit Checkmark-SVG.
660
+
661
+ ```html
662
+ <label class="glass-checkbox">
663
+ <input class="glass-checkbox__input" type="checkbox" checked>
664
+ <span class="glass-checkbox__box">
665
+ <svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>
666
+ </span>
667
+ <span class="glass-checkbox__label">AGB akzeptieren</span>
668
+ </label>
669
+ ```
670
+
671
+ | Klasse | Beschreibung |
672
+ |---|---|
673
+ | `.glass-checkbox` | Äußeres Label |
674
+ | `.glass-checkbox__input` | Verstecktes Checkbox-Input |
675
+ | `.glass-checkbox__box` | Sichtbare Box mit Checkmark-SVG |
676
+ | `.glass-checkbox__label` | Text-Label |
677
+
678
+ ---
679
+
680
+ ### 3.20 Radio Button
681
+
682
+ Animierter Radio-Button mit Dot.
683
+
684
+ ```html
685
+ <label class="glass-radio">
686
+ <input class="glass-radio__input" type="radio" name="gruppe" checked>
687
+ <span class="glass-radio__circle">
688
+ <span class="glass-radio__dot"></span>
689
+ </span>
690
+ <span class="glass-radio__label">Option A</span>
691
+ </label>
692
+
693
+ <label class="glass-radio">
694
+ <input class="glass-radio__input" type="radio" name="gruppe">
695
+ <span class="glass-radio__circle">
696
+ <span class="glass-radio__dot"></span>
697
+ </span>
698
+ <span class="glass-radio__label">Option B</span>
699
+ </label>
700
+ ```
701
+
702
+ | Klasse | Beschreibung |
703
+ |---|---|
704
+ | `.glass-radio` | Äußeres Label |
705
+ | `.glass-radio__input` | Verstecktes Radio-Input |
706
+ | `.glass-radio__circle` | Sichtbarer Kreis |
707
+ | `.glass-radio__dot` | Innerer Punkt (sichtbar bei :checked) |
708
+ | `.glass-radio__label` | Text-Label |
709
+
710
+ **Wichtig:** Radio-Buttons der gleichen Gruppe brauchen denselben `name`-Attributwert.
711
+
712
+ ---
713
+
714
+ ### 3.21 Range Slider
715
+
716
+ Slider mit Gradient-Thumb. Wird in einer Gruppe mit Header und Wertanzeige verwendet.
717
+
718
+ ```html
719
+ <div class="glass-range-group">
720
+ <div class="glass-range-header">
721
+ <label class="glass-label">Bildqualität</label>
722
+ <span class="glass-range-value" id="range-val">75%</span>
723
+ </div>
724
+ <input class="glass-range" type="range" min="0" max="100" value="75"
725
+ oninput="document.getElementById('range-val').textContent = this.value + '%'">
726
+ </div>
727
+ ```
728
+
729
+ | Klasse | Beschreibung |
730
+ |---|---|
731
+ | `.glass-range-group` | Wrapper |
732
+ | `.glass-range-header` | Flex-Container für Label + Wert |
733
+ | `.glass-range-value` | Wertanzeige (rechts) |
734
+ | `.glass-range` | Der eigentliche Slider |
735
+
736
+ ---
737
+
738
+ ### 3.22 Progress Bar
739
+
740
+ Fortschrittsbalken mit optionalem Shimmer-Effekt.
741
+
742
+ ```html
743
+ <div class="glass-progress">
744
+ <div class="glass-progress__header">
745
+ <span class="glass-progress__label">Upload</span>
746
+ <span class="glass-progress__value">68%</span>
747
+ </div>
748
+ <div class="glass-progress__track">
749
+ <div class="glass-progress__fill" style="width: 68%"></div>
750
+ </div>
751
+ </div>
752
+ ```
753
+
754
+ | Klasse | Beschreibung |
755
+ |---|---|
756
+ | `.glass-progress` | Basis-Container |
757
+ | `.glass-progress--sm` | Schmaler Track (4px) |
758
+ | `.glass-progress--lg` | Breiter Track (12px) |
759
+ | `.glass-progress--success` | Grüner Balken |
760
+ | `.glass-progress--error` | Roter Balken |
761
+ | `.glass-progress__header` | Flex-Container für Label + Wert |
762
+ | `.glass-progress__label` | Bezeichnung (links) |
763
+ | `.glass-progress__value` | Prozentwert (rechts) |
764
+ | `.glass-progress__track` | Hintergrund-Schiene |
765
+ | `.glass-progress__fill` | Gefüllter Bereich (Breite via `style="width: X%"`) |
766
+
767
+ **Wichtig:** Die Fortschrittsbreite wird über inline `style="width: X%"` auf `.glass-progress__fill` gesteuert.
768
+
769
+ ---
770
+
771
+ ### 3.23 Accordion
772
+
773
+ Auf-/zuklappbare Inhaltsbereiche. Gesteuert über `is-open` auf den Items.
774
+
775
+ ```html
776
+ <div class="glass-accordion">
777
+ <div class="glass-accordion__item is-open">
778
+ <button class="glass-accordion__trigger" onclick="this.parentElement.classList.toggle('is-open')">
779
+ <span>Frage eins?</span>
780
+ <span class="glass-accordion__trigger-icon">
781
+ <svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
782
+ </span>
783
+ </button>
784
+ <div class="glass-accordion__content">
785
+ <div class="glass-accordion__body">
786
+ Die Antwort auf Frage eins.
787
+ </div>
788
+ </div>
789
+ </div>
790
+
791
+ <div class="glass-accordion__item">
792
+ <button class="glass-accordion__trigger" onclick="this.parentElement.classList.toggle('is-open')">
793
+ <span>Frage zwei?</span>
794
+ <span class="glass-accordion__trigger-icon">
795
+ <svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
796
+ </span>
797
+ </button>
798
+ <div class="glass-accordion__content">
799
+ <div class="glass-accordion__body">
800
+ Die Antwort auf Frage zwei.
801
+ </div>
802
+ </div>
803
+ </div>
804
+ </div>
805
+ ```
806
+
807
+ | Klasse | Beschreibung |
808
+ |---|---|
809
+ | `.glass-accordion` | Container |
810
+ | `.glass-accordion__item` | Einzelnes Item |
811
+ | `.glass-accordion__item.is-open` | Geöffnetes Item |
812
+ | `.glass-accordion__trigger` | Klickbarer Header-Button |
813
+ | `.glass-accordion__trigger-icon` | Chevron-Icon (rotiert bei open) |
814
+ | `.glass-accordion__content` | Wrapper für animierte Höhe |
815
+ | `.glass-accordion__body` | Eigentlicher Inhalt |
816
+
817
+ ---
818
+
819
+ ## 4. Utility-Klassen
820
+
821
+ ### Stack (Vertikal)
822
+
823
+ Flexbox-Column mit Gap.
824
+
825
+ ```html
826
+ <div class="gl-stack gl-stack--md">
827
+ <div>Item 1</div>
828
+ <div>Item 2</div>
829
+ </div>
830
+ ```
831
+
832
+ | Klasse | Gap |
833
+ |---|---|
834
+ | `.gl-stack` | Standard |
835
+ | `.gl-stack--2xs` | 4px |
836
+ | `.gl-stack--xs` | 8px |
837
+ | `.gl-stack--sm` | 12px |
838
+ | `.gl-stack--md` | 16px |
839
+ | `.gl-stack--lg` | 20px |
840
+ | `.gl-stack--xl` | 24px |
841
+
842
+ ### Row (Horizontal)
843
+
844
+ Flexbox-Row mit Gap.
845
+
846
+ ```html
847
+ <div class="gl-row gl-row--sm">
848
+ <span class="glass-badge">Tag 1</span>
849
+ <span class="glass-badge">Tag 2</span>
850
+ </div>
851
+ ```
852
+
853
+ | Klasse | Gap |
854
+ |---|---|
855
+ | `.gl-row` | Standard |
856
+ | `.gl-row--xs` | 8px |
857
+ | `.gl-row--sm` | 12px |
858
+ | `.gl-row--md` | 16px |
859
+
860
+ ### Margin
861
+
862
+ | Klasse | Wert |
863
+ |---|---|
864
+ | `.gl-mt-sm` | margin-top: 12px |
865
+ | `.gl-mt-md` | margin-top: 16px |
866
+ | `.gl-mt-lg` | margin-top: 20px |
867
+ | `.gl-mt-xl` | margin-top: 24px |
868
+ | `.gl-mb-sm` | margin-bottom: 12px |
869
+ | `.gl-mb-md` | margin-bottom: 16px |
870
+ | `.gl-mb-lg` | margin-bottom: 20px |
871
+ | `.gl-mb-xl` | margin-bottom: 24px |
872
+
873
+ ### Text
874
+
875
+ | Klasse | Beschreibung |
876
+ |---|---|
877
+ | `.gl-text-center` | text-align: center |
878
+ | `.gl-text-muted` | Gedämpfte Textfarbe |
879
+ | `.gl-text-sm` | Kleinere Schrift |
880
+
881
+ ### Layout
882
+
883
+ | Klasse | Beschreibung |
884
+ |---|---|
885
+ | `.gl-px` | Horizontales Padding |
886
+ | `.gl-w-full` | width: 100% |
887
+ | `.gl-flex-1` | flex: 1 |
888
+
889
+ ---
890
+
891
+ ## 5. State-Klassen Übersicht
892
+
893
+ | State-Klasse | Verwendet bei | Beschreibung |
894
+ |---|---|---|
895
+ | `.is-active` | `.glass-modal-overlay`, `.glass-tab-bar__item` | Element ist aktiv/sichtbar |
896
+ | `.is-open` | `.glass-accordion__item` | Accordion-Item ist ausgeklappt |
897
+ | `.is-visible` | `.glass-toast` | Toast ist sichtbar |
898
+ | `:checked` | Toggle, Checkbox, Radio (auf dem Input) | Nativer checked-State |
899
+ | `:focus` | Input, Textarea, Select, Range | Focus-Ring |
900
+ | `:disabled` | `.glass-input` | Deaktiviertes Input |
901
+
902
+ ---
903
+
904
+ ## 6. Composition Patterns
905
+
906
+ ### Login-Screen
907
+
908
+ ```html
909
+ <div class="glass-bg">
910
+ <nav class="glass-nav">
911
+ <button class="glass-pill">
912
+ <svg viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"/></svg>
913
+ </button>
914
+ <button class="glass-theme-toggle" onclick="toggleTheme()">
915
+ <svg class="icon-moon" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
916
+ <svg class="icon-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"/></svg>
917
+ </button>
918
+ </nav>
919
+
920
+ <h1 class="glass-title">Anmelden</h1>
921
+
922
+ <div class="gl-stack gl-stack--md">
923
+ <div class="glass-input-group">
924
+ <label class="glass-label">E-Mail</label>
925
+ <input class="glass-input" type="email" placeholder="name@beispiel.de">
926
+ </div>
927
+ <div class="glass-input-group">
928
+ <label class="glass-label">Passwort</label>
929
+ <input class="glass-input" type="password" placeholder="••••••••">
930
+ </div>
931
+ </div>
932
+
933
+ <div class="gl-stack gl-stack--sm gl-mt-lg">
934
+ <button class="glass-btn glass-btn--primary">Einloggen</button>
935
+ <button class="glass-btn glass-btn--tertiary">Passwort vergessen?</button>
936
+ </div>
937
+ </div>
938
+ ```
939
+
940
+ ### Dashboard mit Cards
941
+
942
+ ```html
943
+ <div class="glass-bg glass-bg--has-tab-bar">
944
+ <nav class="glass-nav">
945
+ <h1 class="glass-title">Dashboard</h1>
946
+ <button class="glass-pill">
947
+ <svg viewBox="0 0 24 24"><!-- Settings Icon --></svg>
948
+ </button>
949
+ </nav>
950
+
951
+ <div class="gl-stack gl-stack--md">
952
+ <div class="glass-card glass-card--glow">
953
+ <div class="glass-card__icon">
954
+ <svg viewBox="0 0 64 64"><!-- Icon --></svg>
955
+ </div>
956
+ <p class="glass-card__text">Dokumente erfassen und hochladen.</p>
957
+ </div>
958
+
959
+ <div class="glass-card glass-card--glow">
960
+ <div class="glass-card__icon">
961
+ <svg viewBox="0 0 64 64"><!-- Icon --></svg>
962
+ </div>
963
+ <p class="glass-card__text">Verträge verwalten und archivieren.</p>
964
+ </div>
965
+ </div>
966
+
967
+ <nav class="glass-tab-bar">
968
+ <button class="glass-tab-bar__item is-active">
969
+ <span class="glass-tab-bar__icon"><svg viewBox="0 0 24 24"><!-- Home --></svg></span>
970
+ <span class="glass-tab-bar__label">Start</span>
971
+ </button>
972
+ <button class="glass-tab-bar__item">
973
+ <span class="glass-tab-bar__icon"><svg viewBox="0 0 24 24"><!-- Docs --></svg></span>
974
+ <span class="glass-tab-bar__label">Verträge</span>
975
+ </button>
976
+ <button class="glass-tab-bar__item">
977
+ <span class="glass-tab-bar__icon"><svg viewBox="0 0 24 24"><!-- Profile --></svg></span>
978
+ <span class="glass-tab-bar__label">Profil</span>
979
+ </button>
980
+ </nav>
981
+ </div>
982
+ ```
983
+
984
+ ### Formular-Seite
985
+
986
+ ```html
987
+ <div class="glass-bg">
988
+ <nav class="glass-nav">
989
+ <button class="glass-pill">
990
+ <svg viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"/></svg>
991
+ </button>
992
+ </nav>
993
+
994
+ <h1 class="glass-title">Neuer Vertrag</h1>
995
+
996
+ <div class="gl-stack gl-stack--md">
997
+ <div class="glass-input-group">
998
+ <label class="glass-label">Vertragsname</label>
999
+ <input class="glass-input" type="text" placeholder="z.B. Mietvertrag">
1000
+ </div>
1001
+
1002
+ <div class="glass-input-group">
1003
+ <label class="glass-label">Kategorie</label>
1004
+ <select class="glass-select">
1005
+ <option>Bitte wählen…</option>
1006
+ <option>Versicherung</option>
1007
+ <option>Mietvertrag</option>
1008
+ <option>Arbeitsvertrag</option>
1009
+ </select>
1010
+ </div>
1011
+
1012
+ <div class="glass-input-group">
1013
+ <label class="glass-label">Anmerkungen</label>
1014
+ <textarea class="glass-textarea" placeholder="Optionale Anmerkungen…"></textarea>
1015
+ </div>
1016
+
1017
+ <label class="glass-toggle">
1018
+ <input class="glass-toggle__input" type="checkbox">
1019
+ <span class="glass-toggle__track"><span class="glass-toggle__thumb"></span></span>
1020
+ <span class="glass-toggle__label">Erinnerung aktivieren</span>
1021
+ </label>
1022
+
1023
+ <hr class="glass-divider">
1024
+
1025
+ <button class="glass-btn glass-btn--primary">Speichern</button>
1026
+ <button class="glass-btn glass-btn--tertiary">Abbrechen</button>
1027
+ </div>
1028
+ </div>
1029
+ ```
1030
+
1031
+ ### Lösch-Bestätigung (Modal)
1032
+
1033
+ ```html
1034
+ <div class="glass-modal-overlay is-active">
1035
+ <div class="glass-modal">
1036
+ <div class="glass-modal__header">
1037
+ <h2 class="glass-modal__title">Vertrag löschen?</h2>
1038
+ </div>
1039
+ <div class="glass-modal__body">
1040
+ <p>Möchtest du diesen Vertrag endgültig löschen? Dieser Vorgang kann nicht rückgängig gemacht werden.</p>
1041
+ </div>
1042
+ <div class="glass-modal__footer">
1043
+ <button class="glass-modal__action" onclick="closeModal()">Abbrechen</button>
1044
+ <button class="glass-modal__action glass-modal__action--danger" onclick="deleteContract()">Löschen</button>
1045
+ </div>
1046
+ </div>
1047
+ </div>
1048
+ ```
1049
+
1050
+ ### Settings-Seite
1051
+
1052
+ ```html
1053
+ <div class="glass-bg">
1054
+ <nav class="glass-nav">
1055
+ <button class="glass-pill">
1056
+ <svg viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"/></svg>
1057
+ </button>
1058
+ </nav>
1059
+
1060
+ <h1 class="glass-title">Einstellungen</h1>
1061
+
1062
+ <div class="gl-stack gl-stack--md">
1063
+ <label class="glass-toggle">
1064
+ <input class="glass-toggle__input" type="checkbox" checked>
1065
+ <span class="glass-toggle__track"><span class="glass-toggle__thumb"></span></span>
1066
+ <span class="glass-toggle__label">Push-Benachrichtigungen</span>
1067
+ </label>
1068
+
1069
+ <hr class="glass-divider">
1070
+
1071
+ <label class="glass-toggle">
1072
+ <input class="glass-toggle__input" type="checkbox">
1073
+ <span class="glass-toggle__track"><span class="glass-toggle__thumb"></span></span>
1074
+ <span class="glass-toggle__label">Dunkelmodus</span>
1075
+ </label>
1076
+
1077
+ <hr class="glass-divider">
1078
+
1079
+ <div class="glass-range-group">
1080
+ <div class="glass-range-header">
1081
+ <label class="glass-label">Schriftgröße</label>
1082
+ <span class="glass-range-value">100%</span>
1083
+ </div>
1084
+ <input class="glass-range" type="range" min="80" max="150" value="100">
1085
+ </div>
1086
+
1087
+ <hr class="glass-divider">
1088
+
1089
+ <div class="glass-accordion">
1090
+ <div class="glass-accordion__item">
1091
+ <button class="glass-accordion__trigger" onclick="this.parentElement.classList.toggle('is-open')">
1092
+ <span>Erweiterte Einstellungen</span>
1093
+ <span class="glass-accordion__trigger-icon">
1094
+ <svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
1095
+ </span>
1096
+ </button>
1097
+ <div class="glass-accordion__content">
1098
+ <div class="glass-accordion__body">
1099
+ Erweiterte Optionen hier…
1100
+ </div>
1101
+ </div>
1102
+ </div>
1103
+ </div>
1104
+ </div>
1105
+ </div>
1106
+ ```
1107
+
1108
+ ### Fortschritt + Toast
1109
+
1110
+ ```html
1111
+ <!-- Progress -->
1112
+ <div class="glass-progress glass-progress--success">
1113
+ <div class="glass-progress__header">
1114
+ <span class="glass-progress__label">Upload</span>
1115
+ <span class="glass-progress__value">100%</span>
1116
+ </div>
1117
+ <div class="glass-progress__track">
1118
+ <div class="glass-progress__fill" style="width: 100%"></div>
1119
+ </div>
1120
+ </div>
1121
+
1122
+ <!-- Toast (wird per JS eingeblendet) -->
1123
+ <div class="glass-toast glass-toast--success is-visible">
1124
+ <svg class="glass-toast__icon" viewBox="0 0 24 24">
1125
+ <polyline points="20 6 9 17 4 12"/>
1126
+ </svg>
1127
+ <span class="glass-toast__text">Upload erfolgreich!</span>
1128
+ </div>
1129
+ ```
1130
+
1131
+ ---
1132
+
1133
+ ## 7. Regeln & häufige Fehler
1134
+
1135
+ ### ✅ Immer beachten
1136
+
1137
+ 1. **`glass-bg` als äußerster Container** – Ohne den Background-Wrapper fehlt der Aurora-Hintergrund, und Glaseffekte sehen nicht korrekt aus.
1138
+ 2. **`glass-bg--has-tab-bar`** – Wenn eine Tab-Bar vorhanden ist, muss dieser Modifier auf `glass-bg` gesetzt werden, sonst verdeckt die Tab-Bar den unteren Inhalt.
1139
+ 3. **Buttons sind full-width** – `glass-btn` hat `width: 100%`. Für inline-Buttons immer `glass-btn--auto` ergänzen.
1140
+ 4. **Inputs in `glass-input-group` wrappen** – Für korrektes Label/Hint-Spacing.
1141
+ 5. **State-Klassen richtig platzieren:**
1142
+ - `is-active` → auf `.glass-modal-overlay` (nicht auf `.glass-modal`)
1143
+ - `is-active` → auf `.glass-tab-bar__item`
1144
+ - `is-open` → auf `.glass-accordion__item`
1145
+ - `is-visible` → auf `.glass-toast`
1146
+ 6. **SVG-Icons** – GlassKit nutzt inline SVGs (stroke-based, nicht fill). Typische Attribute: `viewBox="0 0 24 24"`, stroke via `currentColor`.
1147
+ 7. **`data-theme`** – Immer auf `<html>` setzen, nie auf `<body>` oder tiefere Elemente.
1148
+
1149
+ ### ❌ Häufige Fehler
1150
+
1151
+ | Fehler | Korrektur |
1152
+ |---|---|
1153
+ | `is-active` auf `.glass-modal` statt `.glass-modal-overlay` | `is-active` auf den Overlay setzen |
1154
+ | `glass-btn` ohne Variante (`--primary` etc.) | Immer eine Variante angeben |
1155
+ | Inputs ohne `glass-input-group` Wrapper | In `glass-input-group` einbetten |
1156
+ | `glass-tab-bar` ohne `glass-bg--has-tab-bar` | Modifier auf den Background-Container |
1157
+ | `data-theme` auf `<body>` | Auf `<html>` setzen |
1158
+ | Progress-Breite per Klasse statt inline-Style | `style="width: X%"` auf `.glass-progress__fill` |
1159
+ | Toggle ohne `__track > __thumb` Verschachtelung | Korrekte BEM-Hierarchie beachten |
1160
+
1161
+ ---
1162
+
1163
+ ## 8. Klassen-Schnellreferenz
1164
+
1165
+ | Komponente | Basis-Klasse | Modifier / States |
1166
+ |---|---|---|
1167
+ | Background | `.glass-bg` | `--has-tab-bar` |
1168
+ | Navigation | `.glass-nav` | – |
1169
+ | Pill-Button | `.glass-pill` | – |
1170
+ | Theme-Toggle | `.glass-theme-toggle` | – |
1171
+ | Title | `.glass-title` | – |
1172
+ | Card | `.glass-card` | `--glow` |
1173
+ | Button | `.glass-btn` | `--primary`, `--secondary`, `--tertiary`, `--sm`, `--lg`, `--auto` |
1174
+ | Badge | `.glass-badge` | `--primary`, `--success`, `--error` |
1175
+ | Avatar | `.glass-avatar` | `--sm`, `--lg` |
1176
+ | Divider | `.glass-divider` | – |
1177
+ | Status | `.glass-status` | – |
1178
+ | Input | `.glass-input` | `--error`, `:disabled` |
1179
+ | Input Group | `.glass-input-group` | – |
1180
+ | Label | `.glass-label` | – |
1181
+ | Hint | `.glass-hint` | `--error` |
1182
+ | Textarea | `.glass-textarea` | – |
1183
+ | Select | `.glass-select` | – |
1184
+ | Search | `.glass-search` | – |
1185
+ | Toggle | `.glass-toggle` | `:checked` |
1186
+ | Checkbox | `.glass-checkbox` | `:checked` |
1187
+ | Radio | `.glass-radio` | `:checked` |
1188
+ | Range | `.glass-range` | – |
1189
+ | Progress | `.glass-progress` | `--sm`, `--lg`, `--success`, `--error` |
1190
+ | Modal | `.glass-modal-overlay` | `.is-active` |
1191
+ | Toast | `.glass-toast` | `--success`, `--error`, `--warning`, `.is-visible` |
1192
+ | Tab-Bar | `.glass-tab-bar` | `.is-active` auf Items |
1193
+ | Accordion | `.glass-accordion` | `.is-open` auf Items |
1194
+
1195
+ ---
1196
+
1197
+ ## 9. Web Components / Shadow DOM
1198
+
1199
+ GlassKit liefert ein Constructable Stylesheet für Shadow DOM-Nutzung:
1200
+
1201
+ ```js
1202
+ import { glassSheet } from '@jungherz-de/glasskit/glasskit-styles.js';
1203
+
1204
+ class MyCard extends HTMLElement {
1205
+ constructor() {
1206
+ super();
1207
+ const shadow = this.attachShadow({ mode: 'open' });
1208
+ shadow.adoptedStyleSheets = [glassSheet];
1209
+ shadow.innerHTML = `
1210
+ <div class="glass-card glass-card--glow">
1211
+ <p class="glass-card__text"><slot></slot></p>
1212
+ </div>
1213
+ `;
1214
+ }
1215
+ }
1216
+ customElements.define('my-card', MyCard);
1217
+ ```
1218
+
1219
+ | Export | Typ | Beschreibung |
1220
+ |---|---|---|
1221
+ | `glassSheet` | `CSSStyleSheet` | Constructable Stylesheet für `adoptedStyleSheets` |
1222
+ | `css` | `string` | CSS als String (Fallback) |
1223
+
1224
+ **Hinweis:** CSS Custom Properties (`--gl-*`) durchdringen die Shadow-Boundary automatisch. Theme-Switching funktioniert global.
1225
+
1226
+ ---
1227
+
1228
+ ## 10. Custom Theming
1229
+
1230
+ Eigene Markenfarben über `theme-override.css` nach der Basis-Library laden:
1231
+
1232
+ ```css
1233
+ :root {
1234
+ --gl-color-primary: #007AFF;
1235
+ --gl-color-primary-dark: #0055CC;
1236
+ --gl-color-primary-mid: #0066E0;
1237
+
1238
+ --gl-border-warm: rgba(0, 122, 255, 0.35);
1239
+ --gl-border-focus: rgba(0, 122, 255, 0.60);
1240
+
1241
+ --gl-shadow-btn-primary: 0 6px 24px rgba(0, 100, 220, 0.35),
1242
+ 0 2px 8px rgba(0, 0, 0, 0.15);
1243
+ --gl-shadow-focus: 0 0 0 3px rgba(0, 122, 255, 0.3);
1244
+ }
1245
+ ```
1246
+
1247
+ Mitgelieferte Theme-Vorlagen in `theme-override.css`:
1248
+ - 🔵 Ocean Blue
1249
+ - 🟢 Emerald Green
1250
+ - 🌹 Rose
1251
+ - 🎨 Custom (leer, zum Befüllen)