Macaron
Edit this pageMacaron is compile-time CSS-in-JS library that offers type safety.
Installation
- Install and set up the macaron plugin for your bundler:
- Within your
vite.config.js
folder, add the macaron plugin prior to other plugins:
Usage
- Import
styled
from@macaron-css/solid
and create a styled component:
- Add styles that will be applied to the components by default:
Variants can be added using the variants
key:
Additionally, the defaultVariants
feature is set to variants
by default. This can be overridden at the time of usage:
These components can be used like any other Solid component, with type-safe props derived from your variants. For more information on how to use macaron, visit their documentation.