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.jsonHearth 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.
| Where | Pair | Light | Dark |
|---|---|---|---|
| Body text | foreground on background | 13.90:1 · Lc 98 | 18.59:1 · Lc 104 |
| Secondary text on the page | muted-foreground on background | 6.42:1 · Lc 80 | 9.86:1 · Lc 64 |
| Text in cards | card-foreground on card | 14.69:1 · Lc 101 | 17.17:1 · Lc 104 |
| Secondary text in cards | muted-foreground on card | 6.78:1 · Lc 83 | 9.10:1 · Lc 63 |
| Menus and popovers | popover-foreground on popover | 14.69:1 · Lc 101 | 17.17:1 · Lc 104 |
| Primary buttons | primary-foreground on primary | 14.69:1 · Lc 104 | 9.02:1 · Lc 62 |
| Links and outline accents | primary on background | 13.90:1 · Lc 98 | 9.31:1 · Lc 61 |
| Secondary buttons | secondary-foreground on secondary | 12.54:1 · Lc 91 | 16.20:1 · Lc 103 |
| Text on muted panels | muted-foreground on muted | 5.79:1 · Lc 73 | 8.59:1 · Lc 63 |
| Hovered menu items | accent-foreground on accent | 7.27:1 · Lc 77 | 13.17:1 · Lc 100 |
| Error messages | destructive on background | 6.23:1 · Lc 77 | 9.27:1 · Lc 61 |
| Sidebar | sidebar-foreground on sidebar | 13.42:1 · Lc 95 | 17.69:1 · Lc 104 |
| Sidebar active item | sidebar-primary-foreground on sidebar-primary | 14.69:1 · Lc 104 | 9.02:1 · Lc 62 |
| Sidebar hover | sidebar-accent-foreground on sidebar-accent | 12.54:1 · Lc 91 | 16.20:1 · Lc 103 |
| Focus ring | ring on background | 6.79:1 | 8.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.jsonOr 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-sansThe registry item: themes.dev/r/presets/hearth.json. Free to use in any project.
: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.
