Getting Started
Foundations
Components
Theming & Colors
DinachiUI's semantic color system and how to customize it.
#Color System
DinachiUI uses CSS custom properties in OKLCH format, mapped to Tailwind utilities via @theme. Components reference semantic tokens like bg-primary and text-muted-foreground that automatically adapt to dark mode.
#Semantic Colors
#Background and Foreground
Background
--backgroundForeground
--foreground#Primary
Primary
--primaryPrimary Foreground
--primary-foreground#Secondary
Secondary
--secondarySecondary Foreground
--secondary-foreground#Accent
Accent
--accentAccent Foreground
--accent-foreground#Destructive
Destructive
--destructiveDestructive Foreground
--destructive-foreground#Muted
Muted
--mutedMuted Foreground
--muted-foreground#Border, Input, and Ring
Border
--borderInput
--inputRing
--ring#Customization
Override CSS custom properties in your globals.css to apply your own brand:
css
:root {
--primary: oklch(0.55 0.22 260);
--primary-foreground: oklch(0.98 0.01 260);
}
.dark {
--primary: oklch(0.70 0.18 260);
--primary-foreground: oklch(0.15 0.01 260);
}All components using bg-primary, text-primary-foreground, etc. will update automatically. Dark mode is handled by the .dark class — override the same variables inside .dark for dark-mode colors.