Typen
Initialen in Mono, Bild oder Icon, rund, abgerundet oder eckig
Daten
Person or object as image, mono initials or icon. Sizes xs 20, sm 24, md 32, lg 40, xl 56 px; circle, rounded or square. Optional status dot (online, away, offline). With href or button it becomes a trigger (e.g. the user menu) with hover and focus ring. The name is the accessible name and tooltip.
Initialen in Mono, Bild oder Icon, rund, abgerundet oder eckig
XS 20 bis XL 56 px, optionaler Status-Punkt
Benutzermenü-Button mit Hover und Fokusring
<tc-avatar> berechnet Initialen und Namen selbst; status-Property.
| Option | Standard | Werte | Beschreibung |
|---|---|---|---|
name | '' | – | Display name: accessible name, tooltip and source of the initials. |
initials | '' | – | Explicit initials (default: derived from name). |
src | '' | – | Image URL; the image type is chosen automatically. |
type | '' | Force initials, image or icon (default: automatic). | |
icon | 'user' | – | Carbon icon for the icon type. |
shape | 'circle' | Circle, rounded (6 px) or square. | |
size | 'md' | xs 20, sm 24, md 32, lg 40, xl 56 px. | |
status | '' | Presence dot. | |
status_label | '' | – | Override the presence text read with the name. |
href | '' | – | Render as link (trigger). |
button | False | – | Render as button (trigger, e.g. for a menu). |
tooltip | True | – | Show the name as native tooltip. |
overflow | False | – | Style as "+N" overflow counter (used by avatar groups). |
Zusätzliche Attribute (z. B. class, aria-*, data-*) und HTMX-Kurzformen (get, post, get_url, post_url, target, swap, trigger, confirm) werden an das Element „root“ durchgereicht.