Semantic colors for consistent status and feedback across themes.
Overview
Semantic color tokens provide a consistent way to communicate status and feedback across your application. Each status type includes multiple color variants:
- base - Primary status color
- bg - Background color for status containers
- fg - Foreground/text color for status content
- border - Border color for status elements
- muted - Muted variant for secondary status indicators
Available Status Colors
Success
Success: Operation completed successfully
Error
Error: Something went wrong. Please try again.
Warning
Warning: Please review this action before proceeding.
Info
Info: Here's some helpful information for you.
Usage
CSS Variables
123456789101112131415161718192021222324
React Components
Use semantic colors in your components:
1234567891011121314151617181920212223242526
Using semantic colors with Tailwind
Semantic colors should be consumed via CSS variables (so they can adapt to light/dark themes). In Tailwind, use arbitrary values:
Theme Support
Semantic colors automatically adapt to the current theme (light, dark). The colors are optimized for each theme to ensure proper contrast and readability.
Best Practices
- Use semantic colors consistently: Always use status color tokens instead of hardcoded colors
- Consider context: Use bg/fg variants for containers, base for accents
- Test contrast: Ensure text is readable in all themes
- Use appropriate variants: Use muted for secondary indicators, base for primary actions
Links