Installation

Getting started with Windmill

Install

The first of three steps is installing Windmill via npm:

Terminal
npm install @windmill/react-ui

Add to Tailwind

The second step is to wrap the content of your Tailwind configuration file with Windmill. It will merge the necessary styles and plugins and you can keep using your config file as usual. If you don't have Tailwind configured yet, see the docs.

tailwind.config.js
const windmill = require('@windmill/react-ui/config')
module.exports = windmill({
purge: [],
theme: {
extend: {},
},
variants: {},
plugins: [],
})

Usage

The last step is to add it to your React project, enclosing your root component with the component Windmill.

App.js
import React from 'react'
import ReactDOM from 'react-dom'
import { Windmill } from '@windmill/react-ui'
ReactDOM.render(
<Windmill>
<App />
</Windmill>,
document.getElementById('root')
)

Read more about the Windmill component (how to use custom themes, utilities, etc).

Dark theme

Read more about it in its own section.