Multiple Users Stacked

Multiple users stacked is used in tight spaces, where we need to indicate that multiple users are associated to a specific action or item.

Default

mulitple-users-stacked-default


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)
}

Small

mulitple-users-stacked-small


let oneUser = [andrew]
let twoUsers = [andrew, picAndrew]
let multipleUsers = [andrew, picAndrew, andrew, andrew]

HStack(spacing: Spacing.xSmall) {
  PBMultipleUsersStacked(users: oneUser)
  PBMultipleUsersStacked(users: twoUsers)
  PBMultipleUsersStacked(users: multipleUsers)
}

xSmall

mulitple-users-stacked-xsmall


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)
}

Props

Name Type Description Default Values
Users [PBUser] Sets the user's avatars
Size Size Changes the size of the avatars .small .default .small .xSmall