@@ -56,6 +56,38 @@ import { pushToast } from '@codebar-ag/storybook-docuhub';
5656pushToast({ message : ' Saved.' , type: ' success' });
5757```
5858
59+ ## Before building new UI in a consuming app
60+
61+ Component-based consistency is the point of this package: every app should look
62+ identical because every app is built from the same atoms.
63+
64+ 1. ** Check Storybook first.** Run `npm run dev` in this package (or open the
65+ deployed styleguide) and search `src/index.ts`'s barrel export before writing
66+ any markup for a new screen or feature.
67+ 2. ** Never re-implement an atom.** If this package already ships a `Button`,
68+ `Card`, `Table`, `Badge`, `Modal`, form field, dropdown, icon, list-row , metric,
69+ or alert, the consuming app must import and use it — not hand-roll an
70+ equivalent with raw `<button > `/`<table > `/`<div > ` + Tailwind classes.
71+ 3. ** Compose, don't fork.** If an atom is close but not quite right, extend it via
72+ its existing props/slots/`class` overrides. Don't copy its template into the
73+ app and tweak it.
74+ 4. ** Domain-specific "organisms"** (billing panels, instance rows, resource lists,
75+ …) stay in the consuming app, but must be assembled only from these atoms,
76+ never from raw HTML elements.
77+
78+ ## Proposing a new atom
79+
80+ Only add a component here when no existing atom (or composition of atoms) can
81+ satisfy the need. A new atom must:
82+
83+ - Live in `src/components/` as a `<script setup> ` Vue 3 SFC.
84+ - Be styled only with token-driven Tailwind utility classes — no `<style > ` blocks,
85+ no `@apply`, no bespoke CSS.
86+ - Ship a `* .stories .ts` entry documenting its variants.
87+ - Pass `npm run typecheck` and `npm run lint`.
88+ - Be exported from `src/index.ts` (and registered on the `Flows` plugin if it's a
89+ globally-usable atom).
90+
5991## Develop
6092
6193```bash
0 commit comments