Skip to content

JS API

The FigureVideo component extends the Transition primitive and implements the withMountWhenInView decorator. It inherits their respective APIs, so make sur have a look at them.

Options

lazy

  • Type: boolean
  • Default: false

Use this options to enable lazy loading while reading the source from the data-src attribute of the video ref's sources.

Refs

video

  • Type: HTMLVideoElement

The FigureVideo component should have a ref corresponding to its inner <video /> element. This <video /> element must contain at least one <source /> element.