Resources
Contributing
Aback UI is judged on reuse, clarity, accessibility, and maintainability, not on component count. This page is for people working on the library itself.
Repository layout
Everything that ships to npm lives in packages/. The website only consumes it.
packages/ui/@aback-ui/uiShips to npmThe canonical component source and the npm package built from it. Every other copy of a component comes from here.packages/tokens/@aback-ui/tokensShips to npmThe theme: colour roles, the Aback Blue ramp, and geometry, as one CSS file.packages/cli/aback-uiShips to npmThe command line. Its build bundles the registry, so the published package carries every component.registry/registry.json and blocks/Stays in the repoWhich items exist, their dependencies and targets, and the block source. A build script turns it into item JSON.website/abackui.comStays in the repoThis site: docs, live examples, block previews, and the hosted copy of the registry. It is never published to npm.
Run it locally
The repository uses Bun workspaces.
bun install
bun run dev # the website on http://localhost:3000
bun run build:registry # regenerate the registry after changing an item
bun run build:cli # build the CLI with the registry bundledTry the CLI from source
After
bun run build:cli, run node packages/cli/dist/index.js add button inside any React project to install from your working copy.- Write it in
packages/ui/src/componentswith semantic tokens, a keyboard model, and tests beside it, including an axe check. - Export it from
packages/ui/src/index.tsand add an item toregistry/registry.jsonwith its npm and registry dependencies. - Add a live example in
website/src/examplesand its API and accessibility notes inwebsite/src/data/component-docs.ts. A test fails if either is missing. - Run
bun run build:registryand commit the generated files.
Open a proposal first for a new component or any public API change. Names, props, CSS variables, and registry identifiers are public contracts once released.
- Write it in
registry/blocks, importing components through@/components/ui/*exactly as an installed copy would. - Keep example content out of the block. Its preview goes in
website/src/block-previews, with example data labelled as such. - A block owns no routing, auth, network calls, or product data. It takes callbacks such as
onSubmitand shows what they return.
bun run check # typecheck, lint, tests, registry freshness, packed-package tests
bun run build # packages, registry, CLI, and the websiteThe packed-package test installs the real npm tarballs into a clean project, renders components from them, and runs aback-ui init and add with the network blocked. If it passes, what you publish works.