v2 beta docs. Upgrade guide Back to v1

Avatar

ewisozk
ewisozk
Alexzander
RT
Robson Tenório
@robsontenorio
@php
$user = App\Models\User::first();
@endphp
<x-avatar :image="$user->avatar" />
 
{{-- Manipulate avatar imagem with CSS classes --}}
<x-avatar :image="$user->avatar" class="!w-14 !rounded-lg" />
 
{{-- Title --}}
<x-avatar :image="$user->avatar" :title="$user->username" />
 
{{-- Subtitle --}}
<x-avatar :image="$user->avatar" :title="$user->username" :subtitle="$user->name" class="!w-10" />
 
{{-- Placeholder --}}
<x-avatar placeholder="RT" title="Robson Tenório" subtitle="@robsontenorio" class="!w-10" />

Slots

ewisozk
12 posts
45 comments
@php
$user = App\Models\User::first();
@endphp
<x-avatar :image="$user->avatar" class="!w-22">
<x-slot:title class="text-3xl !font-bold pl-2">
{{ $user->username }}
</x-slot:title>
 
<x-slot:subtitle class="grid gap-1 mt-2 pl-2 text-xs">
<x-icon name="o-paper-airplane" label="12 posts" />
<x-icon name="o-chat-bubble-left" label="45 comments" />
</x-slot:subtitle>
 
</x-avatar>

Made with by Robson Tenório and contributors.