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: 2 63% 45%;
--destructive-foreground: 0 0% 100%;
--success: 108 63% 45%;
--success-foreground: 108 63% 5%;
--warning: 51 63% 45%;
--warning-foreground: 51 63% 5%;
--info: 182 63% 45%;
--info-foreground: 182 63% 5%;
}
.dark {
--destructive: 15 63% 16%;
--destructive-foreground: 15 63% 76%;
--success: 146 63% 16%;
--success-foreground: 146 63% 56%;
--warning: 18 63% 16%;
--warning-foreground: 18 63% 76%;
--info: 206 63% 16%;
--info-foreground: 206 63% 76%;
}
}
Add new variants to your components.