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 從公開儲存庫中收錄這些內容。

檢舉或申請下架