Skip to content

Keyfob, a shadcn/ui preset

Purple with Kumbh Sans, from a coworking theme. It comes from Keyfob, one of our website themes.

Fonts: Kumbh Sans · radius 0rem · light and dark · lowest text contrast 5.48:1

npx shadcn@latest add https://www.themes.dev/r/presets/keyfob.json
Edit in the generator

Keyfob on six free blocks from themes.dev UI. Scroll inside the preview.

The colours

The main variables, light and dark. The full set of 31 per mode, sidebar and charts included, is in the CSS below.

Light

  • background#ffffff
  • foreground#33261e
  • primary#a000f6
  • primary-foreground#ffffff
  • secondary#f6f2f3
  • muted-foreground#655f59
  • accent#f4e8fe
  • border#e4e1de
  • destructive#b3261e
  • ring#a000f6
  • chart-1#d9a7ff
  • chart-2#bb53ff
  • chart-3#9935e2
  • chart-4#7a1eb9
  • chart-5#600695

Dark

  • background#0d0d0d
  • foreground#fafafa
  • primary#d999ff
  • primary-foreground#121212
  • secondary#1f1c1d
  • muted-foreground#b9b9b9
  • accent#342742
  • border#2b2b2b
  • destructive#ff9693
  • ring#ce8eff
  • chart-1#dbabff
  • chart-2#c26dff
  • chart-3#a545f0
  • chart-4#832bc3
  • chart-5#68189f

Contrast, checked

Every pair shadcn/ui draws text with, measured as WCAG 2 contrast (AA needs 4.5:1) and APCA Lc (we ask 60 for text). Focus rings need 3:1 on the page.

WherePairLightDark
Body textforeground on background14.63:1 · Lc 10118.59:1 · Lc 104
Secondary text on the pagemuted-foreground on background6.30:1 · Lc 819.87:1 · Lc 64
Text in cardscard-foreground on card14.63:1 · Lc 10117.16:1 · Lc 104
Secondary text in cardsmuted-foreground on card6.30:1 · Lc 819.11:1 · Lc 63
Menus and popoverspopover-foreground on popover14.63:1 · Lc 10117.16:1 · Lc 104
Primary buttonsprimary-foreground on primary5.48:1 · Lc 808.92:1 · Lc 62
Links and outline accentsprimary on background5.48:1 · Lc 759.20:1 · Lc 61
Secondary buttonssecondary-foreground on secondary13.20:1 · Lc 9416.20:1 · Lc 103
Text on muted panelsmuted-foreground on muted5.69:1 · Lc 748.60:1 · Lc 63
Hovered menu itemsaccent-foreground on accent8.33:1 · Lc 7913.29:1 · Lc 100
Error messagesdestructive on background6.54:1 · Lc 819.27:1 · Lc 61
Sidebarsidebar-foreground on sidebar14.13:1 · Lc 9917.69:1 · Lc 104
Sidebar active itemsidebar-primary-foreground on sidebar-primary5.48:1 · Lc 808.92:1 · Lc 62
Sidebar hoversidebar-accent-foreground on sidebar-accent13.20:1 · Lc 9416.20:1 · Lc 103
Focus ringring on background5.48:18.26:1

Use it

With the shadcn CLI, in a project set up with shadcn init:

npx shadcn@latest add https://www.themes.dev/r/presets/keyfob.json

Or paste the CSS into globals.css (Next.js) or your main stylesheet (Vite, Astro), replacing the :root and .dark values that are there.

Then load the font:

npm i @fontsource-variable/kumbh-sans

The registry item: themes.dev/r/presets/keyfob.json. Free to use in any project.

globals.css
:root {
  --radius: 0rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.281 0.024 53.06);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.281 0.024 53.06);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.281 0.024 53.06);
  --primary: oklch(0.561 0.29 305.86);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.965 0.004 0);
  --secondary-foreground: oklch(0.281 0.024 53.06);
  --muted: oklch(0.965 0.004 0);
  --muted-foreground: oklch(0.489 0.012 67.54);
  --accent: oklch(0.947 0.032 309.94);
  --accent-foreground: oklch(0.414 0.213 306.55);
  --destructive: oklch(0.501 0.178 28.7);
  --border: oklch(0.911 0.005 67.76);
  --input: oklch(0.597 0.012 63.24);
  --ring: oklch(0.561 0.29 305.86);
  --chart-1: oklch(0.804 0.132 309.58);
  --chart-2: oklch(0.651 0.248 308.61);
  --chart-3: oklch(0.56 0.244 305.86);
  --chart-4: oklch(0.47 0.22 305.86);
  --chart-5: oklch(0.39 0.197 305.86);
  --sidebar: oklch(0.988 0 0);
  --sidebar-foreground: oklch(0.281 0.024 53.06);
  --sidebar-primary: oklch(0.561 0.29 305.86);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.965 0.004 0);
  --sidebar-accent-foreground: oklch(0.281 0.024 53.06);
  --sidebar-border: oklch(0.911 0.005 67.76);
  --sidebar-ring: oklch(0.561 0.29 305.86);
}

.dark {
  --background: oklch(0.16 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.782 0.155 312.32);
  --primary-foreground: oklch(0.18 0 0);
  --secondary: oklch(0.23 0.004 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.23 0.004 0);
  --muted-foreground: oklch(0.785 0 0);
  --accent: oklch(0.3 0.05 305.86);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.782 0.127 22);
  --border: oklch(0.29 0 0);
  --input: oklch(0.34 0 0);
  --ring: oklch(0.753 0.169 309.08);
  --chart-1: oklch(0.814 0.125 309.73);
  --chart-2: oklch(0.692 0.215 308.71);
  --chart-3: oklch(0.6 0.244 305.86);
  --chart-4: oklch(0.5 0.22 305.86);
  --chart-5: oklch(0.42 0.197 305.86);
  --sidebar: oklch(0.19 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.782 0.155 312.32);
  --sidebar-primary-foreground: oklch(0.18 0 0);
  --sidebar-accent: oklch(0.23 0.004 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.29 0 0);
  --sidebar-ring: oklch(0.753 0.169 309.08);
}

@theme inline {
  --font-sans: "Kumbh Sans Variable", "Kumbh Sans", ui-sans-serif, system-ui, sans-serif;
  --font-heading: "Kumbh Sans Variable", "Kumbh Sans", ui-sans-serif, system-ui, sans-serif;
}

The whole site

Keyfob started as Keyfob, a website theme

Keyfob is a complete site for Gyms and fitness clubs: every page, the content model and a live demo, built from the same blocks, in Astro and Next.js + Sanity. It comes with UI Pro, from €199 once, with every other theme.

More shadcn/ui presets

All 37 presets