Thumbnail
<Clover.Thumbnail /><clover-thumbnail>2 kB added to a page with a Root, gzipped7 kB added to a page with a <clover-root>, styles included, gzipped
A small picture of the resource, or of the current Canvas, named by its label.
<Clover.Root iiifContent={url}>
<Clover.Thumbnail size={} of= />
</Clover.Root><clover-root
iiif-content="https://clover.iiif.library.northwestern.edu/mocks/paged/manifest.json">
<clover-thumbnail size="" of=></clover-thumbnail>
</clover-root>API reference
Reads thumbnail from the Root’s resource and renders an img, its alt the resource’s
label. It renders nothing while there is no picture. Its other props go to the img.
Examples
The current Canvas
Use of="canvas" for the Canvas in view. This newspaper’s pages have no thumbnail, so
each is pictured by the image it paints.
<Clover.Root iiifContent="https://clover.iiif.library.northwestern.edu/mocks/page-transcript/manifest.json">
<Clover.Body />
<Clover.Thumbnail of="canvas" size={200} />
</Clover.Root><clover-root
iiif-content="https://clover.iiif.library.northwestern.edu/mocks/page-transcript/manifest.json">
<clover-body></clover-body>
<clover-thumbnail of="canvas" size="200"></clover-thumbnail>
</clover-root>Beside its title
Beside a Label<clover-label> that says the same, use alt="", so assistive technology does not read
the title twice.
<Clover.Thumbnail alt="" size={200} />
<Clover.Label as="h4" /><clover-thumbnail alt="" size="200"></clover-thumbnail>
<clover-label as="h4"></clover-label>Size and crop
Size it, and crop it, with your CSS: Clover’s stylesheet leaves .clover-thumbnail alone.
<Clover.Thumbnail
style={{ width: "16rem", aspectRatio: "16 / 9", objectFit: "cover" }}
/><clover-thumbnail
style="
width: 16rem;
aspect-ratio: 16 / 9;
object-fit: cover;
"></clover-thumbnail>Previous versions
- Inside a
Root<clover-root>, leave outthumbnail: it reads the resource’s own. - Its
altis the resource’s label: noaltAsLabel. objectFitisobject-fit, in your CSS.- It is always an
img: no video thumbnails.