Skip to main content

Windi CSS

Windi CSS is a utility-first CSS framework that provides utility classes to build designs directly in your markup. It scans your source code and generates only the CSS you need, resulting in fast load times and small bundle sizes.

Demo

show code
import { createPlayground } from 'livecodes';

const options = {
"config": {
"activeEditor": "markup",
"markup": {
"language": "html",
"content": "<div class=\"flex items-center justify-center h-screen bg-gray-100\">\n <h1 class=\"text-4xl font-bold text-blue-500\">Hello, Windi CSS!</h1>\n</div>\n"
},
"processors": [
"windicss"
]
}
};
createPlayground('#container', options);

Usage

Windi CSS is a CSS processor that can be enabled from the style editor menu, or configured via the processors property of the configuration object.

Once enabled, all Windi CSS utility classes are available immediately in your markup.

Usage with JSX and Framework SFCs

Windi CSS can detect class names added in JSX and framework SFCs such as React, Vue, and Svelte. Make sure the Windi CSS processor is enabled.

Processor Info

Name

windicss

Editor

style

Compiler

Windi CSS official compiler, running client-side in the browser. The compiler generates styles on-demand, so only the classes used in your markup are included in the output.

Version

windicss: v3.5.6

Custom Settings

Custom settings added to the property windicss are passed as configuration to Windi CSS. Please check the documentation for full reference.

Please note that custom settings should be valid JSON (i.e. functions are not allowed).

Example:

Custom Settings
{
"windicss": {
"attributify": true
}
}

Starter Template

https://livecodes.io/?template=windicss