Thanks for your interest in contributing to @ankh-studio/components.
git clone https://github.com/ankh-studio/components.git
cd components
nvm use
npm installnpm start # Dev server with hot reload
npm run build # Production build
npm test # Run tests
npm run lint # Check code styleWe use vitest with happy-dom for unit tests.
npm test # Run all tests once (CI mode)
npm run test:watch # Run in watch mode during development
npm run test:ui # Open the vitest UITest files live alongside components as *.spec.ts or *.test.ts files in src/components/ankh-{name}/. Every component should have tests covering its props, events, and rendered output. Tests run automatically in CI on every pull request and must pass before merge.
- Create a branch from
main - Make your changes in
src/ - Run
npm run lintandnpm run build - Run
npm testto ensure tests pass - Submit a pull request
- TypeScript for component logic
- CSS custom properties for styling (use tokens from
@ankh-studio/themes) - Follow existing naming conventions (
ankh-*prefix) - Run linter before committing
Each component should:
- Live in
src/components/ankh-{name}/ - Include
.tsx,.css, and test files - Use JSDoc comments for props (generates documentation)
- Compose with existing primitives (focus-ring, ripple) where appropriate
Significant changes should be discussed first. For new components or architectural changes, consider proposing an ADR.
Open an issue for discussion before starting large changes.