Tailwind

InstallationClassNames

Orbit tailwind preset

Installation

yarn add -D @kiwicom/orbit-tailwind-preset
npm install --save-dev @kiwicom/orbit-tailwind-preset

Configuration

const path = require("node:path");
const orbitComponentsPreset = require("@kiwicom/orbit-tailwind-preset");
// the following ensures the correct path is found (especially within monorepos)
const orbitComponentsPath = require
.resolve("@kiwicom/orbit-components")
.replace("/lib/index.js", "");
module.exports = {
content: [
// ...
path.join(orbitComponentsPath, "**", "*.js"),
],
// If you need, customize the base font family, e.g. with the System UI font stack (https://github.com/system-fonts/modern-font-stacks#system-ui)
theme: {
extend: {
fontFamily: {
base: "system-ui, sans-serif",
},
},
},
presets: [
orbitComponentsPreset({
disablePreflight: false, // default value
}),
],
};

Usage

<p class="text-blue-normal p-sm">...</p>