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 is distributed through a static registry served at /r/. Nothing is registered by hand: components.json andpublic/r/ are generated from the folders insrc/components/ui andsrc/blocks, with dependencies derived from imports. After adding or changing a component, regenerate and commit the result:
npm run registryPro entries are listed in scripts/registry-config.json. Users then install with the CLI (the npm package is being published; until then the JSON at/r/<name>.json can be copied):
npx @vidorra/eidetic add <component-name>