2025-07-31 19:44:25 +08:00
2025-07-31 09:52:50 +08:00
2025-07-31 09:52:50 +08:00
2025-07-31 15:41:00 +08:00
2025-07-31 09:52:50 +08:00
2025-07-31 15:41:00 +08:00
2025-07-31 15:41:00 +08:00
2025-07-31 15:41:00 +08:00
2025-07-31 19:44:25 +08:00
2025-07-31 15:41:00 +08:00

Astro with DaisyUI Starter Kit: Basics

Tailwind v4 + Astrojs + DaisyUI

Screenshot

astro_daisyui_screenshot.png

🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

/
├── public/
│   └── favicon.svg
├── src
│   ├── assets
│   │   └── astro.svg
│   ├── components
│   │   └── Welcome.astro
│   ├── layouts
│   │   └── Layout.astro
│   └── pages
│       └── index.astro
└── package.json

🧞 Themes

To change themes

// global.css

@plugin "daisyui";


@plugin "daisyui" {
  themes: light --default, dark --prefersdark, corporate;
}

// in html tag

<html data-theme="corporate" lang="en"></html>

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:4321
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro -- --help Get help using the Astro CLI

Install Notes

npm create astro@latest

npm install tailwindcss@latest @tailwindcss/vite@latest daisyui@latest
npm install --save-dev --save-exact prettier prettier-plugin-astro

npx astro add react

Description
No description provided
Readme 239 KiB
Languages
Astro 90.1%
JavaScript 6.1%
CSS 3.8%