Theming
Learn how to configure your theme
To configure your theme, you’ll need to use Tailwind Css config file, data-attributes
and css variables to style the overal UI or specific components.
Palette
Tailus Themer provides nine color palettes, each with primary, secondary, accent, success, danger, warning, info, gray, white, black, and transparent colors. Import these from the @tailus/themer-plugins
package to use as a foundation for your own palette.
The default palettes are:
trust
oz
mystery
passion
energy
nature
spring
winter
romance
Learn more about customizing the palette on the Palette page.
Border Radius
Apply the border radius using the data-rounded
attribute, preferably on the <html>
element.
The data-rounded
attribute accepts the following values :
none
default
small
medium
large
xlarge
2xlarge
3xlarge
full
Learn more about customizing the border radius on the Rounded page.
Shade
Adjust the background and border colors of your components using the data-shade
attribute. This change is more noticeable in dark mode.
The available shades are:
800
900
925
950
glassy
Learn more about customizing the shades on the Shade page.
Padding and Typography
You can adjust the padding and text colors of your components using CSS variables.
Padding variables
Define the padding CSS variables in your CSS file by assigning them values within the :root
selector. Make sure to place these definitions inside the @layer
base block for proper layering.
Text color variables
Define the text colors CSS variables in your CSS file by assigning them values within the :root
selector. Make sure to place these definitions inside the @layer
base block for proper layering.
Although you can assign any values to the CSS variables, we suggest using the theme
function to access values from the theme
object in your tailwind.config.ts
file. This approach promotes consistency across your styles.
Dark mode
Setting text colors in dark mode depends on your chosen implementation.
If you’re using the class
method (now replaced with selector
), create a .dark
class and assign the CSS variables there.
If you’re using the media
method, add the CSS variables within the @media (prefers-color-scheme: dark)
block.