🎥 Make videos programmatically with React
import {Interactive} from 'remotion';
export const Banner = ({
theme,
withBackground,
}: {
readonly theme: 'light' | 'dark';
readonly withBackground: boolean;
}) => {
const foregroundColor = theme === 'light' ? 'black' : 'white';
const backgroundColor = theme === 'light' ? 'white' : 'black';
const markColor = theme === 'light' ? '#0B84F3' : 'white';
return (
<Interactive.Svg
name="Remotion banner"
width={2000}
height={800}
viewBox="0 0 2000 800"
fill="none"
xmlns="http://www.w3.org/2000/svg"
style={{display: 'block'}}
>
{withBackground ? (
<rect width={2000} height={800} fill={backgroundColor} />
) : null}
<path
d="M1266.38 359.572C1298.97 359.572 1326.27 386.765 1326.27 421.418C1326.27 456.071 1298.97 483.264 1266.38 483.264C1233.79 483.264 1206.48 456.071 1206.48 421.418C1206.48 386.765 1233.79 359.572 1266.38 359.572Z"
stroke={foregroundColor}
strokeWidth={44.8018}
/>
<circle
cx={1619.92}
cy={421.418}
r={61.846}
stroke={foregroundColor}
strokeWidth={44.8018}
/>
<path
d="M944.485 483.264V406.764C944.485 380.163 966.05 358.598 992.651 358.598C1019.25 358.598 1040.82 380.163 1040.82 406.764V483.264"
stroke={foregroundColor}
strokeWidth={44.8018}
strokeLinecap="square"
/>
<path
d="M1041.44 483.264V406.764C1041.44 380.163 1063 358.598 1089.6 358.598C1116.21 358.598 1137.77 380.163 1137.77 406.764V483.264"
stroke={foregroundColor}
strokeWidth={44.8018}
strokeLinecap="square"
/>
<path
d="M1745.07 483.264V415.087C1745.07 384.427 1769.93 359.572 1800.59 359.572C1831.25 359.572 1856.1 384.427 1856.1 415.087V483.264"
stroke={foregroundColor}
strokeWidth={44.8018}
strokeLinecap="square"
/>
<path
d="M1393.48 317.692L1393.48 483.264"
stroke={foregroundColor}
strokeWidth={44.8018}
strokeLinecap="square"
/>
<path
d="M1491.85 359.572L1491.85 483.264"
stroke={foregroundColor}
strokeWidth={44.8018}
strokeLinecap="square"
/>
<path
d="M1393.48 359.572L1433.41 359.572"
stroke={foregroundColor}
strokeWidth={44.8018}
strokeLinecap="round"
/>
<circle cx={1491.36} cy={296.752} r={21.9139} fill={foregroundColor} />
<mask
id="banner-light-mask-0"
style={{maskType: 'alpha'}}
maskUnits="userSpaceOnUse"
x={730}
y={337}
width={168}
height={168}
>
<circle
cx={813.975}
cy={420.931}
r={64.2809}
fill={foregroundColor}
stroke={foregroundColor}
strokeWidth={38.9581}
/>
</mask>
<g mask="url(#banner-light-mask-0)">
<path
d="M746.772 403.4H888.969C901.341 403.4 911.37 413.429 911.37 425.801V435.54H746.772V403.4Z"
fill={foregroundColor}
/>
</g>
<mask
id="banner-light-mask-1"
style={{maskType: 'alpha'}}
maskUnits="userSpaceOnUse"
x={705}
y={317}
width={205}
height={223}
>
<path
d="M837.35 421.905H901.144L909.423 323.049L877.769 317.692L715.119 323.049L705.866 539.753H852.933L903.579 451.61H837.35V421.905Z"
fill="black"
/>
</mask>
<g mask="url(#banner-light-mask-1)">
<path
d="M813.975 359.572C847.74 359.572 875.334 387.139 875.334 421.418C875.334 455.697 847.74 483.264 813.975 483.264C780.21 483.264 752.617 455.697 752.617 421.418C752.617 387.139 780.21 359.572 813.975 359.572Z"
stroke={foregroundColor}
strokeWidth={44.8018}
/>
</g>
<path
d="M637.69 483.264V415.087C637.69 384.427 662.545 359.572 693.205 359.572"
stroke={foregroundColor}
strokeWidth={44.8018}
strokeLinecap="square"
/>
<g transform={theme === 'dark' ? 'translate(0 -1)' : undefined}>
<path
d="M253.407 237.954C246.603 238.324 241.119 239.403 235.594 241.506C232.838 242.543 228.321 244.801 225.835 246.364C215.437 252.884 207.51 262.685 203.377 274.092C202.553 276.351 200.323 283.552 198.888 288.51C189.328 321.65 183.902 357.887 182.737 396.241C182.552 402.349 182.552 416.895 182.737 422.904C183.518 448.331 185.947 471.286 190.351 494.696C192.14 504.171 195.01 516.899 196.672 522.68C200.067 534.428 206.999 544.428 216.857 551.758C223.463 556.673 230.963 559.968 239.273 561.588C243.279 562.369 248.563 562.724 252.455 562.468C257.839 562.113 268.521 560.679 277.2 559.13C316.321 552.156 352.459 539.669 385.23 521.799C405.983 510.478 423.725 498.219 440.842 483.346C457.902 468.545 472.448 452.621 485.247 434.751C488.216 430.617 489.708 428.202 491.199 425.162C495.034 417.321 496.838 409.523 496.824 400.801C496.824 392.676 495.29 385.459 491.98 378.073C490.389 374.507 488.869 371.95 485.46 367.092C472.903 349.208 458.968 333.625 441.979 318.483C415.643 295.016 384.363 275.768 349.433 261.521C341.862 258.438 334.404 255.725 325.426 252.784C306.42 246.577 282.896 241.193 262.995 238.508C259.87 238.082 255.623 237.841 253.407 237.954Z"
fill={markColor}
fillOpacity={0.3}
/>
<path
d="M229.984 194.036C221.337 194.505 214.369 195.877 207.347 198.549C203.845 199.866 198.104 202.737 194.945 204.722C181.731 213.008 171.658 225.464 166.405 239.96C165.358 242.83 162.524 251.982 160.701 258.282C148.552 300.397 141.656 346.447 140.176 395.187C139.941 402.95 139.941 421.435 140.176 429.071C141.169 461.383 144.256 490.555 149.852 520.305C152.126 532.345 155.773 548.52 157.885 555.867C162.199 570.796 171.009 583.504 183.537 592.819C191.931 599.065 201.462 603.253 212.022 605.311C217.113 606.304 223.828 606.755 228.774 606.43C235.616 605.979 249.191 604.155 260.221 602.188C309.936 593.324 355.859 577.457 397.505 554.748C423.879 540.36 446.426 524.782 468.178 505.881C489.858 487.071 508.343 466.835 524.608 444.126C528.381 438.873 530.276 435.804 532.172 431.941C537.046 421.976 539.338 412.066 539.32 400.982C539.32 390.656 537.371 381.486 533.165 372.099C531.143 367.568 529.211 364.319 524.879 358.145C508.921 335.418 491.212 315.615 469.622 296.372C436.154 266.55 396.404 242.09 352.014 223.984C342.393 220.066 332.916 216.618 321.507 212.882C297.353 204.993 267.46 198.151 242.169 194.74C238.198 194.198 232.8 193.891 229.984 194.036Z"
fill={markColor}
fillOpacity={0.15}
/>
<path
d="M277.65 283.507C272.757 283.773 268.814 284.549 264.84 286.061C262.858 286.807 259.61 288.431 257.822 289.555C250.344 294.244 244.644 301.292 241.671 309.495C241.079 311.119 239.475 316.299 238.443 319.864C231.568 343.696 227.666 369.756 226.828 397.337C226.696 401.73 226.696 412.191 226.828 416.512C227.39 434.797 229.137 451.306 232.304 468.141C233.591 474.954 235.655 484.107 236.85 488.265C239.291 496.713 244.276 503.905 251.366 509.176C256.116 512.71 261.51 515.08 267.486 516.245C270.367 516.807 274.167 517.062 276.966 516.878C280.837 516.623 288.519 515.591 294.761 514.478C322.894 509.462 348.882 500.483 372.449 487.632C387.374 479.49 400.133 470.674 412.443 459.978C424.711 449.334 435.172 437.882 444.376 425.031C446.511 422.059 447.584 420.322 448.656 418.136C451.414 412.497 452.712 406.889 452.701 400.617C452.701 394.773 451.598 389.584 449.218 384.272C448.074 381.708 446.981 379.869 444.529 376.375C435.499 363.514 425.477 352.308 413.26 341.418C394.32 324.542 371.826 310.701 346.706 300.454C341.262 298.238 335.898 296.287 329.442 294.172C315.774 289.708 298.857 285.836 284.546 283.906C282.298 283.599 279.244 283.425 277.65 283.507Z"
fill={markColor}
/>
</g>
</Interactive.Svg>
);
};