Thema's

CSS-variabelen en semantische tokens · InfraBIDS-huisstijl

shadcn · CSS variables

Eén compositie, twee thema's

Dezelfde bouwstenen gebruiken in licht en donker dezelfde tokennamen. De modusschakelaar bovenin wisselt het hele voorbeeld.

Button · variant="default"

Project De Noord

Voorbeeld
Componenten bekijken
Dossier compleet · voorbeeldstatus
bg-card · text-card-foreground · border-input · ring-ring

Vlak en voorgrond

De tekst- en icoonkleur horen bij het vlak waarop ze staan.

15 tokenparen

De Noord

background / foreground

Pagina en hoofdtekst

bg-background text-foreground

De Noord

surface / surface-foreground

Ondersteunend werkvlak

bg-surface text-surface-foreground

De Noord

card / card-foreground

Dossier en paneel

bg-card text-card-foreground

De Noord

popover / popover-foreground

Menu en zwevend detail

bg-popover text-popover-foreground

De Noord

primary / primary-foreground

Belangrijkste actie

bg-primary text-primary-foreground

De Noord

secondary / secondary-foreground

Ondersteunende actie

bg-secondary text-secondary-foreground

De Noord

muted / muted-foreground

Rustig vlak en bijschrift

bg-muted text-muted-foreground

De Noord

accent / accent-foreground

Selectie en interactie

bg-accent text-accent-foreground

De Noord

destructive / destructive-foreground

Fout en verwijderen

bg-destructive text-destructive-foreground

De Noord

success / success-foreground

Geslaagde handeling

bg-success text-success-foreground

De Noord

warning / warning-foreground

Aandacht vereist

bg-warning text-warning-foreground

De Noord

info / info-foreground

Informatie

bg-info text-info-foreground

De Noord

sidebar / sidebar-foreground

Navigatievlak

bg-sidebar text-sidebar-foreground

De Noord

sidebar-primary / sidebar-primary-foreground

Hoofdactie in navigatie

bg-sidebar-primary text-sidebar-primary-foreground

De Noord

sidebar-accent / sidebar-accent-foreground

Navigatieselectie

bg-sidebar-accent text-sidebar-accent-foreground

border · input · ring

Scheidingen, veldranden en zichtbare toetsenbordfocus.

sidebar-border · sidebar-ring

Randen en focus binnen de navigatie.

chart-1 … chart-5

Gedeelde hoekradius

De bestaande InfraBIDS-schaal is afgeleid van --radius. Deze blijft behouden; de neutrale shadcn-voorbeeldschaal vervangt de huisstijl niet.

rounded-sm

calc(var(--radius) - 2px)

rounded-md

var(--radius)

rounded-lg

calc(var(--radius) + 2px)

rounded-xl

calc(var(--radius) + 6px)

rounded-2xl

calc(var(--radius) + 10px)

rounded-3xl

calc(var(--radius) + 14px)

rounded-4xl

calc(var(--radius) + 18px)

Thema toepassen

Importeer de canonieke styles.css. Nieuwe kleuren krijgen waarden in :root én .dark, plus een @theme inline-koppeling. Houd fonts en componentvarianten ongewijzigd.

Semantische compositie
Semantische compositie
<section className="bg-background text-foreground">
  <Button variant="default">Aanvraag voorbereiden</Button>
  <p className="text-muted-foreground">Project De Noord</p>
</section>
CLI-configuratie · components.json
CLI-configuratie · components.json
"tailwind": {
  "css": "src/styles.css",
  "cssVariables": true
}
Een bestaand token beschikbaar maken
Een bestaand token beschikbaar maken
@theme inline {
  --color-warning: var(--warning);
  --color-warning-foreground: var(--warning-foreground);
}

/* Waarden staan al in :root en .dark in styles.css. */
White-label scope · bestaande merktokens
White-label scope · bestaande merktokens
.product-theme {
  --primary: var(--brand-infrabids);
  --primary-foreground: var(--brand-foreground);
  --ring: var(--brand-infrabids);
}

/* Laat overlays dezelfde scope erven.
   Controleer contrast in beide modi. */

Bron: aangeleverde shadcn Theming-richtlijnen, toegepast op de bestaande InfraBIDS-tokens. Geen neutraal preset geïnstalleerd; CSS-variabelen blijven ingeschakeld.