Lines & shadows
The core of the Momo look: a crisp 1px ink border and subtly rounded corners. Everything is flat; hard offset shadows (no blur) are an option you add where you want them, or turn on everywhere.
The box
.box is a surface and a border, flat. Add a color class to paint it.
<div class="box docs-tile">box</div>
<div class="box docs-tile bg-yellow">box bg-yellow</div>
<div class="box docs-tile bg-violet">box bg-violet</div>Shadows
Everything is flat by default. Add a shadow with a class, or put class="momo-shadows" on <html> to give buttons, menus, dialogs, toasts, popovers and picked items their shadows everywhere. Opt in with a class. Use them sparingly: on what should stand out or can be pressed, not on every row. Things that float (menus, dialogs, toasts) will have one by default.
<div class="border bg-surface docs-tile shadow-none">shadow-none</div>
<div class="border bg-surface docs-tile shadow">shadow · 2px</div>
<div class="border bg-surface docs-tile shadow-md">shadow-md · 3px</div>
<div class="border bg-surface docs-tile shadow-lg">shadow-lg · 4px</div>
<div class="border bg-surface docs-tile shadow-xl">shadow-xl · 6px</div>
<div class="border bg-surface docs-tile shadow-2xl">shadow-2xl · 8px</div>Borders
<div class="border bg-surface docs-tile">border</div>
<div class="border-3 bg-surface docs-tile">border-3</div>
<div class="border border-dashed bg-surface docs-tile">border-dashed</div>
<div class="border border-violet bg-surface docs-tile">border-violet</div>Corners
Every component uses a subtle 6px corner (--momo-radius). Change one element with the scale, or remove the corners with .rounded-0 / .rounded-none. class="momo-square" on <html> makes everything square.
<div class="box docs-tile rounded-none">rounded-none</div>
<div class="box docs-tile rounded-sm">rounded-sm · 3px</div>
<div class="box docs-tile">default · 6px</div>
<div class="box docs-tile rounded-md">rounded-md · 8px</div>
<div class="box docs-tile rounded-lg">rounded-lg · 10px</div>
<div class="box docs-tile rounded-xl">rounded-xl · 14px</div>
<div class="box docs-tile rounded-2xl">rounded-2xl · 20px</div>
<div class="box docs-tile rounded-full">rounded-full</div>Press
.press adds a shadow, lifts on hover and pushes into the shadow when clicked or tapped.
<a class="box docs-tile press bg-yellow" href="#">Press me</a>
<a class="box docs-tile press" href="#">Or me</a>Scrollbars
Every scroll area gets one slim rounded bar with no track, so it stays calm next to your content: 4px and soft at rest, a little wider and darker when you point at it, brand color while you drag it. The grab area stays 10px wide, so it is still easy to catch.
Hidden until you scroll. Like on iOS and macOS, bars stay out of sight until an area moves (by wheel, trackpad, keys or dragging) and disappear a second after it stops. Point at the edge of an area to find its bar and drag it. The page itself gets a bar that floats over its right edge, so no empty strip is left there and borders run all the way across. <html data-momo-scrollbars="always"> keeps every bar showing, and .scroll-visible keeps one area's bar showing. Without momo.js the bars simply stay visible. It follows dark mode, and black areas (sidebar, code) get a light bar. .scroll-thin makes one area slimmer, .scroll-hidden hides the bar but keeps scrolling.
Scroll me. Inbox lists, tables, menus, dialogs and the kanban board all use the same bar, so a whole app scrolls the same way.
The bar is thin, rounded and quiet so it never competes with your content.
Set --momo-scroll-size (the grab area), --momo-scroll-gap (space around the bar), --momo-scroll-thumb, --momo-scroll-hover and --momo-scroll-active to change it anywhere.
On phones the system's own overlay scrollbars are used, as they should be.
<div class="box docs-scroll">
<p>Scroll me. Inbox lists, tables, menus, dialogs and the kanban board all use the same bar, so a whole app scrolls the same way.</p>
<p>The bar is thin, rounded and quiet so it never competes with your content.</p>
<p>Set <code>--momo-scroll-size</code> (the grab area), <code>--momo-scroll-gap</code> (space around the bar), <code>--momo-scroll-thumb</code>, <code>--momo-scroll-hover</code> and <code>--momo-scroll-active</code> to change it anywhere.</p>
<p>On phones the system's own overlay scrollbars are used, as they should be.</p>
</div>Variables
| Variable | Default |
|---|---|
--momo-border-width | 1px |
--momo-line | Ink (light in dark mode) |
--momo-radius | 6px (scale: -sm 3, -md 8, -lg 10, -xl 14, -2xl 20) |
--momo-float-shadow / --momo-lift-shadow | none (set by .momo-shadows) |
--momo-scroll-size / -gap / -thumb / -hover / -active | 10px / 3px (a 4px bar) / soft ink / darker ink / brand |
--momo-shadow / -md / -lg / -xl / -2xl | 2 / 3 / 4 / 6 / 8px offset, no blur (all from --momo-shadow-x / -y) |