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 is type-safe keys, compile-time validation, and scoped class names through automatic hashing.
Only the styles you use in css.props()
will be compiled.
Atomic API
Even when used repeatedly, it has almost no impact on CSS bundle size.
Example
Usage
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.