Looking for the old docs? Go here

Display

Thumbnail

This component is used to load and display thumbnail images.

INFO

See the loading thumbnails guide for how to prepare and load them.

HTMLAttributes<HTMLElement>
Ref<HTMLElement>

Used to load and display a preview thumbnail at the given time.

import { Thumbnail } from "@vidstack/react";

const Component = Thumbnail.Root;
type Props = Thumbnail.RootProps;
<Thumbnail.Root src="thumbnails.vtt" time={10} >
  <Thumbnail.Img />
</Thumbnail.Root>
PropTypeDefault
asChild
boolean
false
children
ReactNode
null
crossOrigin
mixed
null
src
ThumbnailSrc
null
time
number
0
/* Example. */
.component[data-foo] {}
NameDescription
data-loading
Whether thumbnail image is loading.
data-error
Whether an error occurred loading thumbnail.
data-hidden
Whether thumbnail is not available or failed to load.
RefAttributes
Ref<HTMLImageElement>
import { Thumbnail } from "@vidstack/react";

const Component = Thumbnail.Img;
type Props = Thumbnail.ImgProps;
<Img />
PropTypeDefault
children
ReactNode
null
asChild
boolean
false

Previous
Next