Linen, a shadcn/ui preset
Soft violet with Nunito and Syne, made for a wellness studio. It comes from Linen, one of our website themes.
Fonts: Nunito and Syne · radius 0.25rem · light and dark · lowest text contrast 5.00:1
npx shadcn@latest add https://www.themes.dev/r/presets/linen.jsonLinen 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#f7f5fb
- foreground#1b1d3a
- primary#7a55bf
- primary-foreground#ffffff
- secondary#ece9f1
- muted-foreground#5a5d75
- accent#ece6f7
- border#e3e2ec
- destructive#b42318
- ring#7a55bf
- chart-1#caaeff
- chart-2#9c7ce0
- chart-3#7d61b9
- chart-4#634996
- chart-5#4c3577
Dark
- background#14151f
- foreground#f1effa
- primary#c0a5fa
- primary-foreground#15152b
- secondary#242630
- muted-foreground#b8b7d0
- accent#2a2749
- border#2e2f40
- destructive#ff9988
- ring#b79cf0
- chart-1#ccb2ff
- chart-2#a889ee
- chart-3#896dc6
- chart-4#6b52a0
- chart-5#543e81
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 | 15.12:1 · Lc 98 | 15.96:1 · Lc 97 |
| Secondary text on the page | muted-foreground on background | 5.95:1 · Lc 76 | 9.25:1 · Lc 64 |
| Text in cards | card-foreground on card | 16.38:1 · Lc 103 | 14.47:1 · Lc 96 |
| Secondary text in cards | muted-foreground on card | 6.45:1 · Lc 82 | 8.39:1 · Lc 63 |
| Menus and popovers | popover-foreground on popover | 16.38:1 · Lc 103 | 14.47:1 · Lc 96 |
| Primary buttons | primary-foreground on primary | 5.42:1 · Lc 82 | 8.56:1 · Lc 62 |
| Links and outline accents | primary on background | 5.00:1 · Lc 71 | 8.67:1 · Lc 61 |
| Secondary buttons | secondary-foreground on secondary | 13.61:1 · Lc 91 | 13.29:1 · Lc 95 |
| Text on muted panels | muted-foreground on muted | 5.36:1 · Lc 70 | 7.71:1 · Lc 62 |
| Hovered menu items | accent-foreground on accent | 6.78:1 · Lc 75 | 9.10:1 · Lc 74 |
| Error messages | destructive on background | 6.08:1 · Lc 75 | 8.75:1 · Lc 61 |
| Sidebar | sidebar-foreground on sidebar | 14.59:1 · Lc 95 | 14.89:1 · Lc 97 |
| Sidebar active item | sidebar-primary-foreground on sidebar-primary | 5.42:1 · Lc 82 | 8.56:1 · Lc 62 |
| Sidebar hover | sidebar-accent-foreground on sidebar-accent | 13.61:1 · Lc 91 | 13.29:1 · Lc 95 |
| Focus ring | ring on background | 5.00:1 | 7.79: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/linen.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/nunito @fontsource-variable/syneThe registry item: themes.dev/r/presets/linen.json. Free to use in any project.
:root {
--radius: 0.25rem;
--background: oklch(0.973 0.008 301.36);
--foreground: oklch(0.245 0.055 278.57);
--card: oklch(1 0 0);
--card-foreground: oklch(0.245 0.055 278.57);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.245 0.055 278.57);
--primary: oklch(0.54 0.16 296.79);
--primary-foreground: oklch(1 0 0);
--secondary: oklch(0.938 0.012 301.36);
--secondary-foreground: oklch(0.245 0.055 278.57);
--muted: oklch(0.938 0.012 301.36);
--muted-foreground: oklch(0.485 0.039 279.27);
--accent: oklch(0.935 0.024 301.95);
--accent-foreground: oklch(0.442 0.155 294.39);
--destructive: oklch(0.5 0.182 29.51);
--border: oklch(0.916 0.014 290.74);
--input: oklch(0.644 0.036 283.46);
--ring: oklch(0.54 0.16 296.79);
--chart-1: oklch(0.804 0.116 299.59);
--chart-2: oklch(0.66 0.147 296.79);
--chart-3: oklch(0.56 0.134 296.79);
--chart-4: oklch(0.47 0.122 296.79);
--chart-5: oklch(0.39 0.109 296.79);
--sidebar: oklch(0.961 0.008 301.36);
--sidebar-foreground: oklch(0.245 0.055 278.57);
--sidebar-primary: oklch(0.54 0.16 296.79);
--sidebar-primary-foreground: oklch(1 0 0);
--sidebar-accent: oklch(0.938 0.012 301.36);
--sidebar-accent-foreground: oklch(0.245 0.055 278.57);
--sidebar-border: oklch(0.916 0.014 290.74);
--sidebar-ring: oklch(0.54 0.16 296.79);
}
.dark {
--background: oklch(0.2 0.02 279.54);
--foreground: oklch(0.957 0.015 294.47);
--card: oklch(0.241 0.022 280.11);
--card-foreground: oklch(0.957 0.015 294.47);
--popover: oklch(0.241 0.022 280.11);
--popover-foreground: oklch(0.957 0.015 294.47);
--primary: oklch(0.778 0.121 298.2);
--primary-foreground: oklch(0.208 0.043 282.01);
--secondary: oklch(0.27 0.02 279.54);
--secondary-foreground: oklch(0.957 0.015 294.47);
--muted: oklch(0.27 0.02 279.54);
--muted-foreground: oklch(0.788 0.035 287.4);
--accent: oklch(0.294 0.06 286.05);
--accent-foreground: oklch(0.861 0.07 297.74);
--destructive: oklch(0.784 0.126 29.74);
--border: oklch(0.313 0.03 281.12);
--input: oklch(0.605 0.051 283.43);
--ring: oklch(0.748 0.121 298.2);
--chart-1: oklch(0.814 0.109 299.64);
--chart-2: oklch(0.7 0.147 296.79);
--chart-3: oklch(0.6 0.134 296.79);
--chart-4: oklch(0.5 0.122 296.79);
--chart-5: oklch(0.42 0.109 296.79);
--sidebar: oklch(0.23 0.02 279.54);
--sidebar-foreground: oklch(0.957 0.015 294.47);
--sidebar-primary: oklch(0.778 0.121 298.2);
--sidebar-primary-foreground: oklch(0.208 0.043 282.01);
--sidebar-accent: oklch(0.27 0.02 279.54);
--sidebar-accent-foreground: oklch(0.957 0.015 294.47);
--sidebar-border: oklch(0.313 0.03 281.12);
--sidebar-ring: oklch(0.748 0.121 298.2);
}
@theme inline {
--font-sans: "Nunito Variable", "Nunito", ui-sans-serif, system-ui, sans-serif;
--font-heading: "Syne Variable", "Syne", ui-sans-serif, system-ui, sans-serif;
}
The whole site
Linen 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.
