Skip to content

🎥 Make videos programmatically with React

put video apps everywhere

Jonny Burger60513a78f481
diff --git a/packages/docs/components/LambdaSplash/BuildApps.tsx b/packages/docs/components/LambdaSplash/BuildApps.tsx
index c7ddef87b9..34e4678144 100644
--- a/packages/docs/components/LambdaSplash/BuildApps.tsx
+++ b/packages/docs/components/LambdaSplash/BuildApps.tsx
@@ -82,7 +82,7 @@ export const BuildApps: React.FC = () => {
Combine our tools to build apps that leverage programmatic video.
</p>
<br />
- <VideoApps />
+ <VideoApps active="lambda" />
<br />
<p style={center}>
All Remotion products are source-available, for self-hosting, free for
diff --git a/packages/docs/components/LambdaSplash/VideoApps.tsx b/packages/docs/components/LambdaSplash/VideoApps.tsx
index 5dc306bc3f..497489e542 100644
--- a/packages/docs/components/LambdaSplash/VideoApps.tsx
+++ b/packages/docs/components/LambdaSplash/VideoApps.tsx
@@ -3,6 +3,7 @@ import React from "react";
import { BlueButton } from "../layout/Button";
import { Spacer } from "../layout/Spacer";
import videoapps from "./videoapps.module.css";
+import { YouAreHere } from "./YouAreHere";
const panel: React.CSSProperties = {
backgroundColor: "var(--ifm-background-color)",
@@ -64,11 +65,14 @@ const docsButton: React.CSSProperties = {
textDecoration: "none",
};
-export const VideoApps: React.FC = () => {
+export const VideoApps: React.FC<{
+ active: "remotion" | "player" | "lambda";
+}> = ({ active }) => {
const { colorMode } = useColorMode();
return (
<div className={videoapps.row}>
<div style={step}>
+ {active === "remotion" ? <YouAreHere /> : null}
<h2 style={stepTitle}>Remotion</h2>
<strong style={center}>Write videos in React</strong>
<br />
@@ -90,15 +94,19 @@ export const VideoApps: React.FC = () => {
<li>Render real MP4 videos</li>
</ul>
<div style={row}>
- <div style={flex}>
- <a style={docsButton} href="/">
- <BlueButton loading={false} fullWidth size="sm">
- Learn more
- </BlueButton>
- </a>
- </div>
- <Spacer />
- <Spacer />
+ {active === "remotion" ? null : (
+ <>
+ <div style={flex}>
+ <a style={docsButton} href="/">
+ <BlueButton loading={false} fullWidth size="sm">
+ Learn more
+ </BlueButton>
+ </a>
+ </div>
+ <Spacer />
+ <Spacer />
+ </>
+ )}
<div style={flex}>
<a style={docsButton} href="/docs">
<BlueButton loading={false} fullWidth size="sm">
@@ -112,6 +120,7 @@ export const VideoApps: React.FC = () => {
<Spacer />
<Spacer />
<div style={step}>
+ {active === "player" ? <YouAreHere /> : null}
<h2 style={stepTitle}>Remotion Player</h2>
<strong style={center}>Embeddable interactive videos</strong>
<br />
@@ -140,15 +149,19 @@ export const VideoApps: React.FC = () => {
<li>Customize look and behavior</li>
</ul>
<div style={row}>
- <div style={flex}>
- <a style={docsButton} href="/player">
- <BlueButton loading={false} fullWidth size="sm">
- Learn more
- </BlueButton>
- </a>
- </div>
- <Spacer />
- <Spacer />
+ {active === "player" ? null : (
+ <>
+ <div style={flex}>
+ <a style={docsButton} href="/player">
+ <BlueButton loading={false} fullWidth size="sm">
+ Learn more
+ </BlueButton>
+ </a>
+ </div>
+ <Spacer />
+ <Spacer />
+ </>
+ )}
<div style={flex}>
<a style={docsButton} href="/docs/player">
<BlueButton loading={false} fullWidth size="sm">
@@ -162,6 +175,7 @@ export const VideoApps: React.FC = () => {
<Spacer />
<Spacer />
<div style={step}>
+ {active === "lambda" ? <YouAreHere /> : null}
<h2 style={stepTitle}>Remotion Lambda</h2>
<strong style={center}>Render at scale</strong>
<br />
@@ -190,6 +204,19 @@ export const VideoApps: React.FC = () => {
<li>Fast because distributed</li>
</ul>
<div style={row}>
+ {active === "lambda" ? null : (
+ <>
+ <div style={flex}>
+ <a style={docsButton} href="/lambda">
+ <BlueButton loading={false} fullWidth size="sm">
+ Learn more
+ </BlueButton>
+ </a>
+ </div>
+ <Spacer />
+ <Spacer />
+ </>
+ )}
<div style={flex}>
<a style={docsButton} href="/docs/lambda">
<BlueButton loading={false} fullWidth size="sm">
diff --git a/packages/docs/components/LambdaSplash/YouAreHere.tsx b/packages/docs/components/LambdaSplash/YouAreHere.tsx
new file mode 100644
index 0000000000..9566bc37c2
--- /dev/null
+++ b/packages/docs/components/LambdaSplash/YouAreHere.tsx
@@ -0,0 +1,30 @@
+import React from "react";
+
+const container: React.CSSProperties = {
+ width: "100%",
+ display: "inline-flex",
+ justifyContent: "center",
+ position: "relative",
+};
+
+const label: React.CSSProperties = {
+ backgroundColor: "var(--ifm-color-primary)",
+ fontWeight: "bold",
+ color: "white",
+ paddingLeft: 8,
+ paddingRight: 8,
+ paddingTop: 4,
+ paddingBottom: 4,
+ borderRadius: 6,
+ fontSize: 13,
+ position: "absolute",
+ marginTop: -40,
+};
+
+export const YouAreHere: React.FC = () => {
+ return (
+ <div style={container}>
+ <div style={label}>YOU ARE HERE</div>
+ </div>
+ );
+};
diff --git a/packages/docs/src/pages/index.tsx b/packages/docs/src/pages/index.tsx
index fe84e455a0..7ccd549021 100644
--- a/packages/docs/src/pages/index.tsx
+++ b/packages/docs/src/pages/index.tsx
@@ -55,7 +55,7 @@ const NewLanding: React.FC = () => {
<br />
<br />
<VideoAppsTitle />
- <VideoApps />
+ <VideoApps active="remotion" />
<br />
<br />
<FreePricing />
diff --git a/packages/docs/src/pages/player/index.tsx b/packages/docs/src/pages/player/index.tsx
index 3e4975d3ef..5d32d8b083 100644
--- a/packages/docs/src/pages/player/index.tsx
+++ b/packages/docs/src/pages/player/index.tsx
@@ -39,7 +39,7 @@ export default () => {
</div>
<div style={container}>
<VideoAppsTitle />
- <VideoApps />
+ <VideoApps active="player" />
</div>
<br />
<br />