Docs/Component API

Component API

Typed React components that read only from tokens.

Conventions

  • Props are typed in TypeScript and documented in the component workbench.
  • Native elements first: a Button is a <button>, a Select is a <select>.
  • Variants are props, not separate components.

Example

export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
  variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
  size?: 'sm' | 'md' | 'lg';
  loading?: boolean;
}

See every component

The component workbench lists every component with stories, live controls, an actions log, accessibility results, token usage and generated code.