Create a user dropdown for headers
Convenience function for common user menu pattern.
Example 1
Example 1
const dropdown = createUserDropdown({ name: 'John Doe', email: 'john@example.com', settingsHref: '/settings', logoutHref: '/logout', labels: { settings: 'Settings', logout: 'Logout' } });
name: string
User display name
email: string
User email
optional
settingsHref: string
Settings page href
optional
logoutHref: string
Logout href
optional
labels: { settings?: string; logout?: string; }
Custom labels
optional
initials: string
Avatar initials (defaults to first 2 chars of name)