Skip to content

πŸŽ₯ Make videos programmatically with React

awesome

Jonny Burger1bc98ad40677
diff --git a/packages/docs/src/remotion/HomepageVideo/Card.tsx b/packages/docs/src/remotion/HomepageVideo/Card.tsx
index 8f1edc0af6..5ad4d5da66 100644
--- a/packages/docs/src/remotion/HomepageVideo/Card.tsx
+++ b/packages/docs/src/remotion/HomepageVideo/Card.tsx
@@ -3,6 +3,7 @@ import { AbsoluteFill, spring } from "remotion";
import { CurrentCountry } from "./CurrentCountry";
import styles from "./player-styles.module.css";
import { Temperature } from "./Temperature";
+import { TrendingRepos } from "./TrendingRepos";
export const paddingAndMargin = 20;
const height = 360;
@@ -316,7 +317,7 @@ export const Cards: React.FC<{
) : index === 1 ? (
<Temperature theme={theme} />
) : i === 2 ? (
- "🐭"
+ <TrendingRepos theme={theme} />
) : (
"🐹"
);
diff --git a/packages/docs/src/remotion/HomepageVideo/TrendingRepos.tsx b/packages/docs/src/remotion/HomepageVideo/TrendingRepos.tsx
new file mode 100644
index 0000000000..19a84e16b5
--- /dev/null
+++ b/packages/docs/src/remotion/HomepageVideo/TrendingRepos.tsx
@@ -0,0 +1,55 @@
+import React from "react";
+import { AbsoluteFill } from "remotion";
+
+export const TrendingRepos: React.FC<{
+ theme: "dark" | "light";
+}> = ({ theme }) => {
+ const item: React.CSSProperties = {
+ lineHeight: 1.1,
+ fontFamily: "GT Planar",
+ fontWeight: "500",
+ color: theme === "dark" ? "white" : "black",
+ fontFeatureSettings: "'ss03' 1",
+ };
+
+ const fill = theme === "light" ? "#666" : "#222";
+
+ return (
+ <AbsoluteFill>
+ <AbsoluteFill
+ style={{
+ justifyContent: "center",
+ paddingLeft: 20,
+ paddingRight: 20,
+ }}
+ >
+ <div>
+ <div
+ style={{
+ color: fill,
+ fontFamily: "GT Planar",
+ fontWeight: "500",
+ fontSize: 12,
+ }}
+ >
+ Saturday, January 13th
+ </div>
+ <div
+ style={{
+ color: "#0b84f3",
+ fontFamily: "GT Planar",
+ fontWeight: "500",
+ fontSize: 16,
+ marginBottom: 10,
+ }}
+ >
+ Trending repository
+ </div>
+ <div style={item}>1. maybe-finance/maybe</div>
+ <div style={item}>2. excalidraw/excalidraw</div>
+ <div style={item}>3. atuinsh/atuin</div>
+ </div>
+ </AbsoluteFill>
+ </AbsoluteFill>
+ );
+};