Avatar
Avatar::make($src?) renders a circular avatar. Pass an image URL to show a photo; when no image is
available it falls back to the person’s initials, and with no name at all it shows a neutral user icon.
Stack::make()->direction('row')->gap(Gap::Small)->schema([ Avatar::make('https://i.pravatar.cc/96?img=13')->name('Ada Lovelace'), Avatar::make()->name('Grace Hopper'), Avatar::make()->name('Katherine Johnson')->size(Size::Lg), Avatar::make(),]);- align:null
- direction:"row"
- float:null
- gap:"sm"
- height:null
- justify:null
- width:null
- name:"Ada Lovelace"
- size:"md"
- src:"https://i.pravatar.cc/96?img=13"
- name:"Grace Hopper"
- size:"md"
- src:null
- name:"Katherine Johnson"
- size:"lg"
- src:null
- name:null
- size:"md"
- src:null
Source, name, and fallbacks
Section titled “Source, name, and fallbacks”->src($url)sets the image. When present, the image renders and itsaltis the name.->name($name)provides the accessible label and the initials fallback — the first letter of the first two words, uppercased (Grace Hopper→GH).- With neither a source nor a name, the avatar shows a neutral user glyph.
->size(Size $size) scales the avatar. It defaults to Size::Md and accepts any
Size from Xs through Xl4.
Avatar::make()->name('Ada Lovelace')->size(Size::Xl);