# Namecard

<figure><img src="https://3046942752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHfd391cB6wDC8S3yHcie%2Fuploads%2FkGJ2GqUI2jMgU9SBxshF%2Fimage.png?alt=media&#x26;token=a7e0ef5a-e532-48cf-abd2-ae59c777ba0f" alt=""><figcaption></figcaption></figure>

Displays a clean, styled player profile — including avatar, name, title, level, and tier.\
Used in headers or footers to show who's logged in, their status, or game rank.

***

## Structure

```lua
{
    type = "namecard",
    avatar = "avatar_1.jpg",
    background = "namecard_bg_2.jpg",
    name = "Player Name",
    title = "Some Player Title",
    level = 99,
    tier = "silver"
}
```

***

## Where to Use

You can place a namecard in:

* `header.left`, or `header.right`
* `footer.left`, or `footer.right`

***

## Fields

* **`type`**: Always `"namecard"` to use this component.
* **`avatar`**: File name or path for the avatar image (stored in `/ui/assets/namecards/avatars/`). If a full URL or `nui://` path is provided, it will be used directly.
* **`background`** *(optional)*: Background image file (stored in `/ui/assets/namecards/backgrounds/`). Defaults to `"avatar_placeholder.png"`. Full links or `nui://` paths are supported.
* **`name`** *(optional)*: The player’s name. Defaults to `"Player Name"`.
* **`title`** *(optional)*: Role or description (e.g., "Founder", "Police Chief").
* **`level`** *(optional)*: Player level — displayed as `Lv. 99`.
* **`tier`** *(optional)*: Style pre-set (`"bronze"`, `"silver"`, `"gold"`, etc.) for colouring and badges.

***

## Notes

* `avatar` and `background` must match filenames in the asset folders.
* Tiers can be styled via CSS — each one has a visual style (`.bronze`, `.gold`, etc.).
