Theming
Mijn-UI uses Tailwind CSS variables for theming with comprehensive light and dark mode support.
Color System
Mijn-UI uses a comprehensive color system with CSS variables that automatically adapt to light and dark modes. Each color has multiple variants for different use cases.
Base Colors
background
andforeground
- Primary background and text colorsborder
- Default border colormuted
- Muted backgrounds and secondary elementsinverse
- Inverted colors for contrast
Primary Colors
The primary color system includes multiple variants for different emphasis levels:
Secondary Colors
Status Colors
Each status color (success, warning, danger) includes a full set of variants:
Success Colors
Warning Colors
Danger Colors
Design Tokens
Border Radius
Shadows
Dark Mode
Dark mode is automatically handled through the .dark
class. All colors are redefined for optimal contrast and readability:
Color Variants Explained
Each color family includes several variants for different use cases:
- Base color (
--primary
) - The main color - Foreground (
--primary-foreground
) - Text color when used on the base color - Subtle (
--primary-subtle
) - Lighter version for backgrounds - Foreground Subtle (
--primary-foreground-subtle
) - Text color for subtle backgrounds - Emphasis (
--primary-emphasis
) - Darker/more saturated version for emphasis - Border (
--border-primary
) - Border color matching the emphasis - Border Subtle (
--border-primary-subtle
) - Lighter border color
Adding Custom Colors
To add new colors, you need to add them to your CSS file and to your tailwind.config.js file.
You can now use the new colors in your components:
Typography
The theme uses Inter as the default font family:
Best Practices
- Use semantic color names - Prefer
primary
,success
,danger
over specific color names - Leverage color variants - Use
-subtle
for backgrounds,-emphasis
for interactive states - Test in both modes - Always verify your designs work in both light and dark modes
- Maintain contrast - Ensure sufficient contrast ratios for accessibility
For more information on using different color formats, refer to the Tailwind CSS documentation.