Customization
Learn how to customize the default theme.
The @theme
directive of your tailwind.css
file is where you define your project's color palette, type scale, fonts, breakpoints, border radius values, and more.
The @theme
directive contains variables for --breakpoint-*
, --color-*
, and --spacing-*
, as well as a key for each customizable core plugin.
See the theme configuration reference for a complete list of theme options.
The --breakpoint-*
variables allows you to customize the responsive breakpoints in your project.
The --color-*
variables allows you to customize the global color palette for your project.
The --spacing-*
variables allows you to customize the global spacing and sizing scale for your project.
Out of the box, your project will automatically inherit the values from Preline UI and Tailwind CSS. If you would like to customize the default theme, you have a few different options depending on your goals.
If you'd like to preserve the default values for a theme option but also add new values, add your variables in the @theme
directive of your configuration file.
For example, if you wanted to add an extra breakpoint but preserve the existing ones, you could extend the --breakpoint-*
variable:
To override a variable in the default theme, add your overrides directly under the @theme
directive of your tailwind.css
:
The official Tailwind CSS Theming documentation helps you to understand the full overview of the theming options.