Blur Out Up
Words arrive clean and depart upward with increasing blur for airy exits.
Source
components/kuchi/blur-out-up.tsx
1"use client";23import { Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion";45export interface BlurOutUpProps {6 text?: string;7 staggerDelay?: number;8 fontSize?: number;9 color?: string;10 fontWeight?: number;11 speed?: number;12 className?: string;13}1415export function BlurOutUp({16 text = "See you at launch",17 staggerDelay = 1,18 fontSize = 72,19 color = "#171717",20 fontWeight = 600,21 speed = 1,22 className,23}: BlurOutUpProps) {24 const frame = useCurrentFrame() * speed;25 const { durationInFrames } = useVideoConfig();2627 const words = text.split(" ");2829 const enterDur = 17;30 const enterTravel = 6;31 const exitDur = 14;32 const exitTravelFrom = 8;3334 const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);35 const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);3637 const enterEnd = enterDur + (words.length - 1) * staggerDelay;38 const exitStart = Math.max(39 enterEnd,40 durationInFrames - exitDur - (words.length - 1) * staggerDelay,41 );4243 return (44 <div45 style={{46 position: "absolute",47 inset: 0,48 display: "flex",49 alignItems: "center",50 justifyContent: "center",51 background: "transparent",52 }}53 >54 <span55 className={className}56 style={{57 fontSize,58 fontWeight,59 color,60 letterSpacing: "-0.03em",61 fontFamily:62 "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",63 }}64 >65 {words.map((word, i) => {66 const enterLocal = frame - i * staggerDelay;67 const exitLocal = frame - exitStart - i * staggerDelay;6869 const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {70 extrapolateLeft: "clamp",71 extrapolateRight: "clamp",72 easing: enterEasing,73 });7475 const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {76 extrapolateLeft: "clamp",77 extrapolateRight: "clamp",78 easing: exitEasing,79 });8081 const opacity = enterP * (1 - exitP);8283 const yEnter = interpolate(enterLocal, [0, enterTravel], [10, 0], {84 extrapolateLeft: "clamp",85 extrapolateRight: "clamp",86 easing: enterEasing,87 });8889 const yExit = interpolate(90 exitLocal,91 [exitTravelFrom, exitDur],92 [0, -14],93 {94 extrapolateLeft: "clamp",95 extrapolateRight: "clamp",96 easing: exitEasing,97 },98 );99100 const y = yEnter + yExit;101102 const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {103 extrapolateLeft: "clamp",104 extrapolateRight: "clamp",105 easing: enterEasing,106 });107108 const blurExit = interpolate(exitLocal, [0, exitDur], [0, 8], {109 extrapolateLeft: "clamp",110 extrapolateRight: "clamp",111 easing: exitEasing,112 });113114 const blur = blurEnter + blurExit;115116 return (117 <span118 key={i}119 style={{120 display: "inline-block",121 marginRight: "0.25em",122 transformOrigin: "50% 55%",123 opacity,124 translate: `0 ${y}px`,125 filter: `blur(${blur}px)`,126 }}127 >128 {word}129 </span>130 );131 })}132 </span>133 </div>134 );135}









