Over 10000 Themes for shadcn/ui available.
Explore themesWanna work with me?
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: 14 41% 47%;
--destructive-foreground: 0 0% 100%;
--success: 111 41% 47%;
--success-foreground: 111 41% 7%;
--warning: 43 41% 47%;
--warning-foreground: 0 0% 0%;
--info: 200 41% 47%;
--info-foreground: 0 0% 100%;
}
.dark {
--destructive: 8 41% 10%;
--destructive-foreground: 8 41% 70%;
--success: 134 41% 10%;
--success-foreground: 134 41% 50%;
--warning: 28 41% 10%;
--warning-foreground: 28 41% 70%;
--info: 188 41% 10%;
--info-foreground: 188 41% 70%;
}
}
Add new variants to your components.