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: 3 89% 48%;
--destructive-foreground: 0 0% 100%;
--success: 145 89% 48%;
--success-foreground: 145 89% 8%;
--warning: 30 89% 48%;
--warning-foreground: 30 89% 8%;
--info: 205 89% 48%;
--info-foreground: 0 0% 100%;
}
.dark {
--destructive: 11 89% 5%;
--destructive-foreground: 11 89% 65%;
--success: 149 89% 5%;
--success-foreground: 149 89% 45%;
--warning: 46 89% 5%;
--warning-foreground: 46 89% 45%;
--info: 230 89% 5%;
--info-foreground: 230 89% 85%;
}
}
Add new variants to your components.