Introduction
Monogem is a token-based design system: a shared set of design tokens (color, type, spacing, radius, shadows, grids, layout, icons) and a library of accessible, composable components built on top of them, each one documented with the reasoning behind its decisions — not just what a value is, but why.
New here? Start with this page, then the Reading order below before opening a foundation or component page. This page covers what Monogem provides, how the documentation is organized, and where to go next.
How the documentation is organized
| Group | What's in it |
|---|---|
| Getting Started | This page, the Design Approach every other decision answers to, a UX Principles decision-support layer for product and component choices, and a Quality Heuristics craft-review layer. |
| Foundations | The token foundations, in build order — start at Scale. Each references the ones before it. |
| Components | One page per component, organized into four categories — Core, Containers & Overlays, Navigation & Feedback, and Composite & Advanced (browse them all on the Components page) — alphabetized within each, every page following a fixed template with a live, interactive example alongside the code. |
| Patterns | Cross-component composition guidance, not anchored to one component's page — for example Empty States, Search, and Navigation. |
Installation
Monogem is published on npm as @freshgemui/monogem.
Requirements
Monogem needs React and React DOM 19+ and Tailwind CSS v4, configured and building in your app
(for example with @tailwindcss/vite or @tailwindcss/postcss). Its stylesheet is a Tailwind v4
bridge (tokens, theme mapping, dark-mode variant), not standalone CSS, so without Tailwind v4
processing it the components render unstyled. react, react-dom, and tailwindcss are peer
dependencies; install them in your app if they aren't there already.
Install
npm install @freshgemui/monogem
Add the styles
Import the Monogem stylesheet once, from your app's global stylesheet:
@import "@freshgemui/monogem/styles.css";
It already imports Tailwind CSS and Monogem's tokens, so use it in place of your own
@import "tailwindcss";, not alongside it. It also tells Tailwind to scan Monogem's shipped
components, so their classes are generated in your build.
Use the components
Import components by name from the package root:
import { Button } from "@freshgemui/monogem";
The package ships ES modules with TypeScript declarations. For dark mode, add the dark class to
<html>; for a brand theme, set data-theme on <html> to sapphire, ruby, or emerald.
Reading the code examples
The code examples on component and pattern pages are the actual source of each live example, so they import components the way this documentation site does, through its source alias:
import { Button } from "@/components/ui/button";
@/ is this site's path alias for its own source folder, and each component lives in its own file
under components/ui/. In your app, import the same components by name from the package root
instead:
import { Button } from "@freshgemui/monogem";
Component names, props, and behavior are the same in both forms; only the import path differs. A few
examples (Calendar, Command, Search) also import cn from @/lib/utils — a small site helper that
merges class names with clsx and tailwind-merge. It isn't a Monogem export; use your own
equivalent if you adapt those examples.
Where the tokens live
Every token described in Foundations resolves to real values in the Monogem codebase: a
primitives layer holding the raw ramps (see Scale), and a semantic
layer holding the intent tokens components actually use (--primary, --border, --sidebar…),
defined for light and dark and, where a theme applies, per theme. See
Color for the theme model.
Where to start
- Design Approach — the five values that govern everything else.
- Foundations — read in order; each builds on the last.
- Components — reference the semantic tokens only, never raw values.
- UX Principles — reach for it when a decision needs evidence, not as linear reading.
- Quality Heuristics — reach for it at review time, to check whether the result feels deliberate.