Contributing
How to contribute to Eidetic — from reporting bugs to submitting pull requests.
Getting Set Up
Clone the repository and install dependencies to start contributing.
git clone https://github.com/vidorra/eidetic.gitcd eideticnpm installnpm run devThe dev server runs on localhost:3000. All documentation pages are in app/docs/ and components live in src/components/.
Reporting Bugs
Found something broken? Open an issue with:
- A clear title describing the problem
- Steps to reproduce the bug
- Expected vs. actual behavior
- Browser and OS information
- A screenshot or screen recording if visual
Pull Requests
We follow a standard fork-and-PR workflow.
Create a feature branch from main: feat/your-feature or fix/your-fix.
Follow the code style and component rules below.
Run npm run test to ensure all tests pass. Add tests for new features.
Run npm run build to verify there are no TypeScript or build errors.
Target the main branch. Describe what changed and why.
Component Rules
When creating or modifying components, follow these rules:
UI Components
- Use Radix UI primitives for accessible behavior
- Support
classNamepass-through withcn() - Use design tokens (CSS custom properties) for colors and spacing
- Support dark mode via Tailwind dark: variants
- Use
forwardReffor DOM element access
Block Components
- Always use Eidetic UI components — never native
<select>,<input type="checkbox">, etc. - Use Button
leftIcon/rightIconprops for icons — not inline children - Use
opacity-0 group-hover:opacity-100for hover reveals — neverhidden group-hover:flex - Include
BlockHeaderfor consistent headers
Testing
We use Vitest and Testing Library for component tests.
# Run all testsnpm run test
# Run tests in watch modenpm run test -- --watch
# Run tests for a specific componentnpm run test -- ButtonTests live alongside their components (e.g. Button.test.tsx). Every new component should have tests covering rendering, variants, interactions, and accessibility.
Documentation
Every component needs a documentation page in app/docs/components/. Doc pages should include:
- Interactive demos with live examples
- Props table with types and defaults
- Variant showcase
- Accessibility notes
- Related components
Use the shared doc components: DocHeader, DocSection, CodeBlock, PropsTable, and AccessibilityNotes.
CLI Distribution
Eidetic uses a shadcn-style CLI for component distribution. When adding new components, register them in components.json so they can be installed via:
npx @vidorra/eidetic add <component-name>