Engram

Character tile

component

The character column header — a Nameplate whose headline defaults to the Guardian's class.

Install

npx shadcn@latest add @engram/character-tile

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

Example

Hunter
Iron LordExo
507

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.

/** The profile components a gear + character render needs (Characters,
 *  CharacterEquipment, and the equipped items' Instances/Stats/Sockets/Plugs). */
export const PROFILE_COMPONENTS = [
  200, 205, 300, 304, 305, 310,
] as DestinyComponentType[];

/** Resolve a Bungie name → membership, then fetch that profile. Returns a
 *  bungie-api-ts DestinyProfileResponse. */
export async function fetchProfile(
  client: BungieClient,
  bungieName: string,
  components: DestinyComponentType[] = PROFILE_COMPONENTS,
): Promise<DestinyProfileResponse> {
  const memberships = await client.searchByBungieName(bungieName);
  const membership = memberships.find((m) => m.membershipId) ?? memberships[0];
  if (!membership) throw new Error(`No Destiny profile for "${bungieName}"`);
  return client.getProfile(
    membership.membershipType,
    membership.membershipId,
    components,
  );
}

Props

PropTypeDefaultDescription
emblem*EmblemRef
classGuardianClassGuardian class — the headline defaults to its name.
namestringHeadline override (defaults to the class name).
titlestringEquipped Seal title (gold) — shown on the secondary line.
subtitlestringSecondary descriptor (race). Power is NOT repeated here — it has its own slot.
powernumber
heightnumber72Pixel height. Default 72.

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.