Presets
Presets are the heart of UnoCSS. They let you make your own custom framework in minutes.
Using presets
To set presets to your project:
uno.config.ts
ts
import {defineConfig,presetAttributify,presetWind3 } from 'unocss'export defaultdefineConfig({presets: [presetAttributify({/* preset options */}),presetWind3(), // ...custom presets ],})
When thepresets
option is specified, the default preset will be ignored.
To disable the default preset, you can setpresets
to an empty array:
uno.config.ts
ts
import {defineConfig } from 'unocss'export defaultdefineConfig({presets: [],// disable default presetrules: [ // your custom rules ],})
You can checkofficial presets andcommunity presets for more.
Creating presets
To see how you can create your own custom preset, seeConfig: presets.