Documentation menu
Documentation / Blocks & themes / theme-rounds
Theme Rounds
npm install @wabbit/tome-theme-roundsFirst install from our registry?
Get a registry token from your credentials page. You need a purchase that includes this package, or a Craft Library membership.
Add the registry and your token to the
.npmrcat the root of your project, with your token in place ofYOUR_TOKEN:@wabbit:registry=https://npm.wabbit.com/ //npm.wabbit.com/:_authToken=YOUR_TOKEN
Rounds, a Tome theme for health and wellness practices, counseling and group practices included: know who is treating you. Every colored section is an inset rounded card, the header is two tiers (live status and the emergency line, then a large phone number and a fixed Book), the need picker sits on the field color, and the first visit is a connected journey. Gabarito and Instrument Sans, four palettes (Morning, Blush, Stride and Dusk) with derived opposite modes, self-hosted OFL fonts, activated by data-tome-theme="rounds".
Overview
Rounds is a Tome theme for health and wellness practices, counseling and group practices included. Its line is "Know who's treating you": a new patient arrives with a worry, and the page answers in order what is wrong, what kind of care it is, what to expect, who they would see, what it costs, where to go, what they can check for themselves, and how to book or call. Its look is one idea, the inset rounded card: every colored section is a rounded card on the page ground, on the same edges as the photo hero, and only the header strip runs full width.
This package is a theme (a ThemeManifest of kind: 'theme'). It owns no blocks. It declares the token surface blocks read, self-hosts its two OFL font families, and restyles the practice pack, the local pack, chrome and a few marketing blocks through their public hooks. The blocks it is composed from are the thirteen blocks of @wabbit/tome-blocks-practice-pack (desk strip, need picker, offering list, steps, people list, offices, guide list, record header, path, reviewed line, credentials, related, book), the local pack's live status, logistics, locations, desk strip and credentials, high-impact-hero (the venue variant), faq, proof-plates and the estimate variant of contact.
Layer: ui · Family / tier: themes / addon · Versioning: independent.
Peer dependencies
| Peer | Range | Required |
|---|---|---|
@wabbit/tome-ui | >=0.22.0 <1.0.0 | yes |
@wabbit/tome-core | >=1.25.0 <2.0.0 | no (optional) |
@wabbit/tome-ui is a CSS-contract peer. Its tokens.css re-declares the var()-aliased Layer 2 under [data-tome-theme] and defines the fixed-band ink family this theme sets, and it ships the platform scroll reveal Rounds turns on. @wabbit/tome-core is needed only for the @wabbit/tome-theme-rounds/register subpath and the ThemeManifest type. The theme is CSS and a manifest: it has no server or client components of its own, and importing it adds no client JavaScript.
Usage
Import the stylesheet once at the app root, after tome-ui's tokens, and activate the theme on <html>:
// app/layout.tsx
import '@wabbit/tome-ui/tokens.css'
import '@wabbit/tome-theme-rounds/styles.css'
import '@wabbit/tome-theme-rounds/fonts.css'<html data-tome-theme="rounds"> <!-- Morning, light -->
<html data-tome-theme="rounds" data-tome-palette="blush"> <!-- Blush, light -->
<html data-tome-theme="rounds" data-tome-palette="stride" data-theme="dark"> <!-- Stride, derived dark -->
<html data-tome-theme="rounds" data-tome-palette="dusk" data-theme="dark"> <!-- Dusk, as designed -->With no data-tome-palette the theme renders Morning. data-theme="dark" gives Morning, Blush and Stride their derived dark mode. Dusk's manifest entry carries defaultMode: 'dark', so the admin palette picker and themeConfigHtmlAttributes() open it dark; data-theme="light" is its derived light mode.
To have the admin ThemeSwitcher, createThemeConfig() and other registry readers list it, register it on the server before building the Payload config:
import '@wabbit/tome-theme-rounds/register'Recommended chrome: Navbar 1 (with headerCall.showNumber so the phone number is real text) and Footer 7, with the practice pack's PracticeStatusAnnouncement in the chrome announcementSlot for the field strip above the header.
Palettes
Four palettes, each light and dark, from the palette run in the spec workspace (scripts/palette-roles.json is its roles-only extract; the stylesheets in src/tokens/palettes/ are generated from it by scripts/generate-tokens.mjs, never retyped). Every text pair clears 4.5:1 and every mark, outline and focus ring clears 3:1 in all eight modes, and the test suite re-measures them from the shipped declarations.
| Palette | Id | Character | Fits | Opens |
|---|---|---|---|---|
| Morning (default) | morning | cool pale ground, deep sea-teal field | general and family practice, dentists, optometrists | light |
| Blush | blush | warm rose ground, deep wine field | med spas, aesthetics, health care for women | light |
| Stride | stride | pale ground, deep olive action, a chartreuse wash, a near-black field | chiropractic, physical therapy, sports medicine | light |
| Dusk | dusk | blue-violet ground, soft orchid accent; the one dark-led palette | counseling and therapy | dark |
The field is the band: the hero panel, the need picker, the closing field and the header strip. The accent fills the action. The wash fills the quieter cards. Accent text is not measured on the wash (Dusk dark measures 4.27:1 there), so a link set directly on a wash card is the ink, underlined.
Status
Every status pairs a shape and words with its color: a filled dot for open and accepting, a hollow ring for closed and not accepting. People are open | limited | waitlist | closed; offices are open | closing | closed | closed-today; a reviewed line is current | aged. Open and current use the success tint; the rest use the warning tint.
What the treatments do
- The inset rounded card. A practice-pack block asks for a tone with
data-practice-tone(ground,tint,wash,surfaceorfield); the four filled tones are rounded cards on the content lines, a gap apart, and a ground section is flat. The hero, the footer, the closing contact, the desk strip and the office and person cards share the 24px radius. - The two-tier header. The announcement slot is a full-width field strip with live status per office, the phone and the emergency line; the header row prints the phone number large, in Gabarito 800, with a small label above it.
- The photo hero. The
venuevariant ofhigh-impact-herois a photo in a rounded card with one field panel; the scrim is off. - The desk strip, the need picker and the first visit. One white card under the hero; a picker of tabs and reasons on the field, working without JavaScript; four connected numbered steps with a photo and a bring-list at equal height.
- People and care. Even portrait crops (4:5), languages and an accepting status; types of care as photo cards, the price list as rows.
- The closing field. Book and call as two equal tiles, a white card with the contact-only form and its data notice, and the emergency line in words.
Motion is one primitive, the platform scroll reveal (a rise of 10px over 500ms, played once). Reduced motion turns every transition and the reveal off. Interactive targets are at least 44px; actions are 52px.
Fonts
Two families ship inside the package as latin-subset woff2 files, each with its SIL OFL 1.1 license: Gabarito (display; variable wght 500 to 800; fonts/OFL-Gabarito.md) and Instrument Sans (body and interface; variable wght 400 to 700 with the wdth axis pinned at 100; fonts/OFL-InstrumentSans.md). The subset covers Basic Latin, Latin-1 and Latin Extended-A. There is no third-party font request by default. Three ways to deliver them:
import '@wabbit/tome-theme-rounds/fonts.css': the bundler resolves the files from this package.- Your own host: copy the files from
@wabbit/tome-theme-rounds/fonts/*and injectgetRoundsFontStyles({ src }). next/font/local, using the files fromgetRoundsFontFaces().
import { getRoundsFontPreloads } from '@wabbit/tome-theme-rounds/fonts'
// in <head>: preload the display face and the interface face
{getRoundsFontPreloads({ src: '/fonts/rounds/' }).map((l) => <link key={l.href} {...l} />)}Sources, recorded in scripts/subset-fonts.py (the build never runs it) and checked by SHA-256, all from google/fonts at commit 6c1dbe27dcf7d817d4b62cec033ba77fa8e2a5ec:
| Face | Source | SHA-256 |
|---|---|---|
| Gabarito | ofl/gabarito/Gabarito[wght].ttf | 8650e2bd7747f7d74619fd7aecbcb0309e6f37b7964024f3fb15ae4833b67ca5 |
| Instrument Sans | ofl/instrumentsans/InstrumentSans[wdth,wght].ttf | b24f1812584816958afcf22e22d08e44318c5e51651e25d2438efdde389b33b1 |
Both faces have tabular figures. Each keeps tnum and pnum in the shipped subset, each defaults to proportional figures, and the ten tnum figures share one advance at every tested weight (the recipe checks its own output and the test suite re-checks the files). So phone numbers, prices, times, dates and counts are set with font-variant-numeric: tabular-nums on every figure hook (data-practice-figure and the block-specific ones). Code falls back to the system monospace stack (the manifest has no mono slot).
Public API
| Export | Subpath | Purpose |
|---|---|---|
roundsThemeManifest (ThemeManifest) | ., @wabbit/tome-theme-rounds/manifest | The theme's manifest: name rounds, kind: 'theme', tier addon, four palettes (Dusk with defaultMode: 'dark'), fonts and one pairing, recommended blocks and chrome (Navbar 1, footer 7), styledBlocks, requires.tomeUi. |
ROUNDS_PALETTE_IDS, RoundsPaletteId | ., @wabbit/tome-theme-rounds/manifest | ['morning', 'blush', 'stride', 'dusk'], the data-tome-palette values. |
ROUNDS_PALETTE_DEFAULT_MODES | ., @wabbit/tome-theme-rounds/manifest | The mode each palette opens in: light for three, dark for Dusk. |
ROUNDS_STYLED_BLOCKS, ROUNDS_RECOMMENDED_BLOCKS | ., @wabbit/tome-theme-rounds/manifest | The block slugs the theme restyles, and the slugs its demos are composed from, in page order. |
ThemeManifest (type) | . | Re-exported from @wabbit/tome-core/registry/theme. |
getRoundsFontFaces(), getRoundsFontStyles({ src }), getRoundsFontPreloads({ src }) | ., @wabbit/tome-theme-rounds/fonts | Font descriptors, @font-face CSS for a custom host, and preload links. |
ROUNDS_FONT_STACKS, ROUNDS_FONT_LICENSES, ROUNDS_LATIN_UNICODE_RANGE, ROUNDS_DISPLAY_WEIGHTS, ROUNDS_UI_WEIGHTS | ., @wabbit/tome-theme-rounds/fonts | The CSS stacks the tokens use, the license files, the subset range, and the weights used. |
RoundsFontFace, RoundsFontPreloadDescriptor, RoundsFontStylesOptions (types) | ., @wabbit/tome-theme-rounds/fonts | The descriptor shapes. |
| side effect | @wabbit/tome-theme-rounds/register | Registers roundsThemeManifest in tome-core's theme registry. |
| stylesheet | @wabbit/tome-theme-rounds/styles.css | Tokens and treatments. The file that does everything visual. |
| stylesheet | @wabbit/tome-theme-rounds/fonts.css | The @font-face rules. Optional. |
| font files | @wabbit/tome-theme-rounds/fonts/* | The woff2 files and their OFL licenses, for self-hosting. |
import { roundsThemeManifest } from '@wabbit/tome-theme-rounds/manifest'
roundsThemeManifest.palettes.map((p) => p.label)
// ['Morning', 'Blush', 'Stride', 'Dusk']Layout of the source
src/tokens/palettes/ one stylesheet per palette, light and dark (generated)
src/tokens/type.css font slots, the type scale, the weights
src/tokens/rhythm.css radius, rhythm, the stage width, motion
src/treatments/ base, cards, chrome, hero, picker, journey, desk, care, record, close
scripts/ palettes.mjs (the recipe), generate-tokens.mjs, subset-fonts.pyColor literals live only under tokens/; the test suite fails one anywhere else.
License
See LICENSE.md.
Exports
| Import path |
|---|
@wabbit/tome-theme-rounds |
@wabbit/tome-theme-rounds/manifest |
@wabbit/tome-theme-rounds/register |
@wabbit/tome-theme-rounds/fonts |
@wabbit/tome-theme-rounds/styles.css |
@wabbit/tome-theme-rounds/fonts.css |
@wabbit/tome-theme-rounds/fonts/* |
Changelog
0.1.xMinor
First release of Rounds, a Tome theme for health and wellness practices where every colored section is a rounded card.
It is made for health and wellness practices, counseling and group practices included, where a new patient should see at once who is treating them.
Four palettes, each light and dark: Morning (the default, a cool pale ground with a deep sea-teal field), Blush (warm rose and wine), Stride (olive and chartreuse, for movement and rehabilitation) and Dusk (blue-violet, which opens dark, for counseling). Type is Gabarito for headings and the large phone number and Instrument Sans for everything else; both are self-hosted, and both have tabular figures, so phone numbers, prices and times line up.
It styles the practice pack (the desk strip, the need picker that works without JavaScript, the connected first-visit steps, an even row of people, the offices beside a map, the reviewed line and the closing book-or-call field), the local pack's status and locations blocks, the two-tier header with its live status strip and large phone number, the photo hero, and the footer as its own card. Motion is one reveal, played once, and reduced motion turns it off.
Every contrast pair clears 4.5:1 and every target is at least 44px.
2 fixes (0.1.1 – 0.1.2)
- 0.1.2
Practice sites can now build a full first-visit page and a provider index from blocks.
All additive: existing blocks render as before unless a page selects the new options.
practice-stepsadds alongvariant: details and a how-long and who panel per step.practice-people-listadds adirectoryvariant: labeled facts and one action along the card bottoms.practice-record-headeradds a typedpagevariant for a page with no record behind it.practice-bookadds a typedbookLinkfor a page with no person behind it.proof-platesplates can carry a checklist.- The Rounds theme styles all of these. Its closing book block now sets the words beside stacked choices from 1024px, the caption over the words, and the current nav link is marked.
- 0.1.1
Fixes the "things you can check" tiles, which had never rendered with content: the heading and intro now line up with the tiles on the content's left edge, the tiles lose the pack's border, and each tile's link gets its own line.