/** * Avatar shown alongside an option's label. * * Rendered in the multi-select tag and in the menu row. Ignored by the * single-select, which has no avatar in its design. */ export interface OptionAvatar { /** * Initials to show when there is no image, e.g. `"JD"`. * * Only the first character is rendered — the avatar is 24px, and the design * shows a single initial at that size. Passing the full initials is still * fine; they are truncated for display, not rejected. */ initials: string; /** * Marks this option as the current user, which gets a highlighted * treatment to distinguish it from everyone else. */ isSelf?: boolean; /** * Optional avatar image. Falls back to the initials if it fails to load. */ src?: string; /** * The person's full name. Announced to screen readers in place of the * initials, which are meaningless read aloud. */ alt?: string; } export interface OptionMinimal { value: any; label?: string; /** * Optional avatar rendered before the label. * * Opt-in, and it also selects the tag style: options carrying an avatar get * the white tag with a border, options without stay on the blue fill. * Adding this field to some options and not others is supported — the two * styles can appear side by side in one field. */ avatar?: OptionAvatar; }