🎥 Make videos programmatically with React
signal typescript support
Jonny Burger62917d16f6e7
diff --git a/packages/docs/components/TailwindSupport.tsx b/packages/docs/components/TailwindSupport.tsxnew file mode 100644index 0000000000..52610ee907--- /dev/null+++ b/packages/docs/components/TailwindSupport.tsx@@ -0,0 +1,18 @@+import {CreateVideoInternals} from 'create-video';+import React from 'react';++export const TailwindSupport: React.FC = () => {+ const supportedTailwind = CreateVideoInternals.FEATURED_TEMPLATES.filter(+ (t) => t.allowEnableTailwind,+ );++ return (+ <ul>+ {supportedTailwind.map((t) => (+ <li key={t.shortName}>+ <a href={`/templates/${t.cliId}`}>{t.shortName}</a>+ </li>+ ))}+ </ul>+ );+};diff --git a/packages/docs/docs/tailwind.mdx b/packages/docs/docs/tailwind.mdxindex 091edbc48e..1d3aa64e9e 100644--- a/packages/docs/docs/tailwind.mdx+++ b/packages/docs/docs/tailwind.mdx@@ -2,15 +2,16 @@image: /generated/articles-docs-tailwind.pngid: tailwindtitle: TailwindCSS-crumb: "text-lg font-bold"+crumb: 'text-lg font-bold'----import Tabs from "@theme/Tabs";+import Tabs from '@theme/Tabs';import TabItem from '@theme/TabItem';+import {TailwindSupport} from '../components/TailwindSupport';-## Using the template+## Using the CLI-The easiest way to get started with Tailwind and Remotion is to [use the template by cloning it on GitHub](https://github.com/remotion-dev/template-tailwind) or running the following:+The easiest way to get started with Tailwind is by scaffolding a new video using the CLI and selecting a template that supports adding Tailwind automatically.<TabsdefaultValue="npm"@@ -24,34 +25,36 @@ values={[<TabItem value="npm">```bash-npx create-video --tailwind+npx create-video@latest```</TabItem><TabItem value="pnpm">```bash-pnpm create video --tailwind+pnpm create video```</TabItem><TabItem value="bun">```bash-bun create video --tailwind+bun create video```</TabItem><TabItem value="yarn">```bash-yarn create video -- --tailwind+yarn create video```</TabItem></Tabs>+The following templates support scaffolding with TailwindCSS: <TailwindSupport />+## Install in existing project_from v3.3.95, see [instructions for older versions](https://github.com/remotion-dev/remotion/blob/88a5d8d17f50d6ab2b8a408556118d15a3686343/packages/docs/docs/tailwind.md)_@@ -93,8 +96,8 @@ pnpm i -D @remotion/tailwind2. Add the Webpack override from `@remotion/tailwind` to your config file:```ts twoslash title="remotion.config.ts"-import { Config } from "@remotion/cli/config";-import { enableTailwind } from "@remotion/tailwind";+import {Config} from '@remotion/cli/config';+import {enableTailwind} from '@remotion/tailwind';Config.overrideWebpackConfig((currentConfiguration) => {return enableTailwind(currentConfiguration);@@ -118,7 +121,7 @@ Prior to `v3.3.39`, the option was called `Config.Bundling.overrideWebpackConfig5. Import the stylesheet in your `src/Root.tsx` file. Add to the top of the file:```js title="src/Root.tsx"-import "./style.css";+import './style.css';```6. Add a `tailwind.config.js` file to the root of your project:@@ -126,7 +129,7 @@ import "./style.css";```js title="tailwind.config.js"/* eslint-env node */module.exports = {- content: ["./src/**/*.{ts,tsx}"],+ content: ['./src/**/*.{ts,tsx}'],theme: {extend: {},},diff --git a/packages/docs/src/components/TemplateModalContent.tsx b/packages/docs/src/components/TemplateModalContent.tsxindex 4a56d674b0..f912e06914 100644--- a/packages/docs/src/components/TemplateModalContent.tsx+++ b/packages/docs/src/components/TemplateModalContent.tsx@@ -5,6 +5,7 @@ import {BackButton} from './BackButton';import {CommandCopyButton} from './CommandCopyButton';import {MuxVideo} from './MuxVideo';import {Spinner} from './Spinner';+import {Tailwind} from './icons/tailwind';const RESERVED_FOR_SIDEBAR = 550;@@ -356,6 +357,14 @@ export const TemplateModalContent: React.FC<{</span></div></a>+ {template.allowEnableTailwind ? (+ <div style={githubrow}>+ <div style={iconContainer}>+ <Tailwind />+ </div>+ Supports Tailwind+ </div>+ ) : null}</div></div>{' '}<br />