View Source Shino.UI.Avatar (shino v0.2.0-alpha.1)
Provides avatar related components.
Displays an image with a fallback for representing the user.
Examples
<Avatar.root>
<Avatar.image src="https://github.com/shadcn.png" />
<Avatar.fallback>CN</Avatar.fallback>
</Avatar.avatar>
<Avatar.root>
<Avatar.image src="https://exmaple.com/bad-image.png" />
<Avatar.fallback class="bg-primary text-white">CN</Avatar.fallback>
</Avatar.avatar>
References
Summary
Functions
Renders an avatar fallback.
Renders an avatar image.
The root contains all the parts of an avatar.
Functions
Renders an avatar fallback.
Attributes
class
(:any
) - Defaults tonil
.- Global attributes are accepted.
Slots
inner_block
(required)
Renders an avatar image.
Attributes
class
(:any
) - Defaults tonil
.- Global attributes are accepted. Supports all globals plus:
["src"]
.
The root contains all the parts of an avatar.
Attributes
class
(:any
) - Defaults tonil
.- Global attributes are accepted.
Slots
inner_block
(required)