Docs

Install a system.

The tyohnn CLI copies one set of component TSX and one or more complete design-system folders into your project, then wires them in. There is no runtime package: after init the code is yours. Node 20 or later; Next.js (App Router), Vite, and npm · pnpm · yarn · bun workspace monorepos.

Getting started

A Next.js or Vite app$npx tyohnn@latest init --system vega
A monorepo: packages/ui plus one app$npx tyohnn@latest init --system graphite --app apps/crm --scope @acme

Pick a system on the systems page. Available:

Commands

Every command edits tyohnn.json and then makes the project match it, so running it twice changes nothing the second time.

Command
What it does
init
Detects the project, asks for a system (or --system), copies the TSX and the system, adds dependencies, installs and wires the app. In a monorepo it creates packages/ui and wires --app <path>.
add <system> --app <path>
Monorepo: adds a system to the existing UI package and wires another app to it.
use <system> [--app <path>]
Switches an app to another system: entry CSS, fonts and mode. The TSX stays.
icons <library> [--app <path>]
Switches an app's icon library (mapping file and packages).
fonts [--sans] [--heading] [--mono] [--reset]
Switches an app's fonts; --reset returns to the system's own.
blocks [remove]
Installs (or updates) the blocks and frames next to the components; remove takes them out.
list
Systems, icon libraries and fonts, one line each.
doctor [--built]
Checks the setup against tyohnn.json; exit code 1 on a failure.
diff [--files]
Compares the project's copies with the source: changed upstream, locally, or both.

Options

--yes
No prompts; take the defaults.
--force
Overwrite files that exist or were edited.
--no-install
Skip installing packages.
--mode light|dark
Override the system's default mode.
--icons <library>
init: another icon library.
--font · --font-heading · --font-mono
init: other fonts from the catalog.
--app · --ui · --scope
Monorepo: the app to wire, the UI package folder and its scope.
--ref · --source · --offline
Which registry version to read, a local checkout, or the cache only.

Where files go

A monorepo keeps one UI package: the TSX once, and a folder per system. Each app imports exactly one system.

packages/ui/src/components · hooks · lib the TSX, imported as @acme/ui/components/… packages/ui/src/icons/libraries/<library>.tsx the icon libraries some app uses packages/ui/src/systems/<system>/ colours · tokens · typeset · rules · DESIGN.md apps/<app>/src/app/globals.css imports exactly one system apps/<app>/tsconfig.json paths "@acme/ui/icons" → that app's library tyohnn.json at the monorepo root

A single Next.js or Vite app gets the same pieces under src/, imported through the @/ alias (added when missing):

src/components/ui/*.tsx imported as @/components/ui/… src/hooks · src/lib hooks and utilities src/components/icons/ index.ts · names.ts · libraries/<library>.tsx src/styles/tyohnn/<system>/ the system folder

The entry CSS imports the system in a fixed order — tailwindcss, layer 1 colours, layer 2 tokens, typeset, then layer 3 rules in layer(base) — so utilities you pass through className still win.

Fonts

Fonts are always self-hosted; nothing loads Google's font CDN. Next.js apps get next/font/google (or next/font/local for Pretendard) in the root layout; Vite apps get the fontsource or npm package and an @import. Each system names a sans, heading and mono font plus a Hangul fallback; override them per app:

Other fonts at init$npx tyohnn@latest init --system vega --font geist --font-heading playfair-display
Back to the system's own$npx tyohnn@latest fonts --reset
Id
Family
Category
Licence
bricolage-grotesque
Bricolage Grotesque
sans
OFL-1.1
figtree
Figtree
sans
OFL-1.1
geist
Geist
sans
OFL-1.1
geist-mono
Geist Mono
mono
OFL-1.1
inter
Inter
sans
OFL-1.1
jetbrains-mono
JetBrains Mono
mono
OFL-1.1
maru-buri
MaruBuri
serif
OFL-1.1
noto-sans
Noto Sans
sans
OFL-1.1
playfair-display
Playfair Display
serif
OFL-1.1
pretendard
Pretendard
sans
OFL-1.1
source-serif-4
Source Serif 4
serif
OFL-1.1

Icons

Components import icons by meaning (ChevronDown, SelectIndicator) from one module, never from an icon package. The module maps every name onto one of 6 libraries. Each system has a default; switch it at init or later:

Another library at init$npx tyohnn@latest init --system mira --icons lucide
Switch one app later$npx tyohnn@latest icons phosphor --app apps/admin
  • lucidelucide-react
  • tabler@tabler/icons-react
  • hugeicons@hugeicons/react + @hugeicons/core-free-icons
  • phosphor@phosphor-icons/react
  • remixicon@remixicon/react
  • radix@radix-ui/react-icons

Blocks

A block is a piece of a screen composed from the components: a page heading, a row of metric cards, a table in a card with tabs and bulk actions, a kanban board. It reads the system's tokens and decides no colour, size or radius of its own, so it changes with the system and with nothing else. Its data and words come from the screen that uses it.

With a new project$npx tyohnn@latest init --system vega --blocks
Into a project that has the components$npx tyohnn@latest blocks

They land next to the components (blocks/) as CLI-owned files: doctor checks them, diff shows what changed upstream, tyohnn blocks updates them and tyohnn blocks remove takes them out. Every screen in the gallery is built from them.

Frames

A frame is a block with no content of its own. It holds other blocks and decides only where they stand: how far from the edge, how far from each other, what scrolls, and what sits beside what. Page is the content under the bar; PageContent is a column inside something that scrolls; PageSplit puts a main pane and an aside side by side.

<Page scroll="regions"> pinned: something inside scrolls <PageHeading … /> <PageSplit narrow="stack"> <DataTableCard … /> the main pane takes the room <PageAside width="md">…</PageAside> 20rem beside it </PageSplit> </Page>

The screen picks a step; a token says how much it is. gutter="sm" is the screen's choice; --page-gutter-sm is 1rem unless a system or your own CSS says otherwise. Declare one on :root after the system's styles and every page at that step moves.

Token
Default
What stands at it
--page-gutter-sm--page-gutter-md--page-gutter-lg--page-gutter-xl
1rem · 1.5rem · 2rem · 2.5rem
Page margin. Space between a page's content and its edges.
--page-gap-xs--page-gap-sm--page-gap-md--page-gap-lg--page-gap-xl
0.75rem · 1rem · 1.5rem · 2rem · 2.5rem
Space between blocks. Gap between items on a page, like a heading and a table.
--page-measure-sm--page-measure-md--page-measure-lg
48rem · 52rem · 64rem
Reading width. Maximum width of a text column. Keeps long lines easy to read.
--page-aside-xs--page-aside-sm--page-aside-md--page-aside-lg--page-aside-xl
14rem · 18rem · 20rem · 26rem · 30rem
Side panel width. Width of the narrow panel beside the main content, like a table of contents.
--page-document-padding-start--page-document-padding-end
2rem · 4rem
Document spacing. Space above and below a document's content.

Narrow pages. A split stands side by side while its page is at least 56rem wide — the page's own width, not the window's, so closing the sidebar gives the room back. Below that the aside does one of three things, chosen by the screen with narrow on PageSplit. There is no fourth: an aside that keeps its width squeezes the main pane to nothing.

narrow
The aside
For
stack
It goes under the main pane and the page scrolls as one.
Content read along with the main pane: a team page's seat and invitation cards.
sheet
It leaves the page and opens over it from a PageAsideTrigger; the main pane keeps its height.
A tool that works on the main pane: a playground's run settings, a review's checks.
hide
It is not drawn.
An aid the page works without: a table of contents.

To try the values, use the Layout tab beside the screens on any system's page: a slider moves every screen on the page at once.

Several systems in one monorepo

Apps in one monorepo can use different systems — and different icon libraries — from one UI package. Never import two systems into one app: every system defines the same cn-* rules and token names globally, and the later import silently wins.

npx tyohnn@latest init --system graphite --app apps/crm --scope @acme npx tyohnn@latest add mira --app apps/admin --icons hugeicons npx tyohnn@latest use nova --app apps/admin # switch that app's system; the TSX stays npx tyohnn@latest doctor --built # also checks built CSS for the other system's tokens

doctor fails on two systems in one app, import order or a missing layer(base), a missing @source, font variables the layout does not declare, an icon path that disagrees with tyohnn.json, or a mode class that differs from it; it warns when icon libraries diverge or CLI-owned files were edited.

Versions and source

The npm package holds only the CLI. Components and systems are read from the tyohnn repository at run time (the main branch by default), cached per commit, and the commit is recorded in tyohnn.json. Later commands read that commit, so they never silently move a project to a newer version.

Pin a version$npx tyohnn@latest init --system sera --ref <commit>
What changed since$npx tyohnn@latest diff --ref main

File ownership

Kind
Files
What the CLI does
CLI-owned
TSX, icon mappings, system folders
Written whole with a recorded hash; overwritten only while unchanged. Edited files are kept and reported.
Managed blocks
entry CSS, layout, next/vite config
Only the text between tyohnn:begin and tyohnn:end comments is rewritten.
Merged
tsconfig paths, package.json, index.html classes
Only the entries tyohnn needs change; comments and formatting stay.
Yours
everything else
Never touched.