Skip to content

Cover, a shadcn/ui preset

Mint on white with Lato, from an insurance site that wants to feel kind. It comes from Cover, one of our website themes.

Fonts: Lato · radius 0.625rem · light and dark · lowest text contrast 4.51:1

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

Cover 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#153039
  • primary#02885d
  • primary-foreground#ffffff
  • secondary#f6f2f3
  • muted-foreground#46595f
  • accent#dcf5eb
  • border#d7e2e1
  • destructive#b42318
  • ring#153039
  • chart-1#52ddac
  • chart-2#22ab80
  • chart-3#008a64
  • chart-4#016d4d
  • chart-5#005539

Dark

  • background#0e1b1f
  • foreground#e6efee
  • primary#3bcb9a
  • primary-foreground#0b1f1a
  • secondary#1e2c30
  • muted-foreground#a9bcbf
  • accent#16362f
  • border#253b41
  • destructive#ff9889
  • ring#34c696
  • chart-1#56e1af
  • chart-2#36b78c
  • chart-3#1b9670
  • chart-4#007655
  • chart-5#005d41

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.88:1 · Lc 10015.05:1 · Lc 95
Secondary text on the pagemuted-foreground on background7.37:1 · Lc 868.93:1 · Lc 63
Text in cardscard-foreground on card13.88:1 · Lc 10013.72:1 · Lc 94
Secondary text in cardsmuted-foreground on card7.37:1 · Lc 868.14:1 · Lc 62
Menus and popoverspopover-foreground on popover13.88:1 · Lc 10013.72:1 · Lc 94
Primary buttonsprimary-foreground on primary4.51:1 · Lc 768.30:1 · Lc 62
Links and outline accentsprimary on background4.51:1 · Lc 718.54:1 · Lc 61
Secondary buttonssecondary-foreground on secondary12.52:1 · Lc 9312.36:1 · Lc 92
Text on muted panelsmuted-foreground on muted6.65:1 · Lc 797.33:1 · Lc 61
Hovered menu itemsaccent-foreground on accent7.18:1 · Lc 799.07:1 · Lc 77
Error messagesdestructive on background6.58:1 · Lc 818.50:1 · Lc 61
Sidebarsidebar-foreground on sidebar13.41:1 · Lc 9813.96:1 · Lc 94
Sidebar active itemsidebar-primary-foreground on sidebar-primary4.51:1 · Lc 768.30:1 · Lc 62
Sidebar hoversidebar-accent-foreground on sidebar-accent12.52:1 · Lc 9312.36:1 · Lc 92
Focus ringring on background13.88:18.10: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/cover.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/lato

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

globals.css
:root {
  --radius: 0.625rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.292 0.037 221.44);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.292 0.037 221.44);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.292 0.037 221.44);
  --primary: oklch(0.553 0.12 162.46);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.965 0.004 0);
  --secondary-foreground: oklch(0.292 0.037 221.44);
  --muted: oklch(0.965 0.004 0);
  --muted-foreground: oklch(0.45 0.025 219.01);
  --accent: oklch(0.949 0.029 169.71);
  --accent-foreground: oklch(0.416 0.083 164.33);
  --destructive: oklch(0.5 0.182 29.51);
  --border: oklch(0.904 0.012 190.42);
  --input: oklch(0.628 0.021 213.47);
  --ring: oklch(0.292 0.037 221.44);
  --chart-1: oklch(0.81 0.14 165.93);
  --chart-2: oklch(0.66 0.129 165.93);
  --chart-3: oklch(0.561 0.117 165.7);
  --chart-4: oklch(0.473 0.1 164.35);
  --chart-5: oklch(0.396 0.086 162.88);
  --sidebar: oklch(0.988 0 0);
  --sidebar-foreground: oklch(0.292 0.037 221.44);
  --sidebar-primary: oklch(0.553 0.12 162.46);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.965 0.004 0);
  --sidebar-accent-foreground: oklch(0.292 0.037 221.44);
  --sidebar-border: oklch(0.904 0.012 190.42);
  --sidebar-ring: oklch(0.292 0.037 221.44);
}

.dark {
  --background: oklch(0.211 0.02 221.38);
  --foreground: oklch(0.945 0.01 189.06);
  --card: oklch(0.247 0.022 220.32);
  --card-foreground: oklch(0.945 0.01 189.06);
  --popover: oklch(0.247 0.022 220.32);
  --popover-foreground: oklch(0.945 0.01 189.06);
  --primary: oklch(0.754 0.14 165.93);
  --primary-foreground: oklch(0.221 0.028 175.3);
  --secondary: oklch(0.281 0.02 221.38);
  --secondary-foreground: oklch(0.945 0.01 189.06);
  --muted: oklch(0.281 0.02 221.38);
  --muted-foreground: oklch(0.782 0.021 208.13);
  --accent: oklch(0.306 0.04 177.27);
  --accent-foreground: oklch(0.867 0.086 166.61);
  --destructive: oklch(0.784 0.126 29.3);
  --border: oklch(0.336 0.03 219.01);
  --input: oklch(0.643 0.024 214.49);
  --ring: oklch(0.739 0.14 165.93);
  --chart-1: oklch(0.82 0.14 165.93);
  --chart-2: oklch(0.7 0.129 165.93);
  --chart-3: oklch(0.6 0.118 165.93);
  --chart-4: oklch(0.501 0.105 165.43);
  --chart-5: oklch(0.423 0.09 164.27);
  --sidebar: oklch(0.241 0.02 221.38);
  --sidebar-foreground: oklch(0.945 0.01 189.06);
  --sidebar-primary: oklch(0.754 0.14 165.93);
  --sidebar-primary-foreground: oklch(0.221 0.028 175.3);
  --sidebar-accent: oklch(0.281 0.02 221.38);
  --sidebar-accent-foreground: oklch(0.945 0.01 189.06);
  --sidebar-border: oklch(0.336 0.03 219.01);
  --sidebar-ring: oklch(0.739 0.14 165.93);
}

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

The whole site

Cover started as Cover, a website theme

Cover is a complete site for Insurance comparison sites and brokers: 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