Skip to main content

Skeletons.Profile

A user profile display element — renders an avatar or profile representation for a given user or entity, identified by id or name fields.


Signature

Skeletons.Profile(props, style?)

Common Props

PropTypeDescription
classNameStringCSS class(es) to apply
idStringUser or entity ID — used to fetch and display the profile
typeStringDisplay type — e.g. "thumb" for a thumbnail avatar
firstnameStringFirst name — used when displaying a static profile
lastnameStringLast name
fullnameStringFull display name — overrides firstname + lastname
activeNumber0 to render in inactive state
datasetObjectdata-* attributes

Examples

Live user avatar by ID

Skeletons.Profile({
className: `${fig}__avatar`,
type: "thumb",
id: ui.mget("peer_id"),
active: 0,
dataset: { active: 0 },
});

Static profile with name

Skeletons.Profile({
className: `${fig}__profile`,
id: ui.mget("entity_id"),
firstname: "My",
lastname: "Entity",
fullname: "My Entity",
});