Tailwind Presets
Presets
Creating your own reusable configuration presets.
By default, any configuration you add in your own tailwind.config.js file is intelligently merged with the default configuration, with your own configuration acting as a set of overrides and extensions.
The presets option lets you specify a different configuration to use as your base, making it easy to package up a set of customizations that you’d like to reuse across projects.
tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
presets: [
require('@acmecorp/tailwind-base')
],
// ...
}This can be very useful for teams that manage multiple Tailwind projects for the same brand where they want a single source of truth for colors, fonts, and other common customizations.
Creating a preset
Presets are just regular Tailwind configuration objects, taking the exact same shape as the configuration you would add in your tailwind.config.js file.