Avatar 03
An avatar group with overflow count, hover and focus names, a full member list and responsive collapse.
Requirements
HTML, CSS, JavaScript
Dependencies
None
Usage
Copy index.html, styles.css and script.js into your project.
Typography: Inter, with a system sans-serif fallback.
About Avatar 03
Avatar 03 is an avatar component in the Avatar Components collection, available in HTML + CSS + JavaScript and React + TypeScript + Tailwind CSS. Last updated September 15, 2026.
- avatar
- avatar group
What the code includes
HTML + CSS + JavaScript
3 files: index.html, styles.css, script.js
- Behavior is handled in script.js.
- ARIA in the markup: aria-label, aria-expanded, aria-controls.
- HTML elements used: section, ul, button, img, svg.
- Keyboard keys handled: Escape.
- Includes a prefers-reduced-motion rule for its animation.
React + TypeScript + Tailwind CSS
3 files: Avatar03.jsx, Avatar03.types.ts, Avatar03.tailwind.css
- Configurable through 6 props: label, people, max, maxNarrow, defaultExpanded, className.
- Uses React hooks: useId, useRef, useState.
- ARIA in the markup: role img; aria-label, aria-expanded, aria-controls.
- HTML elements used: ul, button, img, svg.
- Keyboard keys handled: Escape.
- Includes a prefers-reduced-motion rule for its animation.
- Responsive Tailwind breakpoints used: sm.