Home

Awesome

<p align="center" style="background-color: #FFFF99; padding: 15px; border-radius: 5px;"> <strong>⚠️ Windi CSS is Sunsetting ⚠️</strong><br> We are sunsetting Windi CSS and we recommend new projects to seek for alternatives. Read the <a href="https://windicss.org/posts/sunsetting.html">full blog post</a>. </p> <hr> <h1 align='center'>vite-plugin-windicss</h1> <p align='center'><a href="https://github.com/voorjaar/windicss">Windi CSS</a> for Vite, it's fast! ⚡️<br> </p> <p align='center'> <a href='https://www.npmjs.com/package/vite-plugin-windicss'> <img src='https://img.shields.io/npm/v/vite-plugin-windicss?color=0EA5E9&label='> </a> </p>

Features

Documentation

Read the documentation for more details.

New Features in v3.0

Attributify Mode

Enabled it by

// windi.config.ts
export default {
  attributify: true,
}

And use them as you would like:

<button 
  bg="blue-400 hover:blue-500 dark:blue-500 dark:hover:blue-600"
  text="sm white"
  font="mono light"
  p="y-2 x-4"
  border="2 rounded blue-200"
>
  Button
</button>

Prefix

If you are concerned about naming confliction, you can add custom prefix to attributify mode by:

// windi.config.ts
export default {
  attributify: {
    prefix: 'w:',
  },
}
<button 
  w:bg="blue-400 hover:blue-500 dark:blue-500 dark:hover:blue-600"
  w:text="sm white"
  w:font="mono light"
  w:p="y-2 x-4"
  w:border="2 rounded blue-200"
>
  Button
</button>

Alias Config

// windi.config.ts
export default {
  alias: {
    'hstack': 'flex items-center',
    'vstack': 'flex flex-col',
    'icon': 'w-6 h-6 fill-current',
    'app': 'text-red',
    'app-border': 'border-gray-200 dark:border-dark-300',
  },
}

Sponsors

<p align="center"> <a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg"> <img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/> </a> </p>

License

MIT License © 2021 Anthony Fu