Skip to content

Instantly share code, notes, and snippets.

@NeuronButter
Last active July 3, 2025 01:58
Show Gist options
  • Select an option

  • Save NeuronButter/e4cb4cc11953cdaa00736e7dd1b3e936 to your computer and use it in GitHub Desktop.

Select an option

Save NeuronButter/e4cb4cc11953cdaa00736e7dd1b3e936 to your computer and use it in GitHub Desktop.
Reasonable UnoCSS Starter
import { defineConfig } from 'unocss'
import presetIcons from '@unocss/preset-icons'
import presetWebFonts from '@unocss/preset-web-fonts'
import presetWind4 from '@unocss/preset-wind4'
import presetTypography from '@unocss/preset-typography'
export default defineConfig({
presets: [
presetWind4({
dark: 'media'
}),
presetIcons({
collections: {
ri: () => import('@iconify/json/json/ri.json').then((i) => i.default)
},
extraProperties: {
display: 'inline-block',
'vertical-align': 'middle'
}
}),
presetWebFonts({
provider: 'bunny',
fonts: {
sans: ['']
},
themeKey: 'font'
}),
presetTypography()
]
})
# This approach separately updates presets, however it is also possible for most presets to be imported directly from 'unocss'
pnpm add unocss @unocss/preset-icons @unocss/preset-web-fonts @unocss/preset-wind4 @unocss/preset-typography
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment