DAvatar

Images
Person
Person
Person
<DAvatar Src="https://picsum.photos/id/1027/128/128" Alt="Person" SizeClass="w-12" />
<DAvatar Src="https://picsum.photos/id/1012/128/128" Alt="Person" SizeClass="w-20" Shape="DaisyAvatarShape.Circle" />
<DAvatar Src="https://picsum.photos/id/1035/128/128" Alt="Person" SizeClass="w-28" Shape="DaisyAvatarShape.Square" />
Placeholder (no Src)
DB
UI
<DAvatar SizeClass="w-12" Shape="DaisyAvatarShape.Circle">
    <Placeholder><span class="text-lg">DB</span></Placeholder>
</DAvatar>
<DAvatar SizeClass="w-20" Class="bg-[var(--color-primary)] text-[var(--color-primary-content)]" Shape="DaisyAvatarShape.Circle">
    <Placeholder><span class="text-2xl">UI</span></Placeholder>
</DAvatar>
Status indicators
Online person
Offline person
<DAvatar Src="https://picsum.photos/id/1027/128/128" Alt="Online person" SizeClass="w-16" Shape="DaisyAvatarShape.Circle" Status="DaisyStatus.Online" />
<DAvatar Src="https://picsum.photos/id/1012/128/128" Alt="Offline person" SizeClass="w-16" Shape="DaisyAvatarShape.Circle" Status="DaisyStatus.Offline" />

API

DAvatar

Parameters

Name Type Default Binding Description
Src string — — Image URL. When empty, the avatar renders in placeholder mode using the Placeholder content.
Alt string — — The alt attribute of the rendered <img> .
SizeClass string w-12 — Tailwind width/size utility for the inner element, e.g. w-24 .
Shape DaisyAvatarShape Squircle — Corner shape of the avatar ( rounded-box , rounded-full , or square).
SquareSquircleCircle
Status DaisyStatus None — Online/offline indicator rendered by daisyUI.
NoneOnlineOffline
Placeholder RenderFragment — — Content shown when Src is not set (initials, icon, ...).
Class string — — Additional CSS classes appended to the component's computed daisyUI classes.
Style string — — Inline styles applied to the root element.
Connection lost — reconnecting…
Connection failed.
The server has stopped.