Working with Archive Items

Image
Pass an image ID ###.###.IMG.###.
---
import ArchiveItem from '@/components/archive/ArchiveItem';
---
<ArchiveItem
id="DSI.MIL.IMG.002"
/>
Video
Pass a video ID ###.###.VID.###. Videos autoplay muted by default, unless the user opted out of autoplaying videos in the website settings, or in their browser (prefered reduced motion).
---
import ArchiveItem from '@/components/archive/ArchiveItem';
---
<ArchiveItem id="DSI.IDE.VID.004" />
Video Controls
controls sets the control style: full,minimal, hover or none.
---
import ArchiveItem from '@/components/archive/ArchiveItem';
---
<ArchiveItem
id="SVA.IXD.VID.001"
controls="full"
/>
Archive Tooltip
By default, ArchiveItem renders with a tooltip, allowing to go users into the archive. Set withArchiveTooltip to false to disable it.
---
import ArchiveItem from '@/components/archive/ArchiveItem';
---
<ArchiveItem
id="DSI.TEA.IMG.041"
withArchiveTooltip={false}
/>
Transforms
transform crops the asset. aspectRatio sets the shape, fit and gravity set which part stays visible.
---
import ArchiveItem from '@/components/archive/ArchiveItem';
---
<ArchiveItem
id="ORM.IDS.IMG.015"
transform={{
aspectRatio: 21 / 9,
fit: 'cover',
gravity: 'top',
}}
/>
Custom Video Poster
posterId replaces the poster and placeholder with an archive image. Use it when the first frame does not represent the video well.
---
import ArchiveItem from '@/components/archive/ArchiveItem';
---
<ArchiveItem
autoplay={false}
id="CLO.IDS.VID.002"
posterId="CLO.IDS.IMG.016"
/>
Video Range
range allows you to select a clip from a video item. The first number is the start time in seconds, the second number is the end time. If you want to play until the end of the video, set the second number tonull.
---
import ArchiveItem from '@/components/archive/ArchiveItem';
---
<ArchiveItem
id="DSI.TEA.VID.004"
range={[0.25, 1.25]}
/>
Tint
tint adds an overlay, so assets with a pure white or black background cut against the page.
---
import ArchiveItem from '@/components/archive/ArchiveItem';
---
<ArchiveItem
id="PRO.IDS.IMG.037"
tint
/>