Add a component
Ce contenu n’est pas encore disponible dans votre langue.
A component exists for the suite only when it has a manifest entry, a story, an axe test, TSDoc and a docs page, and when someone has looked at its render. Do the steps in order; each ends with a check.
- Search first. Open the catalogue. If a component does something like what you need, extend it. A second Button is a defect.
- Scaffold in the
okrado/platformrepository withokrado new ui-component <Name> --layer primitive|component|block. It writes the component, a story, an axe test and a manifest stub. - Write the stories: every variant plus the state stories (loading, empty, error, long text). Paper, night, 375 px, compact and Arabic are covered by the generated story matrix; do not copy dark or compact variants by hand.
- Write the docs page (MDX, attached to the stories) with: overview, when to use and not to use, anatomy, do and don’t, content rules, states, accessibility with the keyboard table, related components and changelog.
- Look at it. Shoot every variant in paper and night, compact, at 375 px, in French and Arabic. Score hierarchy, type, spacing, brand fidelity, generic tells, density, states and copy out of 40. Pass is 32 with nothing under 3. Fix and re-shoot, at most three rounds, then hand the open findings to a lead.
- Check: regenerate the manifest, run
okrado check . --profile library,uiand the gates, then open a pull request with the screenshots.
The component starts as beta. See Governance for what makes it stable.
- Responsable
- Okrado founders
- Mis à jour le
- À revoir avant le