Getting Started
Components
Special Effects
Animations
Text Animations
Backgrounds
A text component with a video background.
runed
OCEAN
Installation
pnpm dlx shadcn-svelte@latest add https://sv-animations.vercel.app/r/video-text.json
Install dependencies
Install the required packages for this component:
pnpm add runed
Copy the Source Code
Copy and paste the following code into your project:
video-text.svelte
index.ts
Folder Structure
Folder Structure
Props
VideoText
A component for Video Text.
| Name | Type | Default | Description |
|---|---|---|---|
class | string | "" | Additional CSS classes to apply |
src | string | | Source URL of the video |
content | string | | Text content to display |
autoPlay | boolean | true | Whether to autoplay the video |
muted | boolean | true | Whether to mute the video |
loop | boolean | true | Whether to loop the video |
preload | "auto" | "metadata" | "none" | "auto" | Preload behavior of the video |
fontSize | string | number | 20 | Font size of the text |
fontWeight | string | number | "bold" | Font weight of the text |
textAnchor | string | "middle" | Text anchor alignment |
dominantBaseline | string | "middle" | Dominant baseline alignment |
fontFamily | string | "sans-serif" | Font family of the text |