Engram

Item tile

component

A full item tile: the layered ItemImage with a bottom element+power foot, and the signature Destiny white outline on hover.

Install

npx shadcn@latest add @engram/item-tile

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

Example

Festival Flight
510
Festival Flight
510
Festival FlightCrafted
510
Festival Flight
510

Bungie API

source the props

Fetch the data with @engram/api (a typed bungie-api-ts client) and map it to this component's props with @engram/core. This is the exact code the docs' live examples run.

/** Build ItemTile props from a manifest item definition (by hash). `getDef` is
 *  any sync manifest lookup — a local store, or a request-scoped cache. */
export function itemTileFromDefinition(
  getDef: GetDefinition,
  hash: number,
): ItemTileProps | null {
  const def = getDef<DestinyInventoryItemDefinition>(
    "DestinyInventoryItemDefinition",
    hash,
  );
  if (!def?.displayProperties?.name) return null;
  return { ...toItemTileProps(def), watermark: seasonCrest(getDef, def) };
}

Props

PropTypeDefaultDescription
sizenumber48Pixel size (square).
topLeftReactNodeStatus badge composited into the top-left corner (e.g. a tag dot).
topRightReactNodeStatus badge in the top-right corner (e.g. lock / tracked / "new").
bottomLeftReactNodeStatus badge in the bottom-left corner (the foot holds element+power).
progressnumberCompletion progress 0–1 — a thin bar pinned across the bottom edge.
progressColorstring"var(--engram-accent)"Color for the progress bar fill. Defaults to the accent token.
icon*ImageRef
name*string
rarity*Rarity
watermarkImageRefSeason watermark / crest glyph.
tiernumberGear tier (1–5) — rendered as tier-1 diamonds.
intrinsicIconImageRefIntrinsic glyph — weapon frame or armor archetype — shown top-right.
masterworkbooleanMasterworked — the bright gold frame + glow.
craftedbooleanA crafted ("Shaped") weapon — shows the red crafted glyph in the bottom-left corner (no border).
deepsightbooleanDeepsight Resonance — an extractable red-border weapon; draws the red frame + rising red glow. Distinct from .
powernumberPower / light level.
ammoAmmoType
elementElementType

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.