Character tile
componentThe character column header — a Nameplate whose headline defaults to the Guardian's class.
Install
npx shadcn@latest add @engram/character-tileRegistry item: /r/character-tile.json — the machine-readable definition agents install from.
Example
Hunter
Iron LordExo
507
Bungie API
source the propsFetch 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
| Prop | Type | Default | Description |
|---|---|---|---|
emblem* | EmblemRef | — | — |
class | GuardianClass | — | Guardian class — the headline defaults to its name. |
name | string | — | Headline override (defaults to the class name). |
title | string | — | Equipped Seal title (gold) — shown on the secondary line. |
subtitle | string | — | Secondary descriptor (race). Power is NOT repeated here — it has its own slot. |
power | number | — | — |
height | number | 72 | Pixel height. Default 72. |
Composition
pulled in on install- character-tilecomponent
- nameplatecomponent
- emblem-bannercomponent
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.