Use daisyUI with Tailwind CSS Standalone CLI

How to run daisyUI with Tailwind CSS Standalone CLI without Node.js

1. Get Tailwind CSS executable

Follow Tailwind CSS guide and get the latest version of Tailwind CSS executable.

2. Get daisyUI bundled JS file

Run this code to download latest version of daisyUI as a single js file and put it next to Tailwind’s executable file.

Terminal
curl -sLo daisyui.js https://esm.run/daisyui@5/index.js

3. Add Tailwind CSS and daisyUI

Add Tailwind CSS and daisyUI to your CSS file.
Address your HTML and other markup files in the source function.

input.css
@import "tailwindcss" source(none);
@source "./public/*.{html,php,erb}";
@plugin "./daisyui.js";

4. Build CSS

Run this command to build the CSS file using Tailwind CSS executable

Terminal
./tailwindcss -i input.css -o output.css

Now you can use daisyUI class names!

Do you have a question? Ask on GitHub or Discord server
Do you like daisyUI? Post about it!
Support daisyUI's development: Open Collective
daisyUI store

NEXUS
Official daisyUI Dashboard Template

Available on daisyUI store

More details