Thanks for taking the time to look at cladd. This document explains how to file bugs, suggest features, and submit code changes.
By participating, you agree to abide by the Code of Conduct.
Cladd is opinionated by design. Every component, every default, and every visual decision is tuned for a specific kind of UI — dense, application-grade, dark-first. Pull requests that loosen those opinions (a new variant, a new size, a new prop for "flexibility") will usually be declined unless they fit cleanly inside the existing system.
That's not a brush-off — it's the only way the kit stays small and coherent. If you're unsure whether your idea fits, open an issue first and we'll talk through it before you spend time on code.
Open an issue at github.com/cladd-ui/cladd/issues and include:
- The cladd version (
@cladd-ui/reactfrom yourpackage.json). - React and Tailwind versions.
- The framework you're using (Next.js, Vite, etc.).
- A minimal reproduction — a short code snippet, a CodeSandbox/StackBlitz, or a small repo. Bugs that need a real reproduction without one are hard to act on.
- What you expected vs. what happened.
For visual bugs, a screenshot or short screen recording is worth a thousand words.
Open an issue first. Describe:
- The concrete UI problem you're trying to solve (not the proposed API).
- Where you've hit this problem — ideally with a screenshot or a reference from a real app.
- Whether existing cladd primitives could compose to solve it.
New components have a high bar. They need to fit the surface system, the sizing scale, the accent-color palette, and the dark-first theming — and they need to be the kind of thing real apps reach for repeatedly.
Requirements:
- Node.js 20+
- npm (the repo uses
package-lock.json)
Clone and install:
git clone https://github.com/cladd-ui/cladd.git
cd cladd
npm installRun the playground (used to develop and visually test components):
npm run devThis starts a Vite dev server. The playground lives in playground/ and imports @cladd-ui/react directly from source — your edits in src/ hot-reload immediately.
Other scripts:
npm run check-types # tsc --noEmit
npm run format # oxfmt (write)
npm run format:check # oxfmt (verify, used in CI)
npm run build # build the publishable package into packages/react/src/— the component source. This is what gets published as@cladd-ui/react.src/components/— one file per component.src/hooks/— public hooks (useDialog,useToast,useTheme, etc.).src/styles/— Tailwind v4@themeblocks and CSS layers.src/cladd.css— the public stylesheet entry point.packages/react/— build output; do not edit by hand.playground/— the local dev sandbox.scripts/— build, changelog, and release tooling.
- Formatter: oxfmt. Run
npm run formatbefore committing. CI runsnpm run format:check. - Types: strict TypeScript. Run
npm run check-typesbefore opening a PR. - Comments: by default, no comments. Only add one when the why is non-obvious — a hidden constraint, a workaround, a surprising invariant. Don't explain what the code does; the code does that.
- State vs. variants: use class names for static variants (color, size, shape) and
data-*attributes only for runtime state (open, disabled, selected). This is enforced by convention across the kit — match what neighboring components do. - No new dependencies without discussion. The whole point of cladd is a small, predictable surface area.
The project uses Conventional Commits — the changelog is generated from them.
Format: type: short summary
Types:
feat:— new featurefix:— bug fixperf:— performance improvementref:orrefactor:— refactor with no behavior changedocs:— documentation onlystyle:— formatting, whitespace, etc.test:— tests onlybuild:— build system or toolingci:— CI configurationchore:— anything else
Examples from the repo:
feat: readOnly and disabled for SearchField
fix: NumberField to hold its width
feat: button pointer when href is passed too
Keep the summary lowercase, present tense, under ~70 characters. Add a longer body if the change needs explanation.
- Fork the repo and create a branch from
master. - Make your change. Keep PRs focused — one feature or fix per PR.
- Run
npm run check-typesandnpm run formatlocally. - Update or add a playground example if you're touching a component, so reviewers can see the change in action.
- Open the PR. In the description, link the related issue and explain the why, not just the what.
Small, well-scoped PRs get reviewed fastest. A 30-line fix with a clear repro will land before a 600-line PR that "also cleans up a few things."
Releases are cut by the maintainer using npm run release, which bumps the version, regenerates the changelog from commits since the last tag, builds, tags, and publishes. Contributors don't need to touch versions or CHANGELOG.md — those are generated.
By contributing, you agree that your contributions will be licensed under the MIT License, the same license that covers the rest of the project.
If something here is unclear, open an issue and ask — the docs improving is also a contribution.