Skip to content

🎥 Make videos programmatically with React

Add <Input /> to design system

JonnyBurger3fee3c270f2b
diff --git a/packages/design/src/Input.tsx b/packages/design/src/Input.tsx
new file mode 100644
index 0000000000..f61ebe2d60
--- /dev/null
+++ b/packages/design/src/Input.tsx
@@ -0,0 +1,21 @@
+import React from 'react';
+import {cn} from './helpers/cn';
+
+type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
+
+export const Input = React.forwardRef<HTMLInputElement, InputProps>(
+ ({className, ...props}, ref) => {
+ return (
+ <input
+ ref={ref}
+ className={cn(
+ 'w-full dark:bg-[#121212] md:max-w-[400px] rounded-lg border-effect border-black outline-none h-14 px-3 fontbrand text-lg box-border',
+ className,
+ )}
+ {...props}
+ />
+ );
+ },
+);
+
+Input.displayName = 'Input';
diff --git a/packages/design/src/index.ts b/packages/design/src/index.ts
index 4071cdcd0c..621e1127c2 100644
--- a/packages/design/src/index.ts
+++ b/packages/design/src/index.ts
@@ -2,6 +2,7 @@ export {Button} from './Button';
export {Card} from './Card';
export {CheckIcon} from './CheckIcon';
export {Counter} from './Counter';
+export {Input} from './Input';
export {PlanePaperIcon} from './PaperPlaneIcon';
export {
Select,
diff --git a/packages/promo-pages/src/components/homepage/NewsletterButton.tsx b/packages/promo-pages/src/components/homepage/NewsletterButton.tsx
index 55a4f16299..b3dfff431c 100644
--- a/packages/promo-pages/src/components/homepage/NewsletterButton.tsx
+++ b/packages/promo-pages/src/components/homepage/NewsletterButton.tsx
@@ -1,4 +1,4 @@
-import {Button, CheckIcon, PlanePaperIcon} from '@remotion/design';
+import {Button, CheckIcon, Input, PlanePaperIcon} from '@remotion/design';
import React, {useCallback, useState} from 'react';
import {SectionTitle} from './VideoAppsTitle';
@@ -57,7 +57,7 @@ export const NewsletterButton: React.FC<{}> = () => {
Remotion once in a while.{' '}
</div>
<div className="flex flex-col md:flex-row gap-2 justify-center">
- <input
+ <Input
className="w-full dark:bg-[#121212] md:max-w-[400px] rounded-lg border-effect border-black outline-none h-14 px-3 fontbrand text-lg box-border"
disabled={submitting}
value={email}