Skip to content

pantoken-root / bundlers/tailwind/src / pantokenPreset

פונקציה: pantokenPreset() ​

pantokenPreset(options?): TailwindPreset

ניסיוני

בנה את ה-pantoken Tailwind preset.

פרמטרים ​

options? ​

PantokenPresetOptions = {}

PantokenPresetOptions.

מחזיר ​

TailwindPreset

Tailwind preset שתורם colors, spacing ו-fontFamily.

דוגמאות ​

הוסף את ה-preset בקובץ tailwind.config.ts

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

export default {
  presets: [pantokenPreset()],
  content: ["./src/**/*.{ts,tsx}"],
};
// load the config with `@config` in your Tailwind v4 stylesheet, then use
// utilities like `bg-background-base p-space-md`

גם לחשוף את פלטת ה-primitive תחת הקידומת primitive-

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

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