Skip to content

pantoken / bundlers/tailwind/src / pantokenPreset

Function: pantokenPreset()

pantokenPreset(options?): TailwindPreset

Experimental

Build the pantoken Tailwind preset.

Parameters

options?

PantokenPresetOptions = {}

PantokenPresetOptions.

Returns

TailwindPreset

A Tailwind preset contributing colors, spacing, and fontFamily.

Examples

Register the preset in tailwind.config.ts

ts
import { pantokenPreset } from "@pantoken/tailwind";

export default {
  presets: [pantokenPreset()],
  content: ["./src/**/*.{ts,tsx}"],
};
// then use utilities like `bg-color-background-base p-space-md`

Also expose the primitive palette under a primitive- prefix

ts
import { pantokenPreset } from "@pantoken/tailwind";

export default {
  presets: [pantokenPreset({ includePrimitives: true })],
};