💻
Code-First
Define videos as React components. Full TypeScript support with autocomplete.
Build videos with React components. Frame-perfect animations, deterministic rendering, and a powerful studio.
import { useCurrentFrame, spring, AbsoluteFill, Composition } from 'framely';
function MyVideo() {
const frame = useCurrentFrame();
const scale = spring({ frame, fps: 30, from: 0, to: 1 });
return (
<AbsoluteFill style={{ background: '#000' }}>
<h1 style={{ transform: `scale(${scale})` }}>
Hello, Framely!
</h1>
</AbsoluteFill>
);
}
export const Root = () => (
<Composition
id="my-video"
component={MyVideo}
width={1920}
height={1080}
fps={30}
durationInFrames={150}
/>
);