Useful Preset
These are some of the most common and useful UnoCSS presets that I have summarized and used. They are all built into prsetUseful
, which you can use in your project as ondemand.
Built-In Presets
Preset | Description | Enabled by default | Official |
---|---|---|---|
presetUno | The default preset for UnoCSS. | ✅ | ✅ |
presetAttributify | This enables the attributify mode for other presets. | ✅ | ✅ |
presetIcons | Use any icon with Pure CSS for UnoCSS. | ✅ | ✅ |
presetTypography | Provides a set of prose classes you can use to add typographic defaults to vanilla HTML. | ❌ | ✅ |
presetWebFonts | Use web fonts from Google Fonts, FontShare by simply providing the font names. | ❌ | ✅ |
presetTagify | This enables the tagify mode for other presets. | ❌ | ✅ |
presetRemToPx | Converts rem to px for all utilities. | ❌ | ✅ |
presetScrollbar | Scrollbar for UnoCSS preset. | ❌ | ❌ |
presetMagicss | Integrate magic animation into unocss preset. | ❌ | ❌ |
Built-In Transformers
Transformer | Description | Enabled by default | Official |
---|---|---|---|
transformerDirectives | UnoCSS transformer for @apply, @screen and theme() directives. | ✅ | ✅ |
transformerVariantGroup | Enables the variant group feature of Windi CSS for UnoCSS. | ✅ | ✅ |
transformerCompileClass | Compile group of classes into one class. | ❌ | ✅ |