Catppuccin colors are available in TailwindCSS using the ctp prefix.
Color Usage
Apply colors using classes like bg-ctp-base, text-ctp-text, or color scales like from-ctp-red-400.
Gradients
Gradients are supported using the standard Tailwind gradient syntax combined with the ctp prefix (e.g., bg-linear-50 from-ctp-red-400 to-ctp-mauve-400).
Forcing Flavour Variants
You can force specific flavours by wrapping elements in a class named after the flavour (latte, frappe, macchiato, or mocha). This is useful for custom theme switchers.
<!-- All colours are prefixed with `ctp` -->
<body class="bg-ctp-base">
<h1 class="text-ctp-text">Welcome!</h1>
<!-- Gradients are supported too -->
<button
className="bg-linear-50 from-ctp-red-400 to-ctp-mauve-400 text-ctp-base hover:from-ctp-red hover:to-ctp-mauve"
>
Click Here
</button>
<!-- Flavour variants allow forcing specific flavours -->
<div className="latte">
<p class="bg-ctp-base text-ctp-text">Hello from Latte!</p>
</div>
</body>