Skip to content

🎥 Make videos programmatically with React

cool

Jonny Burger21b989c3fe16
diff --git a/packages/docs/src/remotion/HomepageVideo/Card.tsx b/packages/docs/src/remotion/HomepageVideo/Card.tsx
index b6ecdf31d5..8f1edc0af6 100644
--- a/packages/docs/src/remotion/HomepageVideo/Card.tsx
+++ b/packages/docs/src/remotion/HomepageVideo/Card.tsx
@@ -2,6 +2,7 @@ import React, { createRef, useCallback, useRef, useState } from "react";
import { AbsoluteFill, spring } from "remotion";
import { CurrentCountry } from "./CurrentCountry";
import styles from "./player-styles.module.css";
+import { Temperature } from "./Temperature";
export const paddingAndMargin = 20;
const height = 360;
@@ -313,7 +314,7 @@ export const Cards: React.FC<{
index === 0 ? (
<CurrentCountry theme={theme} />
) : index === 1 ? (
- "🐱"
+ <Temperature theme={theme} />
) : i === 2 ? (
"🐭"
) : (
diff --git a/packages/docs/src/remotion/HomepageVideo/CurrentCountry.tsx b/packages/docs/src/remotion/HomepageVideo/CurrentCountry.tsx
index 1456dba7fc..c4a7907a5b 100644
--- a/packages/docs/src/remotion/HomepageVideo/CurrentCountry.tsx
+++ b/packages/docs/src/remotion/HomepageVideo/CurrentCountry.tsx
@@ -40,6 +40,7 @@ export const CurrentCountry: React.FC<{
fontWeight: "500",
fontSize: 13,
textAlign: "center",
+ marginTop: -10,
}}
>
Your location
diff --git a/packages/docs/src/remotion/HomepageVideo/Temperature.tsx b/packages/docs/src/remotion/HomepageVideo/Temperature.tsx
new file mode 100644
index 0000000000..ff1d6487c8
--- /dev/null
+++ b/packages/docs/src/remotion/HomepageVideo/Temperature.tsx
@@ -0,0 +1,45 @@
+import React from "react";
+import { AbsoluteFill } from "remotion";
+
+export const Temperature: React.FC<{
+ theme: "dark" | "light";
+}> = ({ theme }) => {
+ return (
+ <AbsoluteFill>
+ <AbsoluteFill
+ style={{
+ alignItems: "center",
+ justifyContent: "center",
+ paddingLeft: 20,
+ paddingRight: 20,
+ }}
+ >
+ <div
+ style={{
+ color: "#0b84f3",
+ fontFamily: "GT Planar",
+ fontWeight: "500",
+ fontSize: 13,
+ textAlign: "center",
+ marginTop: -7,
+ }}
+ >
+ Temperature
+ </div>
+ <div
+ style={{
+ lineHeight: 1.1,
+ fontFamily: "GT Planar",
+ textAlign: "center",
+ fontWeight: "bold",
+ fontSize: 60,
+ color: theme === "dark" ? "white" : "black",
+ fontFeatureSettings: "'ss03' 1",
+ }}
+ >
+ 23°C
+ </div>
+ </AbsoluteFill>
+ </AbsoluteFill>
+ );
+};