Skip to content

pantoken-root / bundlers/tailwind/src / pantokenPreset

ฟังก์ชัน: pantokenPreset() ​

pantokenPreset(options?): TailwindPreset

ทดลอง

สร้าง preset ของ pantoken Tailwind.

พารามิเตอร์ ​

options? ​

PantokenPresetOptions = {}

PantokenPresetOptions.

คืนค่า ​

TailwindPreset

preset ของ Tailwind ที่เพิ่ม 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 })],
};