# Scrum4Me — Styling & Design System **Versie:** 0.1 — april 2026 **Onderdeel van:** CLAUDE.md context-set --- ## Overzicht Scrum4Me gebruikt **Material Design 3 (MD3)** als kleurfilosofie, geïmplementeerd via CSS custom properties in `theme.css` en direct bruikbaar als Tailwind utility classes. **shadcn/ui** levert alle UI-primitieven (Button, Dialog, Sheet, Badge, etc.) en is volledig compatibel met het MD3-kleurensysteem via de legacy-token-mapping. Lees dit document voordat je een component schrijft. Gebruik **nooit** willekeurige Tailwind-kleuren zoals `bg-blue-500` of `bg-green-600` — gebruik altijd de semantische tokens uit dit systeem. --- ## Setup ### 1. theme.css plaatsen Kopieer het meegeleverde `theme.css` bestand naar: ``` app/globals.css ← importeer theme.css hier, of plak de inhoud direct ``` Of als apart bestand: ``` styles/theme.css ``` Importeer in `app/globals.css`: ```css @import './styles/theme.css'; ``` ### 2. shadcn/ui initialiseren ```bash npx shadcn@latest init ``` Kies bij de setup: - Style: **Default** - Base color: **Slate** (wordt overschreven door theme.css) - CSS variables: **Yes** De `theme.css` overschrijft alle shadcn default-kleuren via CSS custom properties. Geen extra configuratie nodig. ### 3. Tailwind configuratie `theme.css` registreert alle tokens via `@theme inline` — ze zijn direct beschikbaar als Tailwind utility classes: ```tsx // Werkt direct: className="bg-primary text-primary-foreground" className="bg-surface-container-low" className="bg-status-done" className="bg-priority-critical" ``` ### 4. Dark mode Dark mode werkt via de `.dark` class op ``: ```tsx // components/theme-toggle.tsx 'use client' import { useState, useEffect } from 'react' export function ThemeToggle() { const [isDark, setIsDark] = useState(false) useEffect(() => { const stored = localStorage.getItem('theme') if (stored === 'dark') { document.documentElement.classList.add('dark') setIsDark(true) } }, []) const toggle = () => { document.documentElement.classList.toggle('dark') const next = !isDark setIsDark(next) localStorage.setItem('theme', next ? 'dark' : 'light') } return ( ) } ``` --- ## Kleurfilosofie Drie hoofdrollen, elk met een semantische betekenis voor een Scrum-planner: | Rol | Kleur | Betekenis | Gebruik in Scrum4Me | |---|---|---|---| | **Primary** | Blauw `#0061a4` | Productiviteit, vertrouwen | Primaire knoppen, actieve navigatie, Sprint Goal | | **Secondary** | Paars `#5b5e71` | Planning, organisatie | Secundaire acties, filters, toolbar-items | | **Tertiary** | Teal `#006874` | Voortgang, data | Voortgangsindicatoren, story-tellers, metrics | Diepte wordt gecreëerd via **tonal elevation** (lichtere/donkerdere oppervlakken), niet via schaduwen. --- ## Surface Elevation System Gebruik deze hiërarchie consequent — nooit `shadow-lg` voor diepte: ``` HOOGSTE ELEVATIE (voorgrond) surface-container-lowest → dialogs, modals, popovers surface-container-low → kaarten, panelen surface-container → standaard container surface-container-high → geneste containers surface-container-highest → achtergrondcontainers LAAGSTE ELEVATIE (achtergrond) background → app-achtergrond ``` ### In Scrum4Me specifiek | Element | Surface token | |---|---| | App achtergrond | `bg-background` | | Navigatiebalk | `bg-surface-container-low` | | Gesplitst scherm (elk paneel) | `bg-surface-container-low` | | PBI-rij | `bg-surface-container` | | Geselecteerde PBI-rij | `bg-primary-container` | | Story-blok | `bg-surface-container-low border border-border` | | Story-blok (geselecteerd) | `bg-primary-container border border-primary` | | Taakregel | `bg-surface-container` | | Dialogs / modals | `bg-surface-container-lowest` | | Slide-over (story detail) | `bg-surface-container-lowest` | | Todo-item | `bg-surface-container` | | Navigatiebar per paneel | `bg-surface-container-highest` | --- ## Statuskleur mapping ### Story- en taakstatus Gebruik **altijd** icoon + tekst naast kleur (toegankelijkheid): ```tsx // Status badge component const statusConfig = { OPEN: { label: 'Open', className: 'bg-status-todo text-white', }, IN_SPRINT: { label: 'In Sprint', className: 'bg-status-in-progress text-white', }, DONE: { label: 'Done', className: 'bg-status-done text-white', }, } // Taakstatus const taskStatusConfig = { TO_DO: { label: 'To Do', className: 'bg-status-todo text-white', }, IN_PROGRESS: { label: 'In Progress', className: 'bg-status-in-progress text-white', }, DONE: { label: 'Done', className: 'bg-status-done text-white', }, } ``` ### Prioriteitskleur mapping ```tsx const priorityConfig = { 1: { label: 'Kritiek', className: 'bg-priority-critical text-white', borderClassName: 'border-l-4 border-priority-critical', }, 2: { label: 'Hoog', className: 'bg-priority-high text-white', borderClassName: 'border-l-4 border-priority-high', }, 3: { label: 'Middel', className: 'bg-priority-medium text-white', borderClassName: 'border-l-4 border-priority-medium', }, 4: { label: 'Laag', className: 'bg-priority-low text-white', borderClassName: 'border-l-4 border-priority-low', }, } ``` ### Story-activiteitenlog ```tsx const logTypeConfig = { IMPLEMENTATION_PLAN: { label: 'Implementatieplan', className: 'bg-info-container text-info-container-foreground border-l-4 border-info', }, TEST_RESULT: { PASSED: { label: 'Tests geslaagd', className: 'bg-success-container text-success-container-foreground border-l-4 border-success', }, FAILED: { label: 'Tests mislukt', className: 'bg-error-container text-error-container-foreground border-l-4 border-error', }, }, COMMIT: { label: 'Commit', className: 'bg-secondary-container text-secondary-container-foreground border-l-4 border-secondary', }, } ``` --- ## shadcn/ui componenten — gebruik in Scrum4Me Alle shadcn-componenten gebruiken automatisch het MD3-kleurensysteem. Hieronder de aanbevolen varianten per context. ### Button ```tsx import { Button } from '@/components/ui/button' // Primaire actie (Sprint starten, PBI aanmaken, Opslaan) // Secundaire actie (Annuleren, Filters, Exporteren) // Destructieve actie (Verwijderen, Archiveren) // Ghost (icon-knoppen in navigatiebar) // Outline (minder urgente acties) ``` ### Badge (status en prioriteit) ```tsx import { Badge } from '@/components/ui/badge' // Gebruik custom className voor MD3-kleuren // shadcn Badge variant="secondary" is ook bruikbaar voor neutrale badges Done Kritiek In Sprint // Neutrale info badge (bijv. "3 taken") 3 taken ``` **PBI-status (READY / BLOCKED / DONE):** hergebruikt bestaande tokens — `status-todo` voor READY, `status-blocked` voor BLOCKED, `status-done` voor DONE. Centraal gedefinieerd in `components/shared/pbi-status-select.tsx` (`PBI_STATUS_LABELS`, `PBI_STATUS_COLORS`); importeer die in plaats van kleuren ad-hoc te kopiëren. ### Dialog (bevestigingsdialogen) ```tsx import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '@/components/ui/alert-dialog' // Standaard bevestigingsdialoog voor verwijderacties PBI verwijderen? Dit verwijdert ook alle gekoppelde stories en taken. Deze actie is niet ongedaan te maken. Annuleren Verwijderen ``` ### Sheet (story detail slide-over) ```tsx import { Sheet, SheetContent, SheetHeader, SheetTitle } from '@/components/ui/sheet' {story.title} {/* story detail inhoud */} ``` ### Input en Textarea ```tsx import { Input } from '@/components/ui/input' import { Textarea } from '@/components/ui/textarea' // shadcn Input gebruikt --input-background automatisch uit theme.css