Here are some simple avatar examples.
You can use the Avatar component to display a user's profile picture, icon, or initials. You can also add an online or offline indicator.
- # Lady 0 is skipped / unused because she looks kinda fake
- ladies = (1..4).map { |i| image_path("avatars/lady-smiling-#{i}.jpg") }
.mt-4.flex.flex-col.lg:flex-row.items-center.gap-4
- # Avatar without online indicator
= daisy_avatar(src: ladies[1]) do
Daisy
- # Avatar with online indicator
= daisy_avatar(css: "avatar-online", src: ladies[2]) do
Daisy
- # Avatar with offline indicator
= daisy_avatar(css: "avatar-offline", src: ladies[3]) do
Daisy
- # Placeholder avatar without online indicator
= daisy_avatar do
AB
- # Placeholder avatar with icon & online indicator
= daisy_avatar(css: "avatar-online", icon: "user", icon_css: "size-14 text-sky-400")
- # Placeholder avatar with offline indicator
= daisy_avatar(css: "avatar-offline") do
TF
You can link the Avatar component to a URL by using the href
attribute.
.space-x-4
- # Avatar with link and title
= daisy_avatar(href: "/", title: "Jane Doe", src: image_path("avatars/lady-smiling-1.jpg")) do
Daisy
- # Avatar with online indicator and link
= daisy_avatar(href: "/", css: "avatar-online", src: image_path("avatars/lady-smiling-2.jpg")) do
Daisy
Create virtual credit / debit cards to keep your real info safe.
Get $5 when you sign up — free to start!
Everything you need to grow your business with confidence!
CRM, Lead Generation, Project Management, Contracts, Online Payments, and more!
The ads above are affiliate links to products I regularly use and highly
recommend.
I may receive a commission if you decide to purchase.