Skip to content

Passage, a shadcn/ui preset

Raspberry with Open Sans and Nunito headings, from a travel theme. It comes from Passage, one of our website themes.

Fonts: Open Sans and Nunito · radius 0.75rem · light and dark · lowest text contrast 6.08:1

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

Passage 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#2a2a2a
  • primary#a8195a
  • primary-foreground#ffffff
  • secondary#f6f2f3
  • muted-foreground#575d5b
  • accent#f8e7ee
  • border#dce3e0
  • destructive#b42318
  • ring#a8195a
  • chart-1#ff98bd
  • chart-2#e05f8e
  • chart-3#b84670
  • chart-4#953157
  • chart-5#762042

Dark

  • background#111816
  • foreground#ecefee
  • primary#fa95bd
  • primary-foreground#1a0610
  • secondary#1f2926
  • muted-foreground#b2bbb7
  • accent#36232b
  • border#2a3632
  • destructive#ff9a8c
  • ring#f08cb4
  • chart-1#ff9ec0
  • chart-2#ee6c9a
  • chart-3#c6537c
  • chart-4#9f3a60
  • chart-5#7f294a

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 background14.35:1 · Lc 10115.58:1 · Lc 96
Secondary text on the pagemuted-foreground on background6.74:1 · Lc 839.17:1 · Lc 64
Text in cardscard-foreground on card14.35:1 · Lc 10114.12:1 · Lc 95
Secondary text in cardsmuted-foreground on card6.74:1 · Lc 838.31:1 · Lc 62
Menus and popoverspopover-foreground on popover14.35:1 · Lc 10114.12:1 · Lc 95
Primary buttonsprimary-foreground on primary7.12:1 · Lc 889.41:1 · Lc 63
Links and outline accentsprimary on background7.12:1 · Lc 838.70:1 · Lc 61
Secondary buttonssecondary-foreground on secondary12.95:1 · Lc 9412.92:1 · Lc 94
Text on muted panelsmuted-foreground on muted6.08:1 · Lc 767.60:1 · Lc 61
Hovered menu itemsaccent-foreground on accent7.79:1 · Lc 788.62:1 · Lc 69
Error messagesdestructive on background6.58:1 · Lc 818.78:1 · Lc 62
Sidebarsidebar-foreground on sidebar13.87:1 · Lc 9914.52:1 · Lc 95
Sidebar active itemsidebar-primary-foreground on sidebar-primary7.12:1 · Lc 889.41:1 · Lc 63
Sidebar hoversidebar-accent-foreground on sidebar-accent12.95:1 · Lc 9412.92:1 · Lc 94
Focus ringring on background7.12:17.82: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/passage.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 fonts:

npm i @fontsource-variable/open-sans @fontsource-variable/nunito

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

globals.css
:root {
  --radius: 0.75rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.285 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.285 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.285 0 0);
  --primary: oklch(0.484 0.181 0.2);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.965 0.004 0);
  --secondary-foreground: oklch(0.285 0 0);
  --muted: oklch(0.965 0.004 0);
  --muted-foreground: oklch(0.472 0.008 174.07);
  --accent: oklch(0.943 0.021 350.55);
  --accent-foreground: oklch(0.419 0.157 0.15);
  --destructive: oklch(0.5 0.182 29.51);
  --border: oklch(0.91 0.009 168.73);
  --input: oklch(0.604 0.013 176.04);
  --ring: oklch(0.484 0.181 0.2);
  --chart-1: oklch(0.796 0.13 357.53);
  --chart-2: oklch(0.66 0.167 0.2);
  --chart-3: oklch(0.56 0.152 0.2);
  --chart-4: oklch(0.47 0.138 0.2);
  --chart-5: oklch(0.39 0.123 0.2);
  --sidebar: oklch(0.988 0 0);
  --sidebar-foreground: oklch(0.285 0 0);
  --sidebar-primary: oklch(0.484 0.181 0.2);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.965 0.004 0);
  --sidebar-accent-foreground: oklch(0.285 0 0);
  --sidebar-border: oklch(0.91 0.009 168.73);
  --sidebar-ring: oklch(0.484 0.181 0.2);
}

.dark {
  --background: oklch(0.201 0.011 175.83);
  --foreground: oklch(0.95 0.003 174.48);
  --card: oklch(0.241 0.015 174.65);
  --card-foreground: oklch(0.95 0.003 174.48);
  --popover: oklch(0.241 0.015 174.65);
  --popover-foreground: oklch(0.95 0.003 174.48);
  --primary: oklch(0.787 0.129 355.17);
  --primary-foreground: oklch(0.162 0.04 350.42);
  --secondary: oklch(0.271 0.015 175.83);
  --secondary-foreground: oklch(0.95 0.003 174.48);
  --muted: oklch(0.271 0.015 175.83);
  --muted-foreground: oklch(0.784 0.012 170.16);
  --accent: oklch(0.281 0.032 351.58);
  --accent-foreground: oklch(0.837 0.085 353.15);
  --destructive: oklch(0.787 0.124 28.61);
  --border: oklch(0.32 0.018 172.88);
  --input: oklch(0.619 0.016 168.93);
  --ring: oklch(0.757 0.129 355.17);
  --chart-1: oklch(0.806 0.122 357.4);
  --chart-2: oklch(0.7 0.167 0.2);
  --chart-3: oklch(0.6 0.152 0.2);
  --chart-4: oklch(0.5 0.138 0.2);
  --chart-5: oklch(0.42 0.123 0.2);
  --sidebar: oklch(0.231 0.011 175.83);
  --sidebar-foreground: oklch(0.95 0.003 174.48);
  --sidebar-primary: oklch(0.787 0.129 355.17);
  --sidebar-primary-foreground: oklch(0.162 0.04 350.42);
  --sidebar-accent: oklch(0.271 0.015 175.83);
  --sidebar-accent-foreground: oklch(0.95 0.003 174.48);
  --sidebar-border: oklch(0.32 0.018 172.88);
  --sidebar-ring: oklch(0.757 0.129 355.17);
}

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

The whole site

Passage started as Passage, a website theme

Passage is a complete site for Holiday parks and short breaks: 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