UnoCSS 
UnoCSS is an Instant On-demand Atomic CSS Engine, similar to Tailwind CSS.
If you used the CLI method to install Minze you can extend your environment with UnoCSS quite quickly by adding unocss npm package.
The following guide is based on a fresh Minze CLI installation.
- Install dependencies.
 
bash
$ npm add -D unocss @unocss/postcssbash
$ yarn add -D unocss @unocss/postcssbash
$ pnpm add -D unocss @unocss/postcssbash
$ bun add -D unocss @unocss/postcss- Setup files. This will allow you to use UnoCSS in the entire project (components, css files, as well as preview templates).
 
- Create and populate 
uno.css,postcss.config.cjsanduno.config.jsfiles. - Import the 
uno.cssfile intovite.js. - Add UnoCSS Vite plugin, with the shadow-dom mode enabled, to your 
vite.config.jsfile. 
txt
├─ src/
|  ├─ assets/
|  |  ├─ uno.css // [!code ++]
|  |  └─ vite.css
|  ├─ ...
|  └─ vite.js // [!code warning]
├─ ...
├─ postcss.config.cjs // [!code ++]
├─ uno.config.js // [!code ++]
└─ vite.config.js // [!code warning]css
@unocss all;js
module.exports = {
  plugins: {
    '@unocss/postcss': {}
  }
}js
import { defineConfig, presetUno } from 'unocss'
export default defineConfig({
  theme: {},
  presets: [presetUno({ dark: 'media' })]
})js
import './assets/uno.css'
import './assets/vite.css'
// ...js
import { defineConfig } from 'vite'
import UnoCSS from 'unocss/vite'
import minze from 'vite-plugin-minze'
export default defineConfig({
  resolve: {
    alias: { '@': new URL('./src', import.meta.url).pathname }
  },
  plugins: [
    UnoCSS({ mode: 'shadow-dom' }),
    minze()
  ]
})- Create 
my-button.cssfile and populate it's contents. 
txt
src/
└─ lib/
   ├─ ...
   ├─ my-button.css // [!code ++]
   └─ my-button.jscss
button {
  @apply w-full sm:w-auto text-base font-bold rounded transition duration-100 px-4 py-3;
  color: var(--button-color, theme('colors.white'));
  background: var(--button-bg, theme('colors.sky.400'));
  &:hover {
    background: var(--button-bg-hover, theme('colors.sky.500'));
  }
}- Import the CSS file as 
?inlineand replace the css block with@unocss-placeholder ${css}. This block will be augmented with compiled CSS during processing. 
js
import { MinzeElement } from 'minze'
import css from './my-button.css?inline'
export class MyButton extends MinzeElement {
  html = () => `
    <button class="border-2 border-sky-500"> // [!code ++]
      <slot></slot>
    </button>
  `
  css = () => `@unocss-placeholder ${css};`
}TIP
For more details about UnoCSS and web components refer to the UnoCSS documentation.