Skip to content

Hearth, a shadcn/ui preset

Aubergine with Plus Jakarta Sans: Linen’s warmer set. It comes from Linen, one of our website themes.

Fonts: Plus Jakarta Sans · radius 0.125rem · light and dark · lowest text contrast 5.79:1

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

Hearth 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#fcf8f2
  • foreground#3a1f36
  • primary#3a1f36
  • primary-foreground#ffffff
  • secondary#f2ece4
  • muted-foreground#6a5565
  • accent#f5e6ee
  • border#eadfd1
  • destructive#b42318
  • ring#8a3a70
  • chart-1#d9b3d2
  • chart-2#a786a1
  • chart-3#876a81
  • chart-4#6b5166
  • chart-5#523d4f

Dark

  • background#0f0d0b
  • foreground#fbfaf9
  • primary#cca9c6
  • primary-foreground#14110f
  • secondary#211c18
  • muted-foreground#bcb8b5
  • accent#342a32
  • border#2e2b28
  • destructive#ff9693
  • ring#c7a4c1
  • chart-1#dcb6d5
  • chart-2#b492ae
  • chart-3#93758d
  • chart-4#735a6f
  • chart-5#5b4557

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 background13.90:1 · Lc 9818.59:1 · Lc 104
Secondary text on the pagemuted-foreground on background6.42:1 · Lc 809.86:1 · Lc 64
Text in cardscard-foreground on card14.69:1 · Lc 10117.17:1 · Lc 104
Secondary text in cardsmuted-foreground on card6.78:1 · Lc 839.10:1 · Lc 63
Menus and popoverspopover-foreground on popover14.69:1 · Lc 10117.17:1 · Lc 104
Primary buttonsprimary-foreground on primary14.69:1 · Lc 1049.02:1 · Lc 62
Links and outline accentsprimary on background13.90:1 · Lc 989.31:1 · Lc 61
Secondary buttonssecondary-foreground on secondary12.54:1 · Lc 9116.20:1 · Lc 103
Text on muted panelsmuted-foreground on muted5.79:1 · Lc 738.59:1 · Lc 63
Hovered menu itemsaccent-foreground on accent7.27:1 · Lc 7713.17:1 · Lc 100
Error messagesdestructive on background6.23:1 · Lc 779.27:1 · Lc 61
Sidebarsidebar-foreground on sidebar13.42:1 · Lc 9517.69:1 · Lc 104
Sidebar active itemsidebar-primary-foreground on sidebar-primary14.69:1 · Lc 1049.02:1 · Lc 62
Sidebar hoversidebar-accent-foreground on sidebar-accent12.54:1 · Lc 9116.20:1 · Lc 103
Focus ringring on background6.79:18.83: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/hearth.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/plus-jakarta-sans

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

globals.css
:root {
  --radius: 0.125rem;
  --background: oklch(0.981 0.009 78.28);
  --foreground: oklch(0.285 0.056 332.49);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.285 0.056 332.49);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.285 0.056 332.49);
  --primary: oklch(0.285 0.056 332.49);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.946 0.013 78.28);
  --secondary-foreground: oklch(0.285 0.056 332.49);
  --muted: oklch(0.946 0.013 78.28);
  --muted-foreground: oklch(0.476 0.037 334.63);
  --accent: oklch(0.939 0.019 343.95);
  --accent-foreground: oklch(0.428 0.123 341.84);
  --destructive: oklch(0.5 0.182 29.51);
  --border: oklch(0.909 0.022 74.08);
  --input: oklch(0.59 0.028 342.31);
  --ring: oklch(0.475 0.127 341.91);
  --chart-1: oklch(0.81 0.06 332.49);
  --chart-2: oklch(0.66 0.055 332.49);
  --chart-3: oklch(0.56 0.05 332.49);
  --chart-4: oklch(0.47 0.046 332.49);
  --chart-5: oklch(0.39 0.041 332.49);
  --sidebar: oklch(0.969 0.009 78.28);
  --sidebar-foreground: oklch(0.285 0.056 332.49);
  --sidebar-primary: oklch(0.285 0.056 332.49);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.946 0.013 78.28);
  --sidebar-accent-foreground: oklch(0.285 0.056 332.49);
  --sidebar-border: oklch(0.909 0.022 74.08);
  --sidebar-ring: oklch(0.475 0.127 341.91);
}

.dark {
  --background: oklch(0.16 0.006 56);
  --foreground: oklch(0.985 0.002 56);
  --card: oklch(0.205 0.006 56);
  --card-foreground: oklch(0.985 0.002 56);
  --popover: oklch(0.205 0.006 56);
  --popover-foreground: oklch(0.985 0.002 56);
  --primary: oklch(0.775 0.056 332.49);
  --primary-foreground: oklch(0.18 0.006 56);
  --secondary: oklch(0.23 0.01 56);
  --secondary-foreground: oklch(0.985 0.002 56);
  --muted: oklch(0.23 0.01 56);
  --muted-foreground: oklch(0.785 0.006 56);
  --accent: oklch(0.3 0.02 332.49);
  --accent-foreground: oklch(0.985 0.002 56);
  --destructive: oklch(0.782 0.127 22);
  --border: oklch(0.29 0.006 56);
  --input: oklch(0.34 0.006 56);
  --ring: oklch(0.76 0.056 332.49);
  --chart-1: oklch(0.82 0.06 332.49);
  --chart-2: oklch(0.7 0.055 332.49);
  --chart-3: oklch(0.6 0.05 332.49);
  --chart-4: oklch(0.5 0.046 332.49);
  --chart-5: oklch(0.42 0.041 332.49);
  --sidebar: oklch(0.19 0.006 56);
  --sidebar-foreground: oklch(0.985 0.002 56);
  --sidebar-primary: oklch(0.775 0.056 332.49);
  --sidebar-primary-foreground: oklch(0.18 0.006 56);
  --sidebar-accent: oklch(0.23 0.01 56);
  --sidebar-accent-foreground: oklch(0.985 0.002 56);
  --sidebar-border: oklch(0.29 0.006 56);
  --sidebar-ring: oklch(0.76 0.056 332.49);
}

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

The whole site

Hearth started as Linen, a website theme

Linen is a complete site for Health practices: 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