Over 10000 Themes for shadcn/ui available.
Explore themesUsed by 4k+ developers. Want me to build your product next? Let's work together.
Add the colors to your config file. (Nested under theme ➡︎ extend ➡︎ colors). Just search for destructive in your current config and insert it below.
tailwind.config.js
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
success: {
DEFAULT: "hsl(var(--success))",
foreground: "hsl(var(--success-foreground))",
},
warning: {
DEFAULT: "hsl(var(--warning))",
foreground: "hsl(var(--warning-foreground))",
},
info: {
DEFAULT: "hsl(var(--info))",
foreground: "hsl(var(--info-foreground))",
}
globals.css
@layer base {
:root {
--destructive: 9 51% 75%;
--destructive-foreground: 9 51% 15%;
--success: 113 51% 75%;
--success-foreground: 113 51% 15%;
--warning: 43 51% 75%;
--warning-foreground: 43 51% 15%;
--info: 209 51% 75%;
--info-foreground: 209 51% 15%;
}
.dark {
--destructive: 7 51% 13%;
--destructive-foreground: 7 51% 73%;
--success: 146 51% 13%;
--success-foreground: 146 51% 53%;
--warning: 17 51% 13%;
--warning-foreground: 17 51% 73%;
--info: 194 51% 13%;
--info-foreground: 194 51% 73%;
}
}
Add new variants to your components.