UserProfile
molecules
Header user profile — 40px avatar + name (13px/600) + role (11px muted) + chevron dropdown indicator. Renders as <button> with aria-haspopup='menu' and aria-expanded.
ARIA Role: button (with aria-haspopup='menu')
Demo
Demo for UserProfile (molecules)
Header user profile — 40px avatar + name (13px/600) + role (11px muted) + chevron dropdown indicator. Renders as <button> with aria-haspopup='menu' and aria-expanded.
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | |
role | string | Yes | — | |
initials | string | Yes | — |
TypeScript Interface
interface UserProfileProps {
name: string;
role: string;
initials: string;
isOpen?: boolean;
onToggle: () => void;
menuId?: string;
}Assertions (NASA Rule 5)
- [type]name, role, initials, onToggle all required(NASA Rule 5)
- [aria]Button must have aria-haspopup='menu' and aria-expanded matching isOpen prop(WCAG 4.1.2)
Usage
Import
import { Userprofile } from '@epasslive/design-system'Basic
<Userprofile />With Variants
<Userprofile variant="primary" size="md" />