API reference
create
Define local component-scoped styles with full type-safety and static generation.
The create
method defines static, component-scoped styles using plain JavaScript objects.
It ensures type-safe keys, compile-time validation, and scoped class names through automatic hashing.
Plumeria statically extracts styles at build time, so there's no runtime cost or CSS injection overhead.
Atomic API
Even when used repeatedly, it has almost no impact on CSS bundle size.
🧪 Example
⚙️ Usage
⚠️ Beware of circular references
If modules reference each other circularly, the compiler will fail to compile them correctly. This design encourages a local, linear style structure that's easier to understand, faster to compile, and less error-prone across large codebases and bundlers like rscute.