Theming
Mijn-UI uses Tawilind CSS variables for themeing.
MijnUI uses tailwind-variants
under the hood for styling, a utility developed by the NextUI team and component theme implementations also take inspiration from their work.
Variables List
-
main
colors for backgrounds, text, and borders across the UI. -
surface
colors For panels, cards, and other contained elements. -
primary
colors for buttons, links, and other primary actions. -
secondary
colors for buttons, links, and other primary actions. -
accent
colors For interactive elements like hover effects. -
muted
colors for disabled or inactive elements. -
border
andring
colors -
input-border
Color Used in form fields like Input, Select, and Textarea.
Status Colors
-
info
Color for background, text, and text color when the background is filled for informational elements. -
warning
Color for background, text, and text color when the background is filled for warning elements. -
danger
Color for background, text, and text color when the background is filled for danger elements. -
success
Color for background, text, and text color when the background is filled for success elements.
Overriding Colors
To override the default themes, you can easily redefine them in your CSS file. Use the provided list of variables as a reference to modify specific colors.
For example, to override the --main
color:
Note:
Colors must be defined in HSL format without parentheses. Otherwise, you may encounter unexpected color results.
Adding New 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.
Other Color Formats
You can also use other color formats if you prefer. Tailwind CSS supports various color formats including RGB, RGBA, and HSL.
For more information on using different color formats, refer to the Tailwind CSS documentation.