v2.1.8
/
  • Get Started
  • Components
  • Composables
  • Typography
  • GitHub
  • Layout
  • App
  • Container
  • Error
  • SidebarLayout
  • Element
  • Advice
  • Alert
  • Avatar
  • AvatarGroup
  • Badge
  • Banner
  • Button
  • Calendar
  • Card
  • Chip
  • Collapsible
  • Countdown
  • FieldGroup
  • Kbd
  • Progress
  • Separator
  • Skeleton
  • Form
  • Checkbox
  • CheckboxGroup
  • ColorPicker
  • FileUpload
  • Form
  • FormField
  • Input
  • InputDate
  • InputMenu
  • InputNumber
  • InputTags
  • InputTime
  • PinInput
  • RadioGroup
  • Range
  • Select
  • SelectMenu
  • Switch
  • Textarea
  • Data
  • Accordion
  • DescriptionList
  • Empty
  • Table
  • TableWrapper
  • Timeline
  • User
  • Navigation
  • Breadcrumb
  • CommandPalette
  • Link
  • NavigationMenu
  • Pagination
  • Stepper
  • Tabs
  • Overlay
  • ContextMenu
  • DropdownMenu
  • Modal
  • Popover
  • Slideover
  • Toast
  • Tooltip
  • Page
  • PageCard
  • PageColumns
  • PageGrid
  • PageLinks
  • PageList
  • Dashboard
  • DashboardGroup
  • DashboardSearch
  • DashboardSearchButton
  • AI Chat
  • soonChatMessage
  • soonChatMessages
  • soonChatPalette
  • soonChatPrompt
  • soonChatPromptSubmit
  • Content
  • ContentSearch
  • ContentSearchButton
  • ContentSurround
  • ContentToc
  • Color Mode
  • ColorModeAvatar
  • ColorModeButton
  • ColorModeImage
  • ColorModeSelect
  • ColorModeSwitch
  • i18n
  • LocaleSelect
  • b24icons
  • b24jssdk
Use our Nuxt starter
v2.1.8
  • Docs
  • Components
  • Composables
  • Typography

AvatarGroup

Pile multiple avatars into a single group.
GitHub
Demo
Nuxt UI

Usage

Wrap multiple Avatar within an AvatarGroup to stack them.

Employee NameBitrix24Assistant Name
{
  "wait": "Loading client-side content..."
}

Size

Use the size prop to change the size of all the avatars.

Employee NameBitrix24Assistant Name
{
  "wait": "Loading client-side content..."
}

Max

Use the max prop to limit the number of avatars displayed. The rest is displayed as an +X avatar.

Employee NameBitrix24+1
{
  "wait": "Loading client-side content..."
}

Examples

With tooltip

Wrap each avatar with a Tooltip to display a tooltip on hover.

Assistant NameBitrix24Employee Name
{
  "wait": "Loading client-side content..."
}

With chip

Wrap each avatar with a Chip to display a chip around the avatar.

Assistant NameBitrix24Employee Name
{
  "wait": "Loading client-side content..."
}

With link

Wrap each avatar with a Link to make them clickable.

Assistant NameBitrix24Employee Name
{
  "wait": "Loading client-side content..."
}

With mask

Wrap an avatar with a CSS mask to display it with a custom shape.

Benjamin CanacBitrix24Employee Name
{
  "wait": "Loading client-side content..."
}
The chip prop does not work correctly when using a mask. Chips may be cut depending on the mask shape.

API

Props

Prop Default Type
as'div'any

The element or component this component should render as.

size'md' "md" | "3xs" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl"
max string | number

The maximum number of avatars to display.

b24ui { root?: ClassNameValue; base?: ClassNameValue; }

Slots

Slot Type
default{}

Theme

app.config.ts
export default defineAppConfig({
  b24ui: {
    avatarGroup: {
      slots: {
        root: 'inline-flex justify-end',
        base: 'relative rounded-full last:me-0'
      },
      variants: {
        size: {
          '3xs': {
            base: '-me-0.5'
          },
          '2xs': {
            base: '-me-0.5'
          },
          xs: {
            base: '-me-0.5'
          },
          sm: {
            base: '-me-1.5'
          },
          md: {
            base: '-me-1.5'
          },
          lg: {
            base: '-me-1.5'
          },
          xl: {
            base: '-me-2'
          },
          '2xl': {
            base: '-me-2'
          },
          '3xl': {
            base: '-me-2'
          }
        }
      },
      defaultVariants: {
        size: 'md'
      }
    }
  }
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import bitrix24UIPluginVite from '@bitrix24/b24ui-nuxt/vite'

export default defineConfig({
  plugins: [
    vue(),
    bitrix24UIPluginVite({
      b24ui: {
        avatarGroup: {
          slots: {
            root: 'inline-flex justify-end',
            base: 'relative rounded-full last:me-0'
          },
          variants: {
            size: {
              '3xs': {
                base: '-me-0.5'
              },
              '2xs': {
                base: '-me-0.5'
              },
              xs: {
                base: '-me-0.5'
              },
              sm: {
                base: '-me-1.5'
              },
              md: {
                base: '-me-1.5'
              },
              lg: {
                base: '-me-1.5'
              },
              xl: {
                base: '-me-2'
              },
              '2xl': {
                base: '-me-2'
              },
              '3xl': {
                base: '-me-2'
              }
            }
          },
          defaultVariants: {
            size: 'md'
          }
        }
      }
    })
  ]
})

Avatar

An img element that includes fallback and supports Nuxt Image.

Badge

A short descriptor for a status or category.

On this page

  • Usage
    • Size
    • Max
  • Examples
    • With tooltip
    • With chip
    • With link
    • With mask
  • API
    • Props
    • Slots
  • Theme
Releases
Published under MIT License.

Copyright © 2024-present Bitrix24