Module Solidtype_heroui.Avatar

HeroUI's Avatar: Kobalte's Image.Root, a <span>, with HeroUI's classes from Styles.Avatar, that shows its Image once it has loaded and its Fallback until then, or where it cannot.

  <Avatar>
    <Avatar.Image alt="Ada Lovelace" src="/ada.png" />
    <Avatar.Fallback>"AL"</Avatar.Fallback>
  </Avatar>

A part is used inside an Avatar: elsewhere it raises Invalid_argument as it is made.

type color = [
  1. | `default
  2. | `accent
  3. | `success
  4. | `warning
  5. | `danger
]
module Image : sig ... end

The image, a <img> Kobalte renders once it has loaded.

module Fallback : sig ... end

What the avatar shows while its image loads, or where it cannot: initials, an icon. Its color is its own, else the avatar's.

module Props : sig ... end