View Source Shino.UI.Avatar (shino v0.1.0-alpha.0)

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 (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)

Renders an avatar image.

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted. Supports all globals plus: ["src"].

The root contains all the parts of an avatar.

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)