Over 10000 Themes for shadcn/ui available.

Explore themes

Feedback Colorsfor shadcn/ui

New

Wanna work with me?

1

Generate Colors

2

Add to Tailwind Config

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))", }
3

Add Styles

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%;
    }
  }
4

Optional: Add Variants

Add new variants to your components.

@/components/ui/button.tsx

destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 border border-destructive-foreground/10", success: "bg-success text-success-foreground hover:bg-success/90 border border-success-foreground/10", warning: "bg-warning text-warning-foreground hover:bg-warning/90 border border-warning-foreground/10", info: "bg-info text-info-foreground hover:bg-info/90 border border-info-foreground/10"