Customizing or extending the core tokens in Panda CSS involves adding or overriding default tokens
in the panda.config
file. This ensures our design remains consistent with custom styles.
Under the extend key within theme, add a tokens object to define custom tokens.
theme: {
extend: {
tokens: {
...
},
},
},
Each token is an object containing:
To illustrate, this is how to define custom cobalt colors:
theme: {
extend: {
tokens: {
colors: {
cobalt: {
50: { value: '#EBEDF9', description: 'color for cobalt.50' },
100: { value: '#D3D7EE', description: 'color for cobalt.100' },
}
},
},
},
},