Skip to content

pantoken / bundlers/panda/src / toPandaPreset

Function: toPandaPreset()

toPandaPreset(tokens): PandaPreset

Experimental

Build a Panda preset from a token IR.

Parameters

tokens

readonly Token[]

The IR (e.g. from @pantoken/tokens).

Returns

PandaPreset

A preset object for Panda's definePreset.

Example

Build a preset from a custom IR

ts
import { defineConfig } from "@pandacss/dev";
import { toPandaPreset } from "@pantoken/panda";
import { byTheme } from "@pantoken/tokens";

const preset = toPandaPreset(byTheme("rebrand"));
export default defineConfig({ presets: [preset] });