Skip to main content
A text component with a video background. This component uses SVG masking to create text that reveals a video background.

Props

Prop NameTypeDefaultDescription
srcstringRequiredThe video source URL.
classstring""Additional classes for the container.
autoPlaybooleantrueWhether to autoplay the video.
mutedbooleantrueWhether to mute the video.
loopbooleantrueWhether to loop the video.
preload"auto" | "metadata" | "none""auto"Whether to preload the video.
fontSizestring | number"120"Font size for the text mask.
fontWeightstring | number"bold"Font weight for the text mask.
textAnchorstring"middle"Text anchor for the text mask.
dominantBaselinestring"middle"Dominant baseline for the text mask.
fontFamilystring"sans-serif"Font family for the text mask.

Credits

Build docs developers (and LLMs) love