Installation
The simplest and fastest way to get up and running with Tailwind CSS from scratch is with the Tailwind CLI tool. The CLI is also available as a standalone executable if you want to use it without installing Node.js.
Downloading the executable file - including the tailwindcss and @tailwindcss/cli Node.js packages - for your operating system.
# Download Tailwind CSS standaloneInvoke-WebRequest -Uri "https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-windows-x64.exe" -OutFile "tailwindcss.exe"# Make it executable (if needed)# No additional permissions needed on WindowsAdd the @import "tailwindcss"; import to your main CSS file.
@import "tailwindcss";Run the executable CLI tool to scan your source files for classes and build your CSS.
./tailwindcss.exe -i ./src/input.css -o ./src/output.css --watchAdd the @import "tailwindcss"; import to your main CSS file.
<!doctype html><html><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="./output.css" rel="stylesheet"></head><body> <h1 class="text-3xl font-bold underline"> Hello world! </h1></body></html>