When contributing a new component, follow this structure:
Component File Structure
/* Component: Button Group
* Description: Groups related buttons together
* Category: Forms & Inputs
* Accessibility: Requires role="toolbar" or role="group"
*/
.btn-group {
display: flex;
gap: var(--space-2);
align-items: center;
}
/* Variants */
.btn-group--vertical {
flex-direction: column;
}
/* States */
.btn-group .btn:focus {
z-index: 1;
}
Documentation Requirements
- Create a component page in
/docs/components/ - Include usage examples with HTML
- Document all variants and modifiers
- Provide accessibility guidance
- Show the component in all themes
specs/components/<name>.md (anatomy, tokens, variants, states) and
must use tokens from tokens/core//tokens/semantic/ rather than
hardcoded values — checked automatically by npm run audit:tokens, which is
blocking in CI. This applies whether you're editing by hand or pointing an AI coding
assistant at the repo. See
AI-Assisted Development
for the full picture.