| paths |
|
|---|
The full component conventions live in
AGENTS.md: file structure,forwardRefpattern, named exports, JSDoc'd types,eds--prefixed CSS with@layer eds-components,--_pseudo-private vars,data-*for variants, density via ancestor, testing with Jest + Testing Library + jest-axe.
This file is intentionally short. It only highlights what's easy to forget when working in /next:
- Check
documentation/AI-COMPONENT-INDEX.mdbefore creating a component — a generated, CI-verified list of every/nextcomponent with props and sub-components; it may already exist - No default exports (except
.stories.tsx) - WCAG 2.1 AA is non-negotiable —
jest-axetest in every component - Use
--eds-*design tokens — never hardcode hex values - Variants and states via
data-*attributes, not modifier classes - Flat inner class names — one
eds--prefixed root class; inner elements use simple flat names (.label,.icon-wrapper) scoped by CSS nesting. No BEM__element or--modifier syntax. - Test queries:
getByRole>getByLabelText>getByText>getByTestId