Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Generate walkthrough videos from Stitch design screens using Remotion with smooth transitions, zoom effects, and text overlays.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
resources/screen-slide-template.tsx
1import {AbsoluteFill, spring, useCurrentFrame, useVideoConfig} from 'remotion';2import {Img} from 'remotion';34interface ScreenSlideProps {5imageSrc: string;6title: string;7description?: string;8width: number;9height: number;10}1112export const ScreenSlide: React.FC<ScreenSlideProps> = ({13imageSrc,14title,15description,16width,17height,18}) => {19const frame = useCurrentFrame();20const {fps} = useVideoConfig();2122// Zoom in animation23const zoom = spring({24frame,25fps,26from: 0.95,27to: 1,28config: {29damping: 12,30stiffness: 80,31},32});3334// Fade in animation35const opacity = spring({36frame,37fps,38from: 0,39to: 1,40config: {41damping: 10,42},43});4445// Text overlay fade in (delayed)46const textOpacity = spring({47frame: frame - 15, // Delay by 15 frames48fps,49from: 0,50to: 1,51config: {52damping: 10,53},54});5556return (57<AbsoluteFill58style={{59backgroundColor: '#000',60justifyContent: 'center',61alignItems: 'center',62}}63>64{/* Screen Image */}65<div66style={{67transform: `scale(${zoom})`,68opacity,69maxWidth: '90%',70maxHeight: '80%',71position: 'relative',72}}73>74<Img75src={imageSrc}76style={{77width: '100%',78height: 'auto',79borderRadius: '8px',80boxShadow: '0 20px 60px rgba(0, 0, 0, 0.3)',81}}82/>83</div>8485{/* Text Overlay */}86<div87style={{88position: 'absolute',89bottom: '10%',90left: '50%',91transform: 'translateX(-50%)',92textAlign: 'center',93opacity: textOpacity,94width: '80%',95}}96>97<h198style={{99fontSize: '48px',100fontWeight: 'bold',101color: '#fff',102margin: '0 0 12px 0',103textShadow: '0 2px 10px rgba(0, 0, 0, 0.5)',104}}105>106{title}107</h1>108{description && (109<p110style={{111fontSize: '24px',112color: '#ddd',113margin: 0,114textShadow: '0 1px 5px rgba(0, 0, 0, 0.5)',115}}116>117{description}118</p>119)}120</div>121</AbsoluteFill>122);123};124