Slider for shadcn/ui

Slider is a shadcn/ui theme built around a muted light red primary color (#d6c2c3) with muted light red accents (#e0d2d3). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light red primary (#d6c2c3) on a red-tinted background (#0d0707).

Color palette

TokenLightDark
Background
#ffffffwhite
#0d0707black
Foreground
#0f0506black
#faf4f5whitesmoke
Card
#fcfcfcsnow
#110909black
Card foreground
#0b0404black
#fcf8f8snow
Popover
#ffffffwhite
#0d0707black
Popover foreground
#0f0506black
#faf4f5whitesmoke
Primary
#d6c2c3thistle
#d6c2c3thistle
Primary foreground
#3d292adarkslategray
#3d292adarkslategray
Secondary
#ece9e9linen
#3a2c2ddarkslategray
Secondary foreground
#594a4bdarkslategray
#d3c5c6lightgrey
Muted
#f7eeeelinen
#110809black
Muted foreground
#6f5859dimgray
#a79091rosybrown
Accent
#e0d2d3lightgrey
#4d3234darkslategray
Accent foreground
#4b3435darkslategray
#e1d1d2lightgrey
Destructive
#9f3d04saddlebrown
#fa792etomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d6c2c3thistle
#d6c2c3thistle

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background20.10:1AAA
Text on card19.88:1AAA
Primary button7.99:1AAA
Secondary button6.93:1AA
Muted text5.71:1AA
Accent7.76:1AAA
Destructive6.67:1AA
Dark mode
Text on background18.37:1AAA
Text on card18.69:1AAA
Primary button7.99:1AAA
Secondary button7.97:1AAA
Muted text6.61:1AA
Accent7.79:1AAA
Destructive7.81:1AAA

CSS variables

Paste this into your globals.css to use Slider in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.134 0.021 16.03);
  --muted: oklch(0.955 0.01 13.814);
  --muted-foreground: oklch(0.483 0.032 14.942);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.134 0.021 16.03);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.121 0.018 15.627);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.831 0.022 14.135);
  --primary-foreground: oklch(0.306 0.029 15.591);
  --secondary: oklch(0.936 0.004 13.691);
  --secondary-foreground: oklch(0.425 0.02 14.552);
  --accent: oklch(0.875 0.015 13.956);
  --accent-foreground: oklch(0.353 0.033 15.568);
  --destructive: oklch(0.49 0.143 43.019);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.831 0.022 14.135);
  --chart-1: oklch(0.831 0.022 14.135);
  --chart-2: oklch(0.936 0.004 13.691);
  --chart-3: oklch(0.875 0.015 13.956);
  --chart-4: oklch(0.96 0.002 13.658);
  --chart-5: oklch(0.829 0.025 14.223);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.012 14.898);
  --foreground: oklch(0.973 0.006 13.738);
  --muted: oklch(0.149 0.017 15.669);
  --muted-foreground: oklch(0.674 0.029 14.467);
  --popover: oklch(0.138 0.012 14.898);
  --popover-foreground: oklch(0.973 0.006 13.738);
  --card: oklch(0.15 0.014 15.389);
  --card-foreground: oklch(0.982 0.004 13.693);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.831 0.022 14.135);
  --primary-foreground: oklch(0.306 0.029 15.591);
  --secondary: oklch(0.309 0.021 15.008);
  --secondary-foreground: oklch(0.835 0.016 13.991);
  --accent: oklch(0.351 0.039 15.957);
  --accent-foreground: oklch(0.873 0.018 14.016);
  --destructive: oklch(0.715 0.178 46.598);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.831 0.022 14.135);
  --chart-1: oklch(0.831 0.022 14.135);
  --chart-2: oklch(0.309 0.021 15.008);
  --chart-3: oklch(0.351 0.039 15.957);
  --chart-4: oklch(0.338 0.024 15.053);
  --chart-5: oklch(0.829 0.025 14.223);
}