Video Text
Video Text uses a video as a visual text-mask treatment.
Practical React example
Use a short decorative video-filled heading alongside readable ordinary text.
Before you copy and paste
Match the imported component’s client or server rendering boundary before using the example. Copy components/magicui/video-text.tsx and its returned support files from the Code tab; preserve the project-relative paths.
Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.
Use a short decorative video-filled heading alongside readable ordinary text
// Usage adapted from Magic UI's pinned MIT source.
// Copyright (c) Magic UI. See ./LICENSES.md.
'use client';
import { VideoText } from "@/components/magicui/video-text"
export function ComponentExample() {
return (
<div className="relative h-[500px] w-full overflow-hidden">
<VideoText src="https://cdn.magicui.design/ocean-small.webm">OCEAN</VideoText>
</div>
);
}
Usage example adapted from Magic UI's pinned MIT source. Retain the source licence notices when copying.
Use a media URL you control, choose preload deliberately and verify autoplay requirements such as muted playback in your target browsers.
Customization
- VideoTextProps.src
- Required; string. The video source URL
- VideoTextProps.className
- Optional; string. Additional className for the container
- VideoTextProps.autoPlay
- Optional; boolean. Whether to autoplay the video
- VideoTextProps.muted
- Optional; boolean. Whether to mute the video
- VideoTextProps.loop
- Optional; boolean. Whether to loop the video
- VideoTextProps.preload
- Optional; "auto" | "metadata" | "none". Whether to preload the video
- VideoTextProps.children
- Required; ReactNode. The content to display (will have the video "inside" it)
- VideoTextProps.fontSize
- Optional; string | number. Font size for the text mask (in viewport width units)
- VideoTextProps.fontWeight
- Optional; string | number. Font weight for the text mask
- VideoTextProps.textAnchor
- Optional; string. Text anchor for the text mask
- VideoTextProps.dominantBaseline
- Optional; string. Dominant baseline for the text mask
- VideoTextProps.fontFamily
- Optional; string. Font family for the text mask
- VideoTextProps.as
- Optional; ElementType. The element type to render for the text
Integration notes
- Keep a static text or color fallback when video is unavailable or reduced motion is requested.
- The video-filled text should not be the only label for an important action or piece of information.
Component source: Magic UI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.
Give your agent taste.
The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.
All components are free. Sign up only to connect MCP.