Loui DS
A dark, minimal, functional React design system for internal tools, dashboards and apps. Design tokens, accessible components built on React Aria Components, and AI-ready documentation, in one package: loui-ds.
Live Storybook: https://xrazai.github.io/loUI/ · For AI agents: llms.txt, llms-full.txt, manifest.json, tokens.json
Status: pre-1.0, published on npm under the MIT license. All components are
experimental; APIs can still change.
Highlights
- Accessible by default. WCAG 2.2 AA target, keyboard contracts, axe on every story.
- Tokens first. Every color, space, radius and duration is a
--ds-*CSS variable built from DTCG JSON. No raw values in components. - React 19, SSR-safe, CSS Modules in named cascade layers, no runtime styling library.
- i18n built in. English by default,
pt-BRincluded, every string overridable throughDSProvider. - Made for agents too. A generated component manifest, token manifest and
llms.txtkeep AI tools exact.
Install
pnpm add loui-ds react react-dom
npm install loui-ds and yarn add loui-ds work too. To upgrade, run pnpm update loui-ds and read the release notes first: before 1.0 a minor version may break. Every release also attaches the package tarball, if you need to install a version by URL.
Requires React 19 and Node 24 or later for tooling.
Quick start
import 'loui-ds/styles.css';
import { Alert, Button, DSProvider } from 'loui-ds';
export function App() {
return (
<DSProvider locale="en-US">
<Alert tone="warning" title="Low stock">
3 rolls of linen are left. Reorder to avoid delays.
</Alert>
<Button variant="primary" onPress={() => console.log('created')}>
Create order
</Button>
</DSProvider>
);
}
More in Getting started: the stylesheet, DSProvider, fonts, theming and server-side rendering.
Documentation
| Where | What |
|---|---|
Storybook (pnpm storybook) | Components, tokens, guides and live examples |
| Introduction | What is in the package and how it is built |
| Principles | The three rules, clarity and focus, agent principles, visual foundations |
| Content guidelines | Microcopy rules |
| Accessibility | Conformance target, keyboard model, how we test |
| Using with AI | Manifest, llms.txt, content rules, Storybook MCP |
| Architecture decisions | Why things are the way they are (ADR-0001 to ADR-0010) |
| AGENTS.md | Conventions for people and agents working on this repository |
For AI tools
Generated, always in sync with the source, committed under docs/ and shipped in dist/:
docs/llms.txtanddocs/llms-full.txt: index and full documentation.docs/manifest.json: every component, hook and utility with props, variants, messages, stories and usage notes.docs/tokens.json: every token with allowed text and surface pairings.docs/ai/content-rules.json: microcopy rules as data.docs/ai/components/: one Markdown page per component.
Quick start (Windows)
Double-click start.cmd in the repo root (or run it from a terminal). It installs pnpm and the dependencies if they are missing, starts Storybook and opens http://localhost:6006 in your browser. On any OS, pnpm install then pnpm start does the same.
Scripts
| Command | Purpose |
|---|---|
pnpm start | Start Storybook on port 6006 and open it in the browser |
pnpm storybook | Storybook on port 6006 (also serves the MCP endpoint at /mcp) |
pnpm build | Library build to dist/, then the AI manifests |
pnpm build-storybook | Static Storybook |
pnpm lint / pnpm typecheck | ESLint and Stylelint / TypeScript |
pnpm test | All Vitest projects (unit, browser, visual, storybook) |
pnpm test:unit / pnpm test:browser | Node-only tests / component tests in Chromium |
pnpm test:a11y | Story a11y checks and browser axe tests |
pnpm test:visual / pnpm test:visual:update | Visual regression / reviewed baseline update |
pnpm tokens:build / pnpm tokens:check | Build tokens / verify committed output is current |
pnpm manifest:build / pnpm manifest:check | Regenerate / verify the manifests, llms.txt and component pages |
pnpm check | The gate: tokens, lint, typecheck, tests and build |
pnpm changeset | Record a release note |
Contributing
Read AGENTS.md first: it is the single source of truth for conventions. Work comes from TODO.md; finished work is recorded in CHANGELOG.md. Components follow the component workflow. Commits follow Conventional Commits. Everything in this repository is written in English.
After adding or changing a component, regenerate the AI-facing documentation and commit it:
pnpm manifest:build
Project layout
src/
components/<Name>/ component, CSS Module, messages, stories, tests, <Name>.md
tokens/ DTCG JSON sources and generated output
styles/ layered base CSS and fonts
hooks/ utils/ i18n/ hooks, locale-aware utilities, message catalogs
docs/ Storybook guide pages
patterns/ domain patterns (second entry point)
docs/ guides, ADRs, architecture notes, generated AI docs
schemas/ JSON Schemas for the manifests and content rules
scripts/ token and manifest tooling
License
MIT. The bundled Geist fonts are under the SIL Open Font License (src/styles/fonts/LICENSE.txt).