{"name":"avatar","title":"Avatar","description":"","kind":"component","category":"display","status":"beta","props":{"name":{"type":"string","description":"Accessible name; the initials come from it when initials is not given."},"initials":{"type":"string","description":"Letters to show instead of the ones taken from name."},"src":{"type":"string","attr":"src","part":"image","description":"Image URL. Without it, or when it fails, the initials show."},"size":{"type":"enum","values":["12","14","16","20","24","28","32","40"],"default":"16","description":"Edge in px. 12 · 14 · 16 inside a line of text; 20 in a list row or a table cell; 24 · 28 · 32 on the control scale (beside buttons of that height, a row of two lines); 40 for a profile or issue header. Two initials take about two thirds of the edge whatever the size (7, 8.5, 10, 12, 13, 15px at 16–40), so wide letters stay clear of the rim; 12 and 14 show one letter."},"shape":{"type":"enum","values":["round","square"],"default":"round","description":"square: corners a quarter of the edge (3px at 12, 4px at 14 and 16, 5px at 20, 6 · 7 · 8 · 10px at 24 · 28 · 32 · 40)."},"color":{"type":"string","attr":"--fndn-avatar-color","description":"Fill behind the initials (any colour or token); default ink-3."}},"playground":{"name":"Playground","props":{"name":"Maya Chen","size":"20","shape":"round","color":"var(--fndn-tag-orange)"}},"exampleFiles":[{"file":"workspace-members","title":"Workspace members"},{"file":"issue-assignees","title":"Assignees on an issue"},{"file":"review-requests","title":"Review requests on a pull request"},{"file":"member-profile","title":"Member profile header"},{"file":"project-list","title":"Projects"},{"file":"missing-photo","title":"Photo that fails to load"}],"worstCase":[{"name":"One letter","props":{"name":"K","size":"12","shape":"round"}},{"name":"Long name","props":{"name":"Lieferantenbestätigungsanforderung Holdings International","size":"16","shape":"round"}},{"name":"Emoji and Arabic","props":{"name":"🍦 مثلجات القمر","size":"20","shape":"square"}},{"name":"No name","props":{"size":"16","shape":"round"}}],"anatomy":[{"part":"root","element":"span","description":"role=\"img\" with aria-label when it has a name; aria-hidden otherwise."},{"part":"initials","element":"span","description":"One or two letters (one at 12 and 14px) on the avatar colour; aria-hidden."},{"part":"image","element":"img","optional":true,"description":"Covers the initials; alt=\"\" (the root carries the name). Removed when it fails to load."}],"slots":{},"events":{},"states":["broken image"],"tokens":["color.ink-3","color.on-accent","color.line"],"a11y":{"notes":["With a name, the root is role=\"img\" and named; without one it is decorative (aria-hidden). Next to the same name in text, leave name out.","The image has alt=\"\" because the root already carries the name."]},"motion":["none: the image covers the initials when it arrives, without a fade"]}