Package Exports
- @unocss/runtime
Readme
@unocss/runtime
Expiremental CSS-in-JS runtime of UnoCSS.
CDN Usage
Add this line to your index.html and play:
<script src="https://unpkg.com/@unocss/runtime"></script>To configure UnoCSS (optional):
<script>
// pass unocss options
window.__unocss = {
rules: [
// custom rules...
],
presets: [
// custom presets...
],
// ...
}
</script>By default, @unocss/preset-uno will be applied.
CDN Builds
Core
Without any preset:
<script src="https://unpkg.com/@unocss/runtime/core.global.js"></script>Uno (default)
With @unocss/preset-uno preset:
<script src="https://unpkg.com/@unocss/runtime/uno.global.js"></script>Attributify
With @unocss/preset-uno and @unocss/preset-attributify presets:
<script src="https://unpkg.com/@unocss/runtime/attributify.global.js"></script>Bundler Usage
npm i @unocss/runtimeimport initUnocssRuntime from '@unocss/runtime'
initUnocssRuntime({ /* options */ })License
MIT License © 2021 Anthony Fu