Skip to content

Composition contracts

Every shipped design component declares a compose contract (site/src/components/compose-contract.ts): a leaf ({ tier: 'leaf' }) or a container with named slots ({ slots: { name: { accepts, required } } }), plus an optional owns list of the raw facsimile tags it legitimately implements as its own primitive.

scripts/compose-graph.ts reads those contracts and the real JSX composition graph (via the TypeScript compiler) and emits the map below. It replaces the old hand-maintained dependency doc. It is derived from code, so it can never drift out of date, and the gate (bun run compose:graph) fails on any violation:

  • raw-facsimile: a component renders a raw <button> / <input> / <a href> / <hr> / [role=…] it does not own. Compose the real primitive instead.
  • off-accepts-child: a container is slotted with a design component not in its slot’s accepts.
  • required-slot-unfilled: a required slot left empty at a usage site.
  • missing-contract: a shipped component with no compose declaration.

This is what makes “demos use real components” a permanent, enforced invariant rather than a manual audit.

98components
98with a contract
75·18·5leaf · optional · required
0violations

Violations

✓ No violations: every container composes real, approved children.

Composition map

Tier is derived from the contract (leaf / optional / required). owns = raw facsimile tags a component legitimately implements as its own primitive. Slots show name: accepts ( = any design component, = required).

ComponentHierTierOwnsSlotsRendersConsumers
Accordioncompositeoptionalnonedefault: ∗ · headerAccessory: ∗nonenone
AgentMessagecompositeoptionalnonedefault: ∗nonenone
AppShellpatternleafnone1none
Avatarprimitiveleafbuttonnonenone
Badgeprimitiveleafnonenonenone
Bannercompositeleafnonenonenone
BarChartprimitiveleafnonenonenone
BottomSheetcompositerequirednonedefault: ∗ ✳ · footer: ∗nonenone
BrandMarkprimitiveleafnone2none
Breadcrumbscompositeleafnonenonenone
Buttonprimitiveleafbuttonnonenone
Calendarbehaviorleafbuttonnone1
Calloutcompositeleafnonenonenone
Cardprimitiveoptionalnonedefault: ∗nonenone
Chartcompositeleafnonenonenone
ChatBubblecompositeoptionalbuttondefault: ∗none2
Checkboxprimitiveleafinputnonenone
Chipprimitiveleafbuttonnonenone
CircularProgressprimitiveleafrole=progressbarnonenone
ClusterGridpatternrequirednonedefault: NockerlNodeCell ✳nonenone
CodeBlockcompositeleafnonenonenone
Comboboxcompositeleafinputnonenone
CommandPalettepatternleafinputnonenone
ContextGaugecompositeleafnonenonenone
DatePickercompositeleafbutton1none
DefinitionTriggerprimitiveleafbuttonnonenone
Dialogcompositerequirednonedefault: ∗ ✳nonenone
DiffViewercompositeleafnonenonenone
Dividerprimitiveleafhrnonenone
Drawercompositerequirednonedefault: ∗ ✳ · footer: NockerlButton/NockerlIconButtonnonenone
EmptyStatecompositeoptionalnoneactions: NockerlButton/NockerlIconButton1none
Fabcompositeleafbutton, role=menunonenone
FacetedBackgroundprimitiveoptionalnonedefault: ∗nonenone
Fieldprimitiveleafinput, textareanonenone
FieldValidationcompositeleafnonenonenone
FileUploadcompositeleafnonenonenone
FormLayoutpatternoptionalnonedefault: ∗ · headerAccessory: ∗ · footer: ∗nonenone
Gaugeprimitiveleafnonenonenone
Iconprimitiveleafnonenonenone
IconButtonprimitiveleafbuttonnonenone
JobRowcompositeoptionalnonetrailing: ∗nonenone
Kbdprimitiveleafnonenonenone
KeyValuecompositeleafnonenonenone
LineChartprimitiveleafnonenonenone
Linkprimitiveleafanonenone
Listcompositeleafnonenonenone
ListboxOptionbehaviorleafnonenonenone
ListItembehavioroptionalbuttondetails: ∗ · trailing: ∗nonenone
LongPressPoppatternoptionalnonedefault: ∗nonenone
MarkdownContentcompositeleafnonenonenone
Menubehaviorleafbutton, role=menu, role=menuitemnonenone
MultiSelectcompositeleafbutton1none
NavItembehaviorleafbuttonnonenone
NockerlLockupprimitiveleafnone15
NockerlLogoprimitiveleafnonenone4
NodeCellcompositeoptionalnonefooter: ∗nonenone
OtpInputcompositeleafinputnonenone
Overlaybehavioroptionalbuttondefault: ∗nonenone
PageDotsprimitiveleafbuttonnonenone
Paginationcompositeleafnonenonenone
Panelpatternoptionalbuttondefault: ∗nonenone
Popoverbehaviorleafbuttonnonenone
ProgressBarprimitiveleafnonenonenone
ProgressTrackprimitiveleafrole=progressbarnonenone
RadioGroupcompositeleafinput, role=radiogroupnonenone
RecordingHudcompositeleafnone11
SearchFieldcompositeleafinputnone3
SegmentedControlprimitiveleafbutton, role=radiogroup, role=radiononenone
Selectcompositeleafnonenonenone
SessionChipcompositeleafbuttonnonenone
SessionChipsBarcompositerequirednonedefault: NockerlSessionChip ✳nonenone
Sidebarpatternleafnone1none
Skeletonprimitiveleafnonenonenone
Sliderprimitiveleafbutton, role=slidernonenone
Sparklineprimitiveleafnonenonenone
Spinnerprimitiveleafnonenonenone
SplitButtoncompositeleafbuttonnonenone
StatCardcompositeleafnonenonenone
StatusDiscprimitiveleafnonenonenone
StatusDotprimitiveleafnonenonenone
Steppercompositeleafbuttonnonenone
Surfaceprimitiveoptionalnonedefault: ∗nonenone
Switchprimitiveleafbutton, role=switchnonenone
Tablecompositeoptionalnonefooter: ∗ · empty: ∗nonenone
Tabscompositeleafbutton, role=tab, role=tablistnonenone
TextAreaprimitiveleaftextareanonenone
TextFieldprimitiveleafinputnonenone
Timelinecompositeleafbuttonnonenone
TimePickercompositeleafbuttonnonenone
Toastcompositeleafnonenonenone
TodoWidgetcompositeoptionalnoneheaderAccessory: ∗nonenone
Toolbarpatternoptionalnonedefault: NockerlButton/NockerlIconButton/NockerlSegmentedControl/NockerlDivider/NockerlMenunonenone
ToolCallCardcompositeleafnonenonenone
Tooltipbehaviorleafnonenonenone
TopBarpatternleafnone3none
Treecompositeleafbuttonnonenone
Wellprimitiveoptionalnonedefault: ∗nonenone
Wizardpatternleafnonenonenone