API reference
defineConsts
Define static constant values to use inside Plumeria styles.
The defineConsts
function defines static constant values (not CSS variables) that can be used inside create()
or defineTokens()
for conditions like media queries or other static references.
It is useful for creating values such as breakpoints, spacing scales, or other fixed design constants that don't rely on CSS variable resolution.
Example
These constants are fully type-safe, readonly, and enforced as as const.
Using constants in styles
You can use these constants for any static keys inside styles or tokens.
Good to know
When using RSC with Next.js etc., webpack-plugin is used inside next-plugin, and variables are AST analyzed and inlined.