View Source ZoonkWeb.Components.Image (Zoonk v0.2.0-alpha)

Image components.

Link to this section Summary

Functions

Renders an avatar element.

Link to this section Functions

Renders an avatar element.

examples

Examples

<.avatar alt="John Doe" />
<.avatar alt="John Doe" src="https://example.com/image.jpg" />

attributes

Attributes

  • src (:string) - the image source. Defaults to nil.
  • alt (:string) (required) - the image alt text. It can be used as a fallback if the image is not available.
  • size (:atom) - the size of the avatar. Defaults to :medium.