# Clone the repository
git clone https://github.com/RandAOLabs/component-library.git
# Install dependencies
npm installnpm run dev- Start development server for example appnpm run storybook- Start Storybook documentation servernpm run build- Build library for productionnpm run build-storybook- Build static Storybook sitenpm run docs- Generate API documentationnpm run lint- Run ESLint
-
Component Development
- Create new components in
src/components/[ComponentName] - Follow the existing component structure:
ComponentName/ ├── ComponentName.tsx ├── ComponentName.css ├── ComponentName.stories.tsx └── index.ts
- Create new components in
-
Documentation
- Add Storybook stories for new components
- Include examples of all component props and variants
- Write clear prop descriptions in component interfaces
- Update relevant markdown documentation in
docs/
-
Testing
- Test components in Storybook
- Verify theme compatibility (light/dark modes)
- Check responsive behavior
- Ensure accessibility standards are met
-
Code Style
- Follow TypeScript best practices
- Use CSS custom properties for theming
- Keep components modular and reusable
- Document props with JSDoc comments
component-library/
├── .storybook/ # Storybook configuration
├── docs/ # Documentation
├── src/
│ ├── components/ # React components
│ ├── theme/ # Theme system
│ └── example/ # Example app
└── package.json
-
Create a feature branch:
git checkout -b feature/component-name
-
Make your changes and commit:
git add . git commit -m "feat: add new component"
-
Push changes and create a pull request:
git push origin feature/component-name
- Update version in
package.json - Build and test:
npm run build npm run build-storybook
- Create git tag:
git tag vX.Y.Z git push origin vX.Y.Z
- Publish to npm:
npm publish
- Keep components focused and single-purpose
- Use TypeScript for type safety
- Follow semantic versioning
- Write clear commit messages
- Document all public APIs
- Consider accessibility in design and implementation
- Test across different browsers and devices