Video Text

A text component with a video background.

Install using CLI

npm
pnpm
bun
yarn
npx shadcn-vue@latest add "https://inspira-ui.com/r/video-text.json"

Install Manually

Copy and paste the following code

VideoText.vue

API

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