Skip to content

🎥 Make videos programmatically with React

templates design system

JonnyBurger5f5f4ddd2d84
diff --git a/packages/docs/src/pages/templates/index.tsx b/packages/docs/src/pages/templates/index.tsx
index 24ca2f95ee..1072d7e101 100644
--- a/packages/docs/src/pages/templates/index.tsx
+++ b/packages/docs/src/pages/templates/index.tsx
@@ -10,15 +10,17 @@ export default () => {
const context = useDocusaurusContext();
return (
- <Layout>
- <Head>
- {Seo.renderTitle(`Starter Templates | Remotion`)}
- {Seo.renderDescription(
- 'Jumpstart your Remotion project with a template.',
- )}
- {Seo.renderImage(imgSrc, context.siteConfig.url)}
- </Head>
- <Templates />
- </Layout>
+ <div style={{width: '100%', backgroundColor: 'var(--background)'}}>
+ <Layout>
+ <Head>
+ {Seo.renderTitle(`Starter Templates | Remotion`)}
+ {Seo.renderDescription(
+ 'Jumpstart your Remotion project with a template.',
+ )}
+ {Seo.renderImage(imgSrc, context.siteConfig.url)}
+ </Head>
+ <Templates />
+ </Layout>
+ </div>
);
};
diff --git a/packages/promo-pages/src/components/Homepage.tsx b/packages/promo-pages/src/components/Homepage.tsx
index f6a1f2a999..3fc8c92e07 100644
--- a/packages/promo-pages/src/components/Homepage.tsx
+++ b/packages/promo-pages/src/components/Homepage.tsx
@@ -24,7 +24,7 @@ export const NewLanding: React.FC<{
}> = ({colorMode, setColorMode}) => {
return (
<ColorModeProvider colorMode={colorMode} setColorMode={setColorMode}>
- <div className="bg-[var(--background)] relative">
+ <div className="w-full relative">
<div style={{overflow: 'hidden'}}>
<div>
<BackgroundAnimation />
diff --git a/packages/promo-pages/src/components/templates.module.css b/packages/promo-pages/src/components/templates.module.css
deleted file mode 100644
index 08495a8fd6..0000000000
--- a/packages/promo-pages/src/components/templates.module.css
+++ /dev/null
@@ -1,41 +0,0 @@
-.title {
- font-size: 5em;
- font-weight: 900;
- line-height: 1;
- margin-top: 75px;
- text-align: center;
- margin-bottom: 40px;
-}
-
-.grid {
- display: grid;
- grid-template-columns: 1fr 1fr 1fr;
- grid-auto-rows: 1fr;
- grid-gap: 15px;
-}
-
-.item {
- border-radius: 5px;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- position: relative;
- color: var(--text-color);
- border: 1px solid var(--ifm-color-emphasis-300);
- padding: 14px;
-}
-.item:hover {
- border: 1px solid var(--ifm-color-emphasis-500);
-}
-
-@media (max-width: 1000px) {
- .grid {
- grid-template-columns: 1fr 1fr;
- }
-}
-
-@media (max-width: 600px) {
- .grid {
- grid-template-columns: 1fr;
- }
-}
diff --git a/packages/promo-pages/src/components/templates.tsx b/packages/promo-pages/src/components/templates.tsx
index 5912e187e1..cd41fa67d3 100644
--- a/packages/promo-pages/src/components/templates.tsx
+++ b/packages/promo-pages/src/components/templates.tsx
@@ -1,54 +1,10 @@
+import {Card} from '@remotion/design';
import {CreateVideoInternals} from 'create-video';
import React from 'react';
import {IconForTemplate} from './homepage/IconForTemplate';
import {EditorIcon} from './icons/editor';
import {SkiaIcon} from './icons/skia';
import {TimelineIcon} from './icons/timeline';
-import styles from './templates.module.css';
-
-const content: React.CSSProperties = {
- maxWidth: 1000,
- margin: 'auto',
- padding: '0 20px',
-};
-
-const para: React.CSSProperties = {
- textAlign: 'center',
- marginBottom: 50,
-};
-
-const lowerpara: React.CSSProperties = {
- textAlign: 'center',
- color: 'var(--light-text-color)',
-};
-
-const outer: React.CSSProperties = {
- display: 'flex',
- cursor: 'pointer',
- color: 'var(--text-color)',
- textDecoration: 'none',
-};
-
-const icon: React.CSSProperties = {
- display: 'flex',
- margin: 0,
- marginRight: 10,
- height: 30,
- width: 30,
- justifyContent: 'center',
- alignItems: 'center',
-};
-
-const labelStyle: React.CSSProperties = {
- fontWeight: 'bold',
-};
-
-const descriptionStyle: React.CSSProperties = {
- fontSize: 14,
- marginTop: 10,
- color: 'var(--light-text-color)',
- marginBottom: 10,
-};
const Item: React.FC<{
readonly label: string;
@@ -57,11 +13,11 @@ const Item: React.FC<{
}> = ({children, label, description}) => {
return (
<div>
- <div
- style={{flexDirection: 'row', display: 'flex', alignItems: 'center'}}
- >
- <div style={icon}>{children}</div>
- <div style={labelStyle}>{label}</div>
+ <div className="flex flex-row items-center">
+ <div className="flex mr-2.5 h-[30px] w-[30px] justify-center items-center">
+ {children}
+ </div>
+ <div className="font-bold">{label}</div>
</div>
<div>
<p
@@ -69,7 +25,7 @@ const Item: React.FC<{
dangerouslySetInnerHTML={{
__html: description,
}}
- style={descriptionStyle}
+ className="text-sm mt-2.5 text-gray-500 mb-2.5"
/>
</div>
</div>
@@ -79,31 +35,32 @@ const Item: React.FC<{
export const Templates: React.FC = () => {
return (
<>
- <div style={content}>
- <h1 className={styles.title}>
+ <div className="max-w-[1000px] mx-auto px-5 bg-[var(--background)]">
+ <h1 className="text-4xl md:text-7xl lg:text-8xl font-black leading-none mt-[75px] text-center mb-10">
Find the right
<br />
template
</h1>
- <p style={para}>
+ <p className="text-center mb-[50px]">
Jumpstart your project with a template that fits your usecase.
</p>
<h3>Free templates</h3>
- <div className={styles.grid}>
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-[15px]">
{CreateVideoInternals.FEATURED_TEMPLATES.map((template) => {
return (
<a
key={template.cliId}
- className={styles.item}
- style={outer}
href={`/templates/${template.cliId}`}
+ className="no-underline"
>
- <Item
- label={template.homePageLabel}
- description={template.description}
- >
- <IconForTemplate scale={0.7} template={template} />
- </Item>
+ <Card className="p-3.5 flex flex-col relative cursor-pointer text-[var(--text-color)] no-underline h-full">
+ <Item
+ label={template.homePageLabel}
+ description={template.description}
+ >
+ <IconForTemplate scale={0.7} template={template} />
+ </Item>
+ </Card>
</a>
);
})}
@@ -111,87 +68,91 @@ export const Templates: React.FC = () => {
<br />
<br />
<h3>Paid templates</h3>
- <div className={styles.grid}>
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-[15px]">
<a
key={'editor-starter'}
- className={styles.item}
- style={outer}
+ className="no-underline"
href={`https://www.remotion.pro/editor-starter`}
>
- <Item
- label={'Editor Starter'}
- description={'A boilerplate for starting your own video editor'}
- >
- <EditorIcon
- style={{
- height: 0.7 * 32,
- overflow: 'visible',
- }}
- />
- </Item>{' '}
+ <Card className="p-3.5 flex flex-col relative cursor-pointer text-[var(--text-color)] no-underline h-full">
+ <Item
+ label={'Editor Starter'}
+ description={'A boilerplate for starting your own video editor'}
+ >
+ <EditorIcon
+ style={{
+ height: 0.7 * 32,
+ overflow: 'visible',
+ }}
+ />
+ </Item>
+ </Card>
</a>
<a
key={'mapbox-globe'}
- className={styles.item}
- style={outer}
+ className="no-underline"
href={`https://www.remotion.pro/mapbox-globe`}
>
- <Item
- label={'Mapbox Globe'}
- description={'A rotateable and zoomeable 3D Globe'}
- >
- <svg
- style={{height: 0.7 * 36, overflow: 'visible'}}
- viewBox="0 0 512 512"
+ <Card className="p-3.5 flex flex-col relative cursor-pointer text-[var(--text-color)] no-underline h-full">
+ <Item
+ label={'Mapbox Globe'}
+ description={'A rotateable and zoomeable 3D Globe'}
>
- <path
- fill="currentcolor"
- d="M256 464c7.4 0 27-7.2 47.6-48.4c8.8-17.7 16.4-39.2 22-63.6H186.4c5.6 24.4 13.2 45.9 22 63.6C229 456.8 248.6 464 256 464zM178.5 304h155c1.6-15.3 2.5-31.4 2.5-48s-.9-32.7-2.5-48h-155c-1.6 15.3-2.5 31.4-2.5 48s.9 32.7 2.5 48zm7.9-144H325.6c-5.6-24.4-13.2-45.9-22-63.6C283 55.2 263.4 48 256 48s-27 7.2-47.6 48.4c-8.8 17.7-16.4 39.2-22 63.6zm195.3 48c1.5 15.5 2.2 31.6 2.2 48s-.8 32.5-2.2 48h76.7c3.6-15.4 5.6-31.5 5.6-48s-1.9-32.6-5.6-48H381.8zm58.8-48c-21.4-41.1-56.1-74.1-98.4-93.4c14.1 25.6 25.3 57.5 32.6 93.4h65.9zm-303.3 0c7.3-35.9 18.5-67.7 32.6-93.4c-42.3 19.3-77 52.3-98.4 93.4h65.9zM53.6 208c-3.6 15.4-5.6 31.5-5.6 48s1.9 32.6 5.6 48h76.7c-1.5-15.5-2.2-31.6-2.2-48s.8-32.5 2.2-48H53.6zM342.1 445.4c42.3-19.3 77-52.3 98.4-93.4H374.7c-7.3 35.9-18.5 67.7-32.6 93.4zm-172.2 0c-14.1-25.6-25.3-57.5-32.6-93.4H71.4c21.4 41.1 56.1 74.1 98.4 93.4zM256 512A256 256 0 1 1 256 0a256 256 0 1 1 0 512z"
- />
- </svg>
- </Item>
+ <svg
+ style={{height: 0.7 * 36, overflow: 'visible'}}
+ viewBox="0 0 512 512"
+ >
+ <path
+ fill="currentcolor"
+ d="M256 464c7.4 0 27-7.2 47.6-48.4c8.8-17.7 16.4-39.2 22-63.6H186.4c5.6 24.4 13.2 45.9 22 63.6C229 456.8 248.6 464 256 464zM178.5 304h155c1.6-15.3 2.5-31.4 2.5-48s-.9-32.7-2.5-48h-155c-1.6 15.3-2.5 31.4-2.5 48s.9 32.7 2.5 48zm7.9-144H325.6c-5.6-24.4-13.2-45.9-22-63.6C283 55.2 263.4 48 256 48s-27 7.2-47.6 48.4c-8.8 17.7-16.4 39.2-22 63.6zm195.3 48c1.5 15.5 2.2 31.6 2.2 48s-.8 32.5-2.2 48h76.7c3.6-15.4 5.6-31.5 5.6-48s-1.9-32.6-5.6-48H381.8zm58.8-48c-21.4-41.1-56.1-74.1-98.4-93.4c14.1 25.6 25.3 57.5 32.6 93.4h65.9zm-303.3 0c7.3-35.9 18.5-67.7 32.6-93.4c-42.3 19.3-77 52.3-98.4 93.4h65.9zM53.6 208c-3.6 15.4-5.6 31.5-5.6 48s1.9 32.6 5.6 48h76.7c-1.5-15.5-2.2-31.6-2.2-48s.8-32.5 2.2-48H53.6zM342.1 445.4c42.3-19.3 77-52.3 98.4-93.4H374.7c-7.3 35.9-18.5 67.7-32.6 93.4zm-172.2 0c-14.1-25.6-25.3-57.5-32.6-93.4H71.4c21.4 41.1 56.1 74.1 98.4 93.4zM256 512A256 256 0 1 1 256 0a256 256 0 1 1 0 512z"
+ />
+ </svg>
+ </Item>
+ </Card>
</a>
<a
key={'watercolor-map'}
- className={styles.item}
- style={outer}
+ className="no-underline"
href={`https://www.remotion.pro/watercolor-map`}
>
- <Item
- label={'Watercolor Map'}
- description={'A beautiful 2D map for travel videos'}
- >
- <SkiaIcon
- style={{
- height: 0.7 * 32,
- overflow: 'visible',
- }}
- />
- </Item>
+ <Card className="p-3.5 flex flex-col relative cursor-pointer text-[var(--text-color)] no-underline h-full">
+ <Item
+ label={'Watercolor Map'}
+ description={'A beautiful 2D map for travel videos'}
+ >
+ <SkiaIcon
+ style={{
+ height: 0.7 * 32,
+ overflow: 'visible',
+ }}
+ />
+ </Item>
+ </Card>
</a>
<a
key={'timeline'}
- className={styles.item}
- style={outer}
+ className="no-underline"
href={`https://www.remotion.pro/timeline`}
>
- <Item
- label={'<Timeline />'}
- description={
- 'A copy pasteable component for timeline-based editing'
- }
- >
- <TimelineIcon
- style={{
- height: 0.7 * 32,
- }}
- />
- </Item>
+ <Card className="p-3.5 flex flex-col relative cursor-pointer text-[var(--text-color)] no-underline h-full">
+ <Item
+ label={'<Timeline />'}
+ description={
+ 'A copy pasteable component for timeline-based editing'
+ }
+ >
+ <TimelineIcon
+ style={{
+ height: 0.7 * 32,
+ }}
+ />
+ </Item>
+ </Card>
</a>
</div>
<br />
- <p style={lowerpara}>
+ <p className="text-center text-gray-500">
{"Couldn't"} find what you need? Check out the list of{' '}
<a href={'/docs/resources'}>Resources</a>.
</p>