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.jsonCover 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.
| Where | Pair | Light | Dark |
|---|---|---|---|
| Body text | foreground on background | 13.88:1 · Lc 100 | 15.05:1 · Lc 95 |
| Secondary text on the page | muted-foreground on background | 7.37:1 · Lc 86 | 8.93:1 · Lc 63 |
| Text in cards | card-foreground on card | 13.88:1 · Lc 100 | 13.72:1 · Lc 94 |
| Secondary text in cards | muted-foreground on card | 7.37:1 · Lc 86 | 8.14:1 · Lc 62 |
| Menus and popovers | popover-foreground on popover | 13.88:1 · Lc 100 | 13.72:1 · Lc 94 |
| Primary buttons | primary-foreground on primary | 4.51:1 · Lc 76 | 8.30:1 · Lc 62 |
| Links and outline accents | primary on background | 4.51:1 · Lc 71 | 8.54:1 · Lc 61 |
| Secondary buttons | secondary-foreground on secondary | 12.52:1 · Lc 93 | 12.36:1 · Lc 92 |
| Text on muted panels | muted-foreground on muted | 6.65:1 · Lc 79 | 7.33:1 · Lc 61 |
| Hovered menu items | accent-foreground on accent | 7.18:1 · Lc 79 | 9.07:1 · Lc 77 |
| Error messages | destructive on background | 6.58:1 · Lc 81 | 8.50:1 · Lc 61 |
| Sidebar | sidebar-foreground on sidebar | 13.41:1 · Lc 98 | 13.96:1 · Lc 94 |
| Sidebar active item | sidebar-primary-foreground on sidebar-primary | 4.51:1 · Lc 76 | 8.30:1 · Lc 62 |
| Sidebar hover | sidebar-accent-foreground on sidebar-accent | 12.52:1 · Lc 93 | 12.36:1 · Lc 92 |
| Focus ring | ring on background | 13.88:1 | 8.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.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/latoThe registry item: themes.dev/r/presets/cover.json. Free to use in any project.
: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.
