Slider

<Slider> draws Clover’s Items as a slider so you can stream manifests from a collection or facet feed. It hydrates client-side, stays SSR-safe, and links each slide back to its work page.

<Slider iiifContent="https://api.dc.library.northwestern.edu/api/v2/collections/7ac5769f-a1d9-4227-a350-bf8bd8b1cddc?as=iiif" />

Props

PropTypeRequiredNotes
iiifContentstring✅IIIF Collection URL or Canopy facet JSON (/api/facet/...).
heightstringCSS height for the viewport area.
optionsobjectMerged with the defaults from sliderOptions.js. Each width's slidesPerView and spaceBetween in breakpoints (and their values outside it) set how many slides fill the row and the space between them. Clover 3's other slider options have no effect.
classNamestringAdds classes to the slider container.

Examples

Facet feed

Point the slider at a generated facet feed to surface related manifests inline.

<Slider iiifContent="/api/facet/Subject/architecture.json" />

Custom breakpoints

Override the defaults with your own options.breakpoints map. Give each spaceBetween with rem(), which Canopy exports, and the slider converts it to pixels at the reader's text size.

import {rem} from '@nulib/canopy/ui/server'; const customOptions = {  breakpoints: {    320: {slidesPerView: 1.5, spaceBetween: rem(0.75)},    640: {slidesPerView: 3, spaceBetween: rem(1)},    1024: {slidesPerView: 4, spaceBetween: rem(1.25)},  },}; <Slider  iiifContent="https://api.dc.library.northwestern.edu/api/v2/collections/94536627-cfdf-413c-852b-0cb16d986da3?as=iiif"  options={customOptions}/>

Tall viewport

Use the height prop when a slider needs extra breathing room for taller thumbnails.

<Slider  iiifContent="https://api.dc.library.northwestern.edu/api/v2/collections/7ac5769f-a1d9-4227-a350-bf8bd8b1cddc?as=iiif"  height="28rem"/>