Crops its content to one of nine mask shapes: squircle, reuleaux-triangle, diamond,
hexagon, hexagon-2, octagon, star, star-2 and heart.
<.mask shape="heart" src="/images/avatar.jpg" alt="Jane" size="64" />
<.mask shape="hexagon" size="56"><span>JD</span></.mask>
<.mask shape="star" label="Favorite" size="32" />With src it renders the masked image; otherwise a block holding the inner content. The block
keeps its inner content readable by screen readers; give it a label when the shape itself
carries the meaning (role="img" and aria-label). The size is size (pixels, or an
LedgerUI.Components.Avatar size name); paint it with style="background: ...".
It is drawn with the lu-av face of the avatar (LedgerUI.Components.Avatar).
Summary
Functions
Attributes
shape(:string) - Defaults to"squircle". Must be one of"squircle","reuleaux-triangle","diamond","hexagon","hexagon-2","octagon","star","star-2", or"heart".src(:string) - Defaults tonil.alt(:string) - Defaults to"".label(:string) - Names a block mask for assistive technology. Defaults tonil.size(:string) - Pixels or an avatar size name. Defaults to"64".style(:string) - Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block