Getting started
One stylesheet and one script from npm. No build step, no framework: add them, write plain HTML with Momo classes, and every component wakes up on its own.
1. Add the CSS and the script
From the jsDelivr CDN. Keep the version in the address (@momo-neobrut-ui@0.9.1), so an update never changes your site by surprise. The fonts load from the same place, nothing else to add.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/momo-neobrut-ui@0.9.1/dist/momo.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-icons@1.0.0/dist/moey-icons.min.css">
<script src="https://cdn.jsdelivr.net/npm/momo-neobrut-ui@0.9.1/dist/momo.js" defer></script>2. A starter page
CSS in the head, the script with defer so it runs once the page is read.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
<title>My app</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/momo-neobrut-ui@0.9.1/dist/momo.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-icons@1.0.0/dist/moey-icons.min.css">
<script src="https://cdn.jsdelivr.net/npm/momo-neobrut-ui@0.9.1/dist/momo.js" defer></script>
</head>
<body>
<main class="container section">
<h1>Hello</h1>
<button class="btn btn-brand"><i class="mi mi-sparkles"></i> It works</button>
</main>
</body>
</html>That is all. The script finds the components on the page and sets them up. Content you add later (from fetch, a template, a framework) is set up too, as soon as it lands in the page.
<button class="btn btn-brand"><i class="mi mi-sparkles"></i> It works</button>
<span class="badge bg-lime">New</span>
<label class="switch"><input type="checkbox" role="switch" checked> On</label>Full or site build
Pick one pair, never both.
| Build | Files | For |
|---|---|---|
| Full | momo.min.css + momo.js | Web apps. Everything, including the app shell, kanban, calendar, charts, chat, command palette, files and state variants like hover: and dark:. |
| Site | momo-site.min.css + momo-site.js | Websites and landing pages. The same look, minus the app parts, so it is much lighter. |
<!-- site build -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/momo-neobrut-ui@0.9.1/dist/momo-site.min.css">
<script src="https://cdn.jsdelivr.net/npm/momo-neobrut-ui@0.9.1/dist/momo-site.js" defer></script>Each docs page that covers an app part says so. If a class does nothing on your site, check that you are on the full build.
Or install it
With a bundler, or to host the files yourself:
npm install momo-neobrut-ui@0.9.1Then link node_modules/momo-neobrut-ui/dist/momo.min.css and dist/momo.js, or copy the dist folder to your server. Keep the fonts folder next to the CSS: the stylesheet finds the fonts from there.
Fonts
Familjen Grotesk for text and Iosevka Charon Mono for code come with the package and load from beside the CSS, so pages make no calls to a font service. Both are under the SIL Open Font License. Only the files a page actually uses get downloaded.
Want your own font? Set the font tokens after the Momo CSS:
:root {
--momo-font: "Your Font", system-ui, sans-serif;
--momo-font-mono: "Your Mono", ui-monospace, monospace;
}Icons
Momo uses Moey Icons. Add an icon with <i class="mi mi-house"></i>; it takes the text color and size. Icons that Momo draws itself (check marks, select arrows, the password eye) are already built into the CSS, so they work even without the icon stylesheet.
Dark mode
Nothing to do: Momo follows the system. To choose, set data-momo-mode on <html>.
<html data-momo-mode="dark"> <!-- or light, dark-black, dark-split -->
<!-- a button that flips it and remembers the choice -->
<button class="btn btn-icon" data-momo-theme-toggle aria-label="Dark mode"><i class="mi mi-moon"></i></button>More on the Dark mode and Theme toggle pages.
Make it yours
Brand color, line width, corners, shadows and weights are all CSS variables. Try them on the Customize page, then copy the CSS it gives you into your own stylesheet, after Momo.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/momo-neobrut-ui@0.9.1/dist/momo.min.css">
<link rel="stylesheet" href="my-theme.css"> <!-- your settings win -->Momo's own rules sit in cascade layers, so any plain rule you write beats them without !important.
Scripting
Components send events you can listen to, and most have a small helper on window.Momo:
Momo.toast('Saved'); // a toast
Momo.pin.invalid('#code'); // shake a PIN red
document.addEventListener('momo:pin-complete', (e) => check(e.detail.value));
Momo.init(someElement); // set up by hand (rarely needed)Each component page lists its events and helpers.
Browsers
Current Chrome, Edge, Firefox and Safari, on desktop and phones. Momo uses cascade layers, :has(), color-mix() and the popover attribute, which all of them support.