تخطَّ إلى المحتوى

Add a component

هذا المحتوى غير متوفر بلغتك بعد.

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.

  1. Search first. Open the catalogue. If a component does something like what you need, extend it. A second Button is a defect.
  2. Scaffold in the okrado/platform repository with okrado new ui-component <Name> --layer primitive|component|block. It writes the component, a story, an axe test and a manifest stub.
  3. 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.
  4. 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.
  5. 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.
  6. Check: regenerate the manifest, run okrado check . --profile library,ui and the gates, then open a pull request with the screenshots.

The component starts as beta. See Governance for what makes it stable.

المسؤول
Okrado founders
آخر تحديث
تُراجَع قبل