Function components for HEEx, from Storehouse.Responsive's data.
import Storehouse.Components
<.img file={@photo.image} preset={:photo} sizes="(min-width: 60rem) 60rem, 100vw" alt={@photo.caption} />
Summary
Functions
An <img> of file with preset's sizes (Storehouse.Responsive.resolve/3):
its src, srcset, sizes, width and height, and its placeholder
and colour painted under it while it loads, when its analysis has them.
Functions
An <img> of file with preset's sizes (Storehouse.Responsive.resolve/3):
its src, srcset, sizes, width and height, and its placeholder
and colour painted under it while it loads, when its analysis has them.
Attributes
file(Storehouse.File) (required)preset(:atom) (required)sizes(:string) - the layout's slot for it, at each screen's width. Defaults tonil.src(:integer) - the width ofsrc, for a browser withoutsrcset. Defaults tonil.placeholder(:boolean) - paint the placeholder and colour under it while it loads. Defaults totrue.options(:list) -Storehouse.Variants.url/3's. Defaults to[].- Global attributes are accepted. Supports all globals plus:
["alt", "loading", "decoding", "fetchpriority", "crossorigin", "referrerpolicy"].