Vitrine, a shadcn/ui preset
Gallery black and white with Barlow; the dark mode is the original. It comes from Vitrine, one of our website themes.
Fonts: Barlow and Work Sans · radius 0rem · light and dark · lowest text contrast 6.54:1
npx shadcn@latest add https://www.themes.dev/r/presets/vitrine.jsonVitrine 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#0c0c0c
- primary#0c0c0c
- primary-foreground#ffffff
- secondary#f6f2f3
- muted-foreground#555553
- accent#ececea
- border#e2e2e0
- destructive#b3261e
- ring#0c0c0c
- chart-1#c1c1c1
- chart-2#929292
- chart-3#747474
- chart-4#5b5b5b
- chart-5#454545
Dark
- background#0c0c0c
- foreground#f4f4f2
- primary#ffffff
- primary-foreground#0c0c0c
- secondary#1d1b1b
- muted-foreground#c5c5c2
- accent#262626
- border#2c2c2c
- destructive#ff9586
- ring#ffffff
- chart-1#c4c4c4
- chart-2#9e9e9e
- chart-3#808080
- chart-4#636363
- chart-5#4d4d4d
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 | 19.57:1 · Lc 106 | 17.79:1 · Lc 100 |
| Secondary text on the page | muted-foreground on background | 7.47:1 · Lc 86 | 11.33:1 · Lc 71 |
| Text in cards | card-foreground on card | 18.21:1 · Lc 101 | 16.29:1 · Lc 100 |
| Secondary text in cards | muted-foreground on card | 6.95:1 · Lc 81 | 10.37:1 · Lc 70 |
| Menus and popovers | popover-foreground on popover | 18.21:1 · Lc 101 | 16.29:1 · Lc 100 |
| Primary buttons | primary-foreground on primary | 19.57:1 · Lc 108 | 19.57:1 · Lc 106 |
| Links and outline accents | primary on background | 19.57:1 · Lc 106 | 19.57:1 · Lc 108 |
| Secondary buttons | secondary-foreground on secondary | 17.65:1 · Lc 99 | 15.61:1 · Lc 99 |
| Text on muted panels | muted-foreground on muted | 6.74:1 · Lc 79 | 9.94:1 · Lc 70 |
| Hovered menu items | accent-foreground on accent | 16.57:1 · Lc 94 | 13.74:1 · Lc 98 |
| Error messages | destructive on background | 6.54:1 · Lc 81 | 9.23:1 · Lc 61 |
| Sidebar | sidebar-foreground on sidebar | 18.91:1 · Lc 103 | 16.98:1 · Lc 100 |
| Sidebar active item | sidebar-primary-foreground on sidebar-primary | 19.57:1 · Lc 108 | 19.57:1 · Lc 106 |
| Sidebar hover | sidebar-accent-foreground on sidebar-accent | 17.65:1 · Lc 99 | 15.61:1 · Lc 99 |
| Focus ring | ring on background | 19.57:1 | 19.57: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/vitrine.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 fonts:
npm i @fontsource-variable/barlow @fontsource-variable/work-sansThe registry item: themes.dev/r/presets/vitrine.json. Free to use in any project.
:root {
--radius: 0rem;
--background: oklch(1 0 0);
--foreground: oklch(0.154 0 0);
--card: oklch(0.975 0 0);
--card-foreground: oklch(0.154 0 0);
--popover: oklch(0.975 0 0);
--popover-foreground: oklch(0.154 0 0);
--primary: oklch(0.154 0 0);
--primary-foreground: oklch(1 0 0);
--secondary: oklch(0.965 0.004 0);
--secondary-foreground: oklch(0.154 0 0);
--muted: oklch(0.965 0.004 0);
--muted-foreground: oklch(0.449 0.003 106.53);
--accent: oklch(0.943 0.003 106.45);
--accent-foreground: oklch(0.154 0 0);
--destructive: oklch(0.501 0.178 28.7);
--border: oklch(0.912 0.003 106.45);
--input: oklch(0.537 0.005 106.55);
--ring: oklch(0.154 0 0);
--chart-1: oklch(0.81 0 0);
--chart-2: oklch(0.66 0 0);
--chart-3: oklch(0.56 0 0);
--chart-4: oklch(0.47 0 0);
--chart-5: oklch(0.39 0 0);
--sidebar: oklch(0.988 0 0);
--sidebar-foreground: oklch(0.154 0 0);
--sidebar-primary: oklch(0.154 0 0);
--sidebar-primary-foreground: oklch(1 0 0);
--sidebar-accent: oklch(0.965 0.004 0);
--sidebar-accent-foreground: oklch(0.154 0 0);
--sidebar-border: oklch(0.912 0.003 106.45);
--sidebar-ring: oklch(0.154 0 0);
}
.dark {
--background: oklch(0.154 0 0);
--foreground: oklch(0.967 0.003 106.45);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.967 0.003 106.45);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.967 0.003 106.45);
--primary: oklch(1 0 0);
--primary-foreground: oklch(0.154 0 0);
--secondary: oklch(0.224 0.004 0);
--secondary-foreground: oklch(0.967 0.003 106.45);
--muted: oklch(0.224 0.004 0);
--muted-foreground: oklch(0.823 0.004 106.49);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.967 0.003 106.45);
--destructive: oklch(0.778 0.13 29.07);
--border: oklch(0.293 0 0);
--input: oklch(0.633 0.004 106.52);
--ring: oklch(1 0 0);
--chart-1: oklch(0.82 0 0);
--chart-2: oklch(0.7 0 0);
--chart-3: oklch(0.6 0 0);
--chart-4: oklch(0.5 0 0);
--chart-5: oklch(0.42 0 0);
--sidebar: oklch(0.184 0 0);
--sidebar-foreground: oklch(0.967 0.003 106.45);
--sidebar-primary: oklch(1 0 0);
--sidebar-primary-foreground: oklch(0.154 0 0);
--sidebar-accent: oklch(0.224 0.004 0);
--sidebar-accent-foreground: oklch(0.967 0.003 106.45);
--sidebar-border: oklch(0.293 0 0);
--sidebar-ring: oklch(1 0 0);
}
@theme inline {
--font-sans: "Barlow Variable", "Barlow", ui-sans-serif, system-ui, sans-serif;
--font-heading: "Work Sans Variable", "Work Sans", ui-sans-serif, system-ui, sans-serif;
}
The whole site
Vitrine started as Vitrine, a website theme
Vitrine is a complete site for Museums, galleries and archives: 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.
