Skip to main content

Skeletons.UserProfile

A user profile avatar with optional name display, online status indicator, and auto-color generation. More user-specific than Skeletons.Profile — designed specifically for Drumee user accounts.


Signature

Skeletons.UserProfile(props, style?)

Common Props

PropTypeDescription
idStringUser ID — used to fetch the avatar and profile data
classNameStringCSS class(es) to apply
firstnameStringUser's first name
lastnameStringUser's last name
fullnameStringFull display name — overrides firstname + lastname
onlineAnyOnline status value from the model
live_statusNumber1 to show a live online/offline indicator
auto_colorNumber1 to generate avatar color from the user's name. 0 to disable
sys_pnStringNamed part — enables onPartReady and ensurePart

Examples

Basic avatar with name

Skeletons.UserProfile({
className: `${fig}__avatar`,
id: ui.mget("uid"),
firstname: ui.mget("firstname"),
lastname: ui.mget("lastname"),
});

Auto-color avatar (no photo)

Skeletons.UserProfile({
className: `${fig}__avatar`,
id: ui.mget("user_id"),
auto_color: 1,
});

With live online status

Skeletons.UserProfile({
className: `${fig}__profile`,
id: ui.mget("user_id"),
fullname: displayName,
online: ui.mget("online"),
live_status: 1,
sys_pn: "profile",
});

Named part only (minimal)

Skeletons.UserProfile({
auto_color: 0,
sys_pn: "my-profile",
});

Profile vs UserProfile

Skeletons.ProfileSkeletons.UserProfile
For any entity
For Drumee users
auto_color
live_status
online

Use Profile for generic entities (support tickets, bots, etc.). Use UserProfile for real Drumee user accounts.