Design system

Light only Ritorno tokens, fonts, type scale, radius, shadow and motion.

Light only, one blue, ink for actions. Mobile first: guests scan a QR code on a cheap Android phone, staff use the dashboard on a phone or a desktop.

Tokens live in packages/ui/src/styles/theme.css (values) and globals.css (Tailwind mapping, type scale, utilities). Never hard code a color, never add a per component token, never add a dark variant: there is no .dark and no theme switch.

Color

TokenHexUse
background, card, popover#ffffffpages, cards
surface (= muted, secondary, sidebar)#f4f4f3sidebar, table header, skeletons, panels
canvas#f0f0eflanding below the hero, footer
border, input#e4e4e2every border
foreground, primary, ink-900#0b0b0ctext, the black pill action
muted-foreground, ink-500#6b6b70secondary text (4.8:1 on surface)
ink-400#8e8e93icons only, never text
navy#0b1f3atext on the sky
blue-50 to blue-900brand blue-500 #0a84ffaccent is blue-50, ring is blue-600, links blue-700
success, warning, destructive, info#1a7f37, #a15c00, #d1242f, blue-700text and icons, each with a *-soft fill
chart-1 to chart-5blue-500, navy, #0e8a80, #c26a00, #6e56cfone series is chart-1
sky-1 to sky-4, cloud#0a84ff to #dcefffPixelSky only

Contrast rules:

  • body text is foreground or muted-foreground, on white, surface or canvas
  • blue-500 is for icons and text of 24 px or more, never a button. Small blue text is blue-600 or blue-700
  • buttons are ink with white text. Status is never color only: pair it with an icon or a word

Hotel branding

Our own UI keeps ink as --primary. A hotel's primary_color and accent_color become --primary and --brand-accent (with a black or white foreground, whichever reads better) through brandStyle (@ritorno/common/color), only on guest pages (/h, /s, /u, /r, /o), emails and the dashboard previews (hotel-previews, offer-card-preview, brand-preview). The dashboard shell never takes hotel colors. brandContrastIssues flags a color under 3:1 (WCAG 1.4.11) against PAGE_BACKGROUNDS (page white, surface #f4f4f3); the admin and settings forms show a warning, they do not block.

Fonts

All next/font/google, self hosted, display: "swap", declared in each app's app/fonts.ts.

RoleFontLoading
UI (font-sans)Geist, variablepreloaded
Display en, fr (font-display)Newsreader italic, variable opsz and wghtpreloaded on web only
Mono (font-mono)Geist Mononot preloaded
Arabic bodyNoto Sans Arabic, variablenot preloaded
Arabic displayNoto Naskh Arabic, uprightnot preloaded
  • fonts.ts sets --font-geist, --font-geist-mono, --font-newsreader, --font-noto-sans-arabic, --font-noto-naskh-arabic. globals.css builds the Tailwind families from them: font-sans, font-serif, font-mono, font-arabic, font-arabic-serif
  • font-sans switches on lang: Geist first in en and fr, Noto Sans Arabic first in ar. Mixed text still picks a font per character
  • font-display is the serif voice: Newsreader italic under :lang(en) and :lang(fr), upright Noto Naskh Arabic 600 with a 1.35 line height under :lang(ar). font-synthesis: none is set, so there is never a fake slant or bold. Arabic emphasis is weight or blue-700, not italic
  • the serif is for the landing, the logo and the auth panel. Inside the app everything is Geist
  • digits stay Western (0-9); use tabular-nums for numbers in tables and stats

Type scale

ClassSizeLine heightFont
text-display-xl48 to 112 px fluid0.95with font-display, landing hero only
text-display40 to 72 px fluid1.0with font-display
text-h128 to 40 px fluid1.15Geist 600, page title
text-h222 to 30 px fluid1.2Geist 600, section title
text-h320 px1.3Geist 600, card title
text-lead18 px1.6intro paragraph
text-body16 px1.6default, forms
text-small14 px1.5secondary text, tables
text-caption12 px1.4chips, hints, legal

Inputs are 16 px on mobile (iOS zooms below that). Arabic text gets taller line heights and no letter spacing (globals.css).

Space, radius, shadow, motion

  • container max-w-6xl px-4 md:px-6, landing sections py-20 md:py-28 lg:py-36, Tailwind's 4 px scale, gap-* over margins
  • every tappable control is 44 px (h-11, --spacing-touch, the coarse: variant grows compact controls on touch)
  • radius: --radius 12 px, rounded-input 10 px, rounded-card 20 px, rounded-panel 28 px, rounded-browser 14 px, rounded-phone 40 px, buttons and chips rounded-full
  • shadow: shadow-xs (secondary pill, active sidebar row), shadow-md (floating nav, popovers), shadow-device (browser and phone frames). App cards use a border, no shadow
  • motion: --duration-fast 120 ms, --duration-base 200 ms, --duration-slow 400 ms, --duration-slower 600 ms; ease-out is cubic-bezier(0.22, 1, 0.36, 1), ease-in-out cubic-bezier(0.65, 0, 0.35, 1). prefers-reduced-motion turns animation off globally

Components

All in @ritorno/ui/components/*, shadcn on Base UI with the RTL migration. Add one with pnpm ui:add <component>, then check it against component patterns. Loading is a skeleton with the shape of the content, empty is EmptyState with one next action, errors are InlineAlert or a toast.

Logo from @ritorno/ui/brand/logo: variant is mark, wordmark or lockup (default), size is the tile side in px. The mark is a white Newsreader italic R on a blue tile (#0a84ff) with a dithered sky band; up to 48 px it is a solid tile with a heavier R. The wordmark takes currentColor. The lockup always reads mark then wordmark, left to right, in every language; only its place in the page follows the direction. Its accessible name is "Ritorno".

The glyphs are outlined, so no font is needed. The SVGs in packages/ui/assets/logo are the source; pnpm logo:build turns them into the favicon (16, 32, 48), apple icon, PWA and maskable icons (R shrunk into the 80% safe zone), the email logo and an OG base image, and copies them into each app (app/icon.svg, app/favicon.ico, app/apple-icon.png, public/brand/*). Never edit the copies.

On this page