No updates detected yet. GitHub releases will appear here.
One design system, five platforms, kept honest by machines.
翻訳待ち
Loading the full README.
Read the full README ↗One design system, five platforms, kept honest by machines.
Tanrei (端麗 — "clean, well-formed") is an open-source, platform-neutral design system. It is not tied to an operating system or a vendor: the same tokens and the same component specs ship to the web (CSS custom properties and Web Components built with Lit, with generated React bindings), SwiftUI, Jetpack Compose, Flutter (widgets, no Material dependency) and React Native (pure TypeScript, the New Architecture).
Documentation: https://tanrei.chnotchy.com — guides for each platform, the foundations, the token reference and every component, in six languages.
npm install @tanrei/web # the tokens as CSS custom properties, and the Web Components
npm install @tanrei/react # React bindings for the same elements, beside @tanrei/web
import '@tanrei/web/tokens.css'; // the default system's tokens, once, as early as possible
import '@tanrei/web'; // every element; or one at a time: '@tanrei/web/components/button'
<tanrei-button variant="filled">Deploy</tanrei-button>
Without a bundler, serve the package's dist/ and link dist/tokens.css and dist/tanrei.bundle.js (Lit and every element in one module). Each platform's getting-started guide goes further: the presets, dark mode and contrast, your product's words, fonts and icons.
To build your own design system on Tanrei's vocabulary — one layer file in, tokens and code for every platform out — see Your own design system: @tanrei/cli (npx tanrei init, tanrei build), Theme Studio and the @tanrei/mcp server for AI agents.
Prerelease.
0.1.0-next.0is published under the npm dist-tagnext: until0.1.0, install@tanrei/web@next. During the 0.x prereleases backward compatibility is not kept: any prerelease may break anything, with no deprecation period first, and its changeset says what broke.
| Platform | Package | Components |
|---|---|---|
| Web Components | @tanrei/web · @tanrei/react (npm) | 16 alpha · 83 lagging |
| SwiftUI (paused) | Tanrei (Swift Package Manager) | 29 lagging · 70 planned |
| Jetpack Compose (paused) | io.github.chnotchy:tanrei (Maven) | 29 lagging · 70 planned |
| Flutter (paused) | tanrei (pub.dev) | 29 lagging · 70 planned |
| React Native (paused) | @tanrei/react-native (npm) | 29 lagging · 70 planned |
alpha: implemented and tested; the API may change · lagging: an implementation exists but has not caught up with the current spec · planned: nothing shippable yet. The component status matrix has every component on every platform; it is computed from the repository and cannot claim more than is there.
Paused: SwiftUI, Jetpack Compose, Flutter and React Native — not built by CI and not published until each catches up with the specs.
ref → sys → comp, with numeric dials underneath), color roles with guaranteed on-* pairings, generated tonal palettes, light/dark × three contrast levels, state layers, a typescale, a shape scale, elevation levels, spring motion, 48/44 minimum targets.display, heading-1…heading-6 (h1–h6), body-large / body / body-small (lead, p, small), label / label-small / caption, code / code-small, eyebrow — and emphasis is a weight step per family that every platform's text API takes as emphasized, not a second set of roles. Corner smoothing is an amount, 0–1 with Figma's meaning (0.6 = the iOS corner), and the web, Compose and Flutter draw the same curve for it.m3-like, m3-expressive-like and cupertino. How exactly a preset matches its reference is measured, not claimed.Tanrei is an independent project. Third-party notices: NOTICE.
tokens/ ─┐ ┌─► CSS · TypeScript · Swift · Kotlin · Dart · DTCG for design tools
├─► generators ─────────┤
specs/ ─┘ (committed output) └─► status matrix · docs tables · React bindings
▲
validate · parity · drift · snapshot + a11y tests (local hooks and CI)
This is the beginning of the README. Read the rest at the original. Read the full README ↗