Daisyui Install

作者 saadeghi9adbeaa25981无许可证42K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

Installation instructions for daisyUI 5

AI 生成的概览

提供 daisyUI 5 配合 Tailwind CSS 4 的安装说明,包括 npm 与 CDN 方式。

功能
该技能提供将 daisyUI 5 与 Tailwind CSS 4 一起安装的分步指导。内容涵盖 npm 安装、所需的 CSS 导入与插件语句,以及适用于浏览器环境的 CDN 替代方案。它还指向独立安装和针对多种构建工具与框架的安装指南。
适用场景
当你在使用 Tailwind CSS 4 的项目中配置 daisyUI 5 时使用,无论通过 npm 还是 CDN。当你需要为特定框架或构建工具选择对应的安装指南时也适用。
运行要求
需要 Tailwind CSS 4 和 daisyUI 5;npm 安装需要 Node.js,CDN 方式只需浏览器。获取软件包或 CDN 文件需要网络访问。不包含脚本。

Install daisyUI 5

Installation guide

  1. You must use Tailwind CSS 4 with daisyUI 5.
  2. The tailwind.config.js file is deprecated in Tailwind CSS v4. Do not use tailwind.config.js. If Tailwind CSS v4 is a Node.js dependency, add only @import "tailwindcss"; to the CSS file.
  3. To install daisyUI 5, run npm i -D daisyui@latest. Then, add @plugin "daisyui"; to the CSS file.
  4. Install daisyUI as a dependency when possible. If you have a specific reason to use a CDN instead, use the Tailwind CSS and daisyUI CDN files:
html
<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" /><script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
  1. If Tailwind CSS and daisyUI are Node.js dependencies, use this CSS file:
css
@import "tailwindcss";@plugin "daisyui";

CDN

For a browser setup with no installation, load the precompiled daisyUI CSS and the Tailwind browser build:

html
<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" /><script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The main CDN file includes the light and dark themes. To load all built-in themes, use:

html
<link href="https://cdn.jsdelivr.net/npm/daisyui@5/themes.css" rel="stylesheet" type="text/css" />

You can also combine separate daisyUI CSS modules from the CDN. The CDN files do not include the is-drawer-open: and is-drawer-close: variants.

Standalone and framework-specific setup

Use the file paths and integration steps in the selected guide. Each framework can use a different CSS entry.

来源与署名

来源:saadeghi/daisyui位于skills/daisyui/install提交9adbeaa

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架