Synthetics
Parts combined: a card, an alert, a chat thread.
All 78
Scroll to browse, or jump by letterHarbour launch moved
Now Friday 24 Oct, 09:00.
Two tasks are due today
Offline sync and Harbour homepage.
Harbour rebrand cover, 16:9
Build one
- Compose from existing Imitations and Synthetics — importing named components here is expected and fine, unlike in Imitations.
- Still carry
data-rebar-component/data-rebar-part, forwarddata-*/aria-*, and style only through--rebar-*tokens. - If you're building a block instead of a component: add its shape to the
Constructunion inpackages/placement/src/schema.ts, with a doc comment noting it's unmeasured until it's been through real repeated benchmarking (see the existing blocks' comments for the convention), plus a render case inBlockRenderer.tsx. - Do not give a Synthetic block a
sourceor anon<Verb>-named field unless it is genuinely wired to live data or a handler inside thatBlockRenderer.tsxcase —packages/placement/src/opinions.tsmechanically promotes any block declaring one to Opinion, checked at compile time (tsc --noEmitfails if the tier table disagrees), so an unwired field name that merely looks live is a real bug, not a stylistic choice. - Write tests covering the rendered DOM output, and — for a block — that DOM order matches visual order.
Contribute it
Open an issue first for anything bigger than a small fix — the placement layer's shape is deliberate, and a quick check avoids building something that's already been tried and rejected (see ref/PLAN.md/ref/ASSESSMENT.md). No write access to this repo is required to start: fork it, build the construct there, then open an issue linking your fork or branch asking for it to be adopted into the main project.
Once you're building a component:
- Add it under
packages/core/src/components/Name.tsx, export it frompackages/core/src/index.ts, and add its filename toapps/docs/scripts/generate-props.mjs's scan list. - Classify it
"synthetic"inapps/docs/src/data/constructTier.ts'sCONSTRUCT_TIER.componentmap. - Add a reference page under
apps/docs/src/app/synthetics/<kebab-name>/page.tsxwith a real, live-rendered example.
For a block instead:
- Add the shape to
Constructinpackages/placement/src/schema.tsand a render case inBlockRenderer.tsx. - Classify its type
"synthetic"inapps/docs/src/data/constructTier.ts'sCONSTRUCT_TIER.blockmap — this is checked against the schema at compile time, so a missing entry failstsc --noEmitimmediately. - Update the block table in
packages/placement's ownREADME.md. - Add a reference page under its tier route with a real live example (
apps/docs/src/app/synthetics/<block-type>/page.tsx).
Run pnpm run lint, test, build, and typecheck at the repo root before opening the PR — the same four checks CI runs, in that order.