Daisyui Config

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

Configuration options for daisyUI 5

AI 生成的概览

记录 daisyUI 5 插件的配置选项,并给出示例 CSS 配置。

功能
该技能提供在 CSS 中配置 daisyUI 5 插件的参考文档。它列出 themes、root、include、exclude、prefix 和 logs 等配置项,并给出最简与完整示例配置。它还说明如何设置默认主题和 prefersdark 主题,以及如何通过 data-theme 属性切换主题。
适用场景
当你需要查阅 daisyUI 5 的配置方式时使用,例如启用主题、设置默认或深色主题、排除组件或添加类名前缀。它是编写或调整样式表中 daisyUI 插件配置的参考资料。
运行要求
无需脚本或特殊工具,仅为说明与参考内容。它假定项目使用 daisyUI 5,且 CSS 构建支持 @plugin 指令,并引用了外部文档。

Configuration

daisyUI 5 configuration documentation: https://daisyui.com/docs/config/

daisyUI with no configuration:

css
@plugin "daisyui";

daisyUI configuration with only the light theme:

css
@plugin "daisyui" {  themes: light --default;}

daisyUI with all default settings:

css
@plugin "daisyui" {  themes: light --default, dark --prefersdark;  root: ":root";  include: ;  exclude: ;  prefix: ;  logs: true;}

Example configuration: This configuration enables all built-in themes. The bumblebee theme is the default theme. The synthwave theme is the prefersdark theme, which is the default dark mode. To use another enabled theme, add data-theme="THEME_NAME" to the <html> element. The configuration excludes the root scrollbar gutter. It uses the daisy- prefix for all daisyUI classes and disables console logs.

css
@plugin "daisyui" {  themes: light, dark, cupcake, bumblebee --default, emerald, corporate, synthwave --prefersdark, retro, cyberpunk, valentine, halloween, garden, forest, aqua, lofi, pastel, fantasy, wireframe, black, luxury, dracula, cmyk, autumn, business, acid, lemonade, night, coffee, winter, dim, nord, sunset, caramellatte, abyss, silk;  root: ":root";  include: ;  exclude: rootscrollgutter, checkbox;  prefix: daisy-;  logs: false;}

来源与署名

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

许可证: 无许可证

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

举报或申请下架