Skip to content

Commit 2fdd6f3

Browse files
committed
add daisy ui
1 parent c277e22 commit 2fdd6f3

File tree

3 files changed

+76
-1
lines changed

3 files changed

+76
-1
lines changed

package-lock.json

+42
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"devDependencies": {
2828
"@astrojs/tailwind": "^3.1.1",
2929
"astro": "^2.5.7",
30+
"daisyui": "^3.0.3",
3031
"tailwindcss": "^3.3.2"
3132
},
3233
"dependencies": {

tailwind.config.cjs

+33-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = {
1414
secondaryBackground: '#fff',
1515
secondaryBorder: '#f0f9ff',
1616
secondaryText: '#64748b',
17+
accent: '#0EA5E9',
1718
primaryBorderDark: '#9DB2BF',
1819
primaryBackgroundDark: '#27374D',
1920
primaryTextDark: '#9DB2BF',
@@ -23,6 +24,37 @@ module.exports = {
2324
}
2425
},
2526
},
26-
plugins: [],
27+
daisyui: {
28+
themes: [
29+
{
30+
dark: {
31+
primaryBorderDark: '#9DB2BF',
32+
primaryBackgroundDark: '#27374D',
33+
primaryTextDark: '#9DB2BF',
34+
secondaryBorderDark: '#27374D',
35+
secondaryBackgroundDark: '#526D82',
36+
secondaryTextDark: '#DDE6ED',
37+
accent: '#1c7299',
38+
},
39+
light: {
40+
primaryBorder: '#6b7280',
41+
primaryBackground: '#f0f9ff',
42+
primaryText: '#0f172a',
43+
secondaryBackground: '#fff',
44+
secondaryBorder: '#f0f9ff',
45+
secondaryText: '#64748b',
46+
accent: '#0EA5E9',
47+
}
48+
}
49+
], // true: all themes | false: only light + dark | array: specific themes like this ["light", "dark", "cupcake"]
50+
darkTheme: "dark", // name of one of the included themes for dark mode
51+
base: false, // applies background color and foreground color for root element by default
52+
styled: true, // include daisyUI colors and design decisions for all components
53+
utils: true, // adds responsive and modifier utility classes
54+
rtl: false, // rotate style direction from left-to-right to right-to-left. You also need to add dir="rtl" to your html tag and install `tailwindcss-flip` plugin for Tailwind CSS.
55+
prefix: "", // prefix for daisyUI classnames (components, modifiers and responsive class names. Not colors)
56+
logs: true, // Shows info about daisyUI version and used config in the console when building your CSS
57+
},
58+
plugins: [require("daisyui")],
2759
}
2860

0 commit comments

Comments
 (0)