🎥 Make videos programmatically with React
const Component: React.FC = () => {
return (
<div
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
}}
>
<div
style={{
marginTop: 0,
marginLeft: 0,
display: 'flex',
height: 200,
flexDirection: 'row',
alignItems: 'center',
position: 'relative',
overflow: 'hidden',
}}
>
<div
style={{position: 'absolute', right: 0, height: '100%', width: 400}}
>
<div
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
maskImage:
'linear-gradient(transparent 0%, rgb(0, 0, 0) 30%, rgb(0, 0, 0) 70%, transparent 100%)',
}}
>
<div
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
perspective: 10000,
}}
>
<div
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
fontSize: 65,
transform:
'translateZ(88.562px) translateY(16.0239px) rotateX(0.178998deg)',
backfaceVisibility: 'hidden',
perspective: 1000,
color: 'rgb(1, 6, 74)',
fontFamily: 'Helvetica',
fontWeight: 'bold',
}}
>
<div
style={{
transform: 'rotateX(-0.178998rad)',
backfaceVisibility: 'hidden',
textAlign: 'right',
lineHeight: 1,
width: 410,
paddingRight: 50,
}}
>
Tue
</div>
</div>
<div
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
fontSize: 65,
transform:
'translateZ(42.6895px) translateY(79.2313px) rotateX(1.0766deg)',
backfaceVisibility: 'hidden',
perspective: 1000,
color: 'rgba(1, 6, 74, 0.3)',
fontFamily: 'Helvetica',
fontWeight: 'bold',
}}
>
<div
style={{
transform: 'rotateX(-1.0766rad)',
backfaceVisibility: 'hidden',
textAlign: 'right',
lineHeight: 1,
width: 410,
paddingRight: 50,
}}
>
Wed
</div>
</div>
<div
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
fontSize: 65,
transform:
'translateZ(-35.3291px) translateY(82.7759px) rotateX(1.97419deg)',
backfaceVisibility: 'hidden',
perspective: 1000,
color: 'rgba(1, 6, 74, 0.3)',
fontFamily: 'Helvetica',
fontWeight: 'bold',
}}
>
<div
style={{
transform: 'rotateX(-1.97419rad)',
backfaceVisibility: 'hidden',
textAlign: 'right',
lineHeight: 1,
width: 410,
paddingRight: 50,
}}
>
Thu
</div>
</div>
<div
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
fontSize: 65,
transform:
'translateZ(-86.7442px) translateY(23.9886px) rotateX(2.87179deg)',
backfaceVisibility: 'hidden',
perspective: 1000,
color: 'rgba(1, 6, 74, 0.3)',
fontFamily: 'Helvetica',
fontWeight: 'bold',
}}
>
<div
style={{
transform: 'rotateX(-2.87179rad)',
backfaceVisibility: 'hidden',
textAlign: 'right',
lineHeight: 1,
width: 410,
paddingRight: 50,
}}
>
Fri
</div>
</div>
<div
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
fontSize: 65,
transform:
'translateZ(-72.8391px) translateY(-52.8627px) rotateX(3.76939deg)',
backfaceVisibility: 'hidden',
perspective: 1000,
color: 'rgba(1, 6, 74, 0.3)',
fontFamily: 'Helvetica',
fontWeight: 'bold',
}}
>
<div
style={{
transform: 'rotateX(-3.76939rad)',
backfaceVisibility: 'hidden',
textAlign: 'right',
lineHeight: 1,
width: 410,
paddingRight: 50,
}}
>
Sat
</div>
</div>
<div
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
fontSize: 65,
transform:
'translateZ(-4.08474px) translateY(-89.9073px) rotateX(4.66699deg)',
backfaceVisibility: 'hidden',
perspective: 1000,
color: 'rgba(1, 6, 74, 0.3)',
fontFamily: 'Helvetica',
fontWeight: 'bold',
}}
>
<div
style={{
transform: 'rotateX(-4.66699rad)',
backfaceVisibility: 'hidden',
textAlign: 'right',
lineHeight: 1,
width: 410,
paddingRight: 50,
}}
>
Sun
</div>
</div>
<div
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
fontSize: 65,
transform:
'translateZ(67.7455px) translateY(-59.2498px) rotateX(5.56459deg)',
backfaceVisibility: 'hidden',
perspective: 1000,
color: 'rgba(1, 6, 74, 0.3)',
fontFamily: 'Helvetica',
fontWeight: 'bold',
}}
>
<div
style={{
transform: 'rotateX(-5.56459rad)',
backfaceVisibility: 'hidden',
textAlign: 'right',
lineHeight: 1,
width: 410,
paddingRight: 50,
}}
>
Mon
</div>
</div>
</div>
</div>
</div>
</div>
</div>
);
};
export const backfaceVisibilityMask = {
component: Component,
id: 'backface-visibility-mask',
width: 500,
height: 200,
fps: 30,
durationInFrames: 1,
} as const;