UnoCSS
Edit this pageUnoCSS is an on-demand utility CSS library that integrates seamlessly with Solid as a Vite plugin.
Install Vite plugin
To get started with UnoCSS in your Solid app:
Import Vite plugin
After installation, open your vite.config.js
or vite.config.ts
. The default Solid Vite configuration looks like this:
Now, import unocssPlugin
from "unocss/vite" and add it to the plugins array:
Ensure that unocssPlugin
is ordered before solidPlugin
to prevent certain edge cases.
Import UnoCSS
In your root index.jsx
or index.tsx
file, import UnoCSS:
Alternatively, you can use the alias import "virtual:uno.css"
:
Support
For additional assistance, refer to the UnoCSS/Vite integration guide .