jbmui

Catalog

  • Motion
  • replayable
  • video player

Catalogue sheet whose interface pieces arrive and get checked off, then unfolds a second row of design-token glyphs.

Loading preview…

Install

npx shadcn@latest add @jbm/catalog

Needs the @jbm entry in components.json; see Install once.

Also installs @jbm/tokens, @jbm/motion-hooks, @jbm/pop, @jbm/paper, @jbm/ui-bits, @jbm/rebuild-screens.

Needs Remotion: render inside a Remotion <Composition> or <Player>, not a plain React tree. Timing values are in seconds.

Usage

Pieces, then tokens
import { Catalog } from "@/jbm/motion/catalog"<Catalog w={936} at={3.2} title="catálogo"  items={[{ kind: "button", label: "botón", at: 7.4 }]}  tokens={[{ kind: "color", label: "color", at: 18.2 }]} />
Full sheet with a stamp
import { Catalog } from "@/jbm/motion/catalog"<Catalog w={936} at={0.2} title="catálogo"  items={[    { kind: "button", label: "botón", at: 0.8 },    { kind: "card", label: "tarjeta", at: 1.2 },    { kind: "input", label: "input", at: 1.6 },  ]}  tokensAt={2.6}  tokens={[    { kind: "color", label: "color", at: 3.0 },    { kind: "type", label: "tipografía", at: 3.4 },    { kind: "space", label: "espaciado", at: 3.8 },  ]}  stamp={{ text: "design tokens", at: 4.4 }} />

Props

Stage px
Declared at the documented defaults
Landscape
1200 by 882
Vertical
936 by 699
Basis

Width is w (required); scene specs pass min(usable width, 1200) in landscape and 936 in vertical. Height is computed from w with three items, three tokens, and a title, fully unfolded: top padding (0.038 w + 30) + slot row (card height 0.8 × 0.78 slot width + caption + margin) + bottom padding + 4px border, plus the token block (two gaps of 0.031 w, a 3px divider, and a 0.9 × slot-width glyph row) once unfolded. Before unfolding it is 492 (landscape) / 393 (vertical). The title sticker extends 30px above the top edge. More columns shrink every slot.

Paper sheet that springs up into place at at, with one dashed slot per column. Each item's Piece pops into its slot on its cue and a check badge pops on checkDelay seconds later. At tokensAt the sheet grows downward over 0.55 s behind a dashed divider to reveal a row of TokenGlyphs that pop in on their own cues. An optional ink title sticker sits over the top edge and a stamp lands across the bottom edge, below the rows; it overlaps only the sheet's bottom padding and extends about half its height below the sheet, so leave room under the component.

PropTypeDefaultDescription
wnumberrequiredSheet width in stage pixels; padding, gaps, slot size, pieces, captions, and badges all scale from it.
atnumberrequiredSheet entrance in seconds relative to the enclosing Sequence.
titlestringnoneOptional ink sticker label over the top-left edge; adds 30px of top padding inside the sheet.
itemsCatalogItem[]requiredTop-row slots: kind (button, card, or input), a caption label, and the at second its piece pops in.
tokensCatalogToken[][]Optional second-row slots: kind (color, type, or space), a caption label, and the at second its glyph pops in. Empty means no token row.
tokensAtnumbernoneSecond at which the token row unfolds. Defaults to 0.6 s before the first token's cue.
stamp{ text: string; at: number }noneOptional loud word: text and the at second it stamps across the sheet's bottom edge, below the rows, never over a slot or caption.
checkDelaynumber0.5Seconds between an item's arrival and its check badge.

QA checks

  • Step to the sheet entrance, each item arrival and its check badge, the middle of the unfold (token row partially revealed and clipped), and the end (all glyphs in, stamp settled across the bottom edge without covering any caption, including tipografía).
  • Check the fully unfolded sheet plus the title sticker above it fits the safe area in both orientations; the height grows by the token block when it unfolds.
  • Without tokens, confirm no divider or empty row appears and the stamp straddles the bottom edge just below the item row.
  • Check long captions at the scaled caption size stay inside their slots; captions are not truncated by the component.