← All Components
<mth-avatar-group>
Overlapping stack of <mth-avatar> items managed via SlotCollectionController with max truncation and localized +N overflow badge.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-avatar-group>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/avatar-group"></script>
<mth-avatar-group max="0" size="xs">Example</mth-avatar-group>import '@methane-ui/ui/avatar-group';
import '@methane-ui/react';
export function Example() {
return <mth-avatar-group max="0" size="xs">Example</mth-avatar-group>;
}<script setup lang="ts">
import '@methane-ui/ui/avatar-group';
</script>
<template>
<mth-avatar-group max="0" size="xs">Example</mth-avatar-group>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/avatar-group';
import { MthAvatarGroupDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthAvatarGroupDirective],
template: `<mth-avatar-group max="0" size="xs">Example</mth-avatar-group>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/avatar-group';
import MthAvatarGroup from '@methane-ui/svelte/MthAvatarGroup.svelte';
</script>
<MthAvatarGroup max="0" size="xs">Example</MthAvatarGroup>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
max | max | number | 0 | Maximum visible avatars before truncating into a +N overflow badge (0 shows all). |
size | size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | "md" | Shared size scale forwarded to slotted avatars (xs | sm | md | lg | xl). |
label | label | string | "" | Accessible group label; defaults to localized "Avatar group". |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="none". | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| states | Exposes ElementInternals CustomStateSet flags: :state(overflowing). | Conformance suite |
| i18n | Routes 3 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |