VStack(alignment: .leading, spacing: Spacing.small) {
PBAvatar(image: Image("andrew", bundle: .module), size: .xxSmall, status: .online)
PBAvatar(image: Image("andrew", bundle: .module), size: .xSmall, status: .away)
PBAvatar(image: Image("andrew", bundle: .module), size: .small, status: .online)
PBAvatar(image: Image("andrew", bundle: .module), size: .medium, status: .away)
PBAvatar(image: Image("andrew", bundle: .module), size: .large, status: .online)
PBAvatar(image: Image("andrew", bundle: .module), size: .xLarge, status: .offline)
}
VStack(alignment: .leading, spacing: Spacing.small) {
PBAvatar(name: "Tim Wenhold", size: .xxSmall, status: .online)
PBAvatar(name: "Tim Wenhold", size: .xSmall, status: .away)
PBAvatar(name: "Tim Wenhold", size: .small, status: .online)
PBAvatar(name: "Tim Wenhold", size: .medium, status: .away)
PBAvatar(name: "Tim Wenhold", size: .large, status: .online)
PBAvatar(name: "Tim", size: .xLarge, status: .offline)
}
Name | Type | Description | Default | Values |
---|---|---|---|---|
Image | Image |
Sets the Avatar image | ||
Name | String |
Used to display user's initails when image is blank | ||
Size | Size |
Adjusts the Avatar image size | .medium |
.xxSmall .xSmall .small .medium .large .xLarge |
Status | PresenceStatus |
Sets user's activity status | away offline online |
|
Wrapped | Bool |
Displays the wrapped variant | false |
true false |
let oneUser = [andrew]
let twoUsers = [andrew, picAndrew]
let multipleUsers = [andrew, picAndrew, andrew, andrew]
HStack(spacing: Spacing.xSmall) {
PBMultipleUsersStacked(users: oneUser, size: .default)
PBMultipleUsersStacked(users: twoUsers, size: .default)
PBMultipleUsersStacked(users: multipleUsers, size: .default)
}
let oneUser = [andrew]
let twoUsers = [andrew, picAndrew]
let multipleUsers = [andrew, picAndrew, andrew, andrew]
HStack(spacing: Spacing.xSmall) {
PBMultipleUsersStacked(users: oneUser, size: .xSmall)
PBMultipleUsersStacked(users: twoUsers, size: .xSmall)
PBMultipleUsersStacked(users: multipleUsers, size: .xSmall)
}
let img = Image("andrew", bundle: .module)
let name = "Andrew K"
let title = "Rebels Developer"
VStack(alignment: .leading, spacing: Spacing.small) {
PBUser(
name: name,
image: img,
territory: "PHL",
title: title
)
PBUser(
name: name,
territory: "PHL",
title: title
)
PBUser(
name: name,
image: img,
size: .small,
title: title
)
PBUser(
name: name,
image: img,
size: .small
)
}
let img = Image("andrew", bundle: .module)
let name = "Andrew K"
let title = "Rebels Developer"
VStack(alignment: .leading, spacing: Spacing.small) {
PBUser(
name: name,
image: img,
orientation: .vertical,
size: .small,
title: title
)
PBUser(
name: name,
image: img,
orientation: .vertical,
title: title
)
PBUser(
name: name,
image: img,
orientation: .vertical,
size: .large,
title: title
)
}
let img = Image("andrew", bundle: .module)
let name = "Andrew K"
let title = "Rebels Developer"
VStack(alignment: .leading, spacing: Spacing.small) {
PBUser(
name: name,
image: img,
size: .small,
territory: "PHL",
title: title
)
PBUser(
name: name,
image: img,
territory: "PHL",
title: title
)
PBUser(
name: name,
image: img,
size: .large,
territory: "PHL",
title: title
)
}
VStack(alignment: .leading, spacing: Spacing.small) {
PBUser(
name: name,
image: img,
size: .small,
territory: "PHL",
title: title,
status: .online
)
PBUser(
name: name,
image: img,
territory: "PHL",
title: title,
status: .away
)
PBUser(
name: name,
image: img,
size: .large,
territory: "PHL",
title: title,
status: .offline
)
}
Name | Type | Description | Default | Values |
---|---|---|---|---|
name | String |
Sets the User's name | ||
displayAvatar | Bool |
Displays the User's avatar | true |
true false |
image | Image |
Sets image for the avatar | ||
orientation | Orientation |
Changes the orientation of the User | .horizontal |
.horizontal .verticle |
size | UserAvatarSize |
Changes the size of the User | .medium |
.small .medium .large |
territory | String |
Adds the User's territory | ||
title | String |
Adds a title | ||
status | PBAvatar.PresenceStatus? |
An idicator for the current status of the user | .none |
.online .away .offline |