Appearance
Installation
Add
unocss-preset-cssandunocssto your ECMAScript project as devDependencies (replace<your package manager>with your package manager, e.g.bun,npm,pnpm,yarn)shell<your package manager> add -D unocss @olets/unocss-preset-cssCreate
uno.config.tsoruno.config.js, your UnoCSS configuration file.Configure UnoCSS to use
unocss-preset-css. At the very least, addunocss-preset-cssas apreset. See https://unocss.dev/guide/config-file for documentation.WARNING
By default, UnoCSS looks for class names in
.astro,.elm,.html,.jsx,.mdx,.php,.phtml,.svelte,.tsx, and.vuefiles but not in.jsor.tsfiles. See https://unocss.dev/guide/extracting for how to change that.js// uno.config.ts import { defineConfig } from "unocss"; import presetCSS from "@olets/unocss-preset-css"; export default defineConfig({ presets: [presetCSS()], });Integrate UnoCSS with your stack. As of this writing, there's first-party support for Astro, CLI, ESLint, JetBrains, Nuxt, PostCSS, Svelte (scoped), Vite, VS Code, VSCodium, Webpack, as well as using UnoCSS over a CDN. See https://unocss.dev/integrations/ for documentation.
