Engram

Slot row

component

A fixed-count row of AbilitySlots — the aspect or fragment block of a subclass, where the subclass fixes how many slots exist and some may be empty.

Install

npx shadcn@latest add @engram/slot-row

Registry item: /r/slot-row.json — the machine-readable definition agents install from.

Example

Props

PropTypeDefaultDescription
count*numberTotal slots to render (fixed by the subclass — e.g. 2 aspects, 4 fragments).
slots(PlugProps | null | undefined)[][]Filled slots; positions past the array render empty.
kindAbilityKind"fragment"What these slots hold.
sizenumber40Pixel size per slot.
onPick(index: number) => voidFired with the slot index when a slot is clicked.
popup(plug: PlugProps, index: number) => ReactNodeInspect content for a filled slot (e.g. a ), shown on hover — wires each slot to an .

Composition

pulled in on install

Dependencies

npm
@engram/core

Own the code: shadcn add copies this component's source into your repo to read and edit directly. Extend without forking — edit the source, use asChild to swap the element, or pass the typed annotations prop for curated data.