Skip to content

🎥 Make videos programmatically with React

Adding documentation

CruuzAzul104211449185
diff --git a/packages/docs/components/TableOfContents/zod-types.tsx b/packages/docs/components/TableOfContents/zod-types.tsx
index 94cc87dc9c..7022eea1d6 100644
--- a/packages/docs/components/TableOfContents/zod-types.tsx
+++ b/packages/docs/components/TableOfContents/zod-types.tsx
@@ -10,6 +10,10 @@ export const TableOfContents: React.FC = () => {
<strong>{"zColor()"}</strong>
<div>A Zod Type for colors</div>
</TOCItem>
+ <TOCItem link="/docs/zod-types/z-textarea">
+ <strong>{"zTextarea()"}</strong>
+ <div>A Zod Type for multiple-line text in a textarea</div>
+ </TOCItem>
</Grid>
</div>
);
diff --git a/packages/docs/docs/zod-types/z-textarea.md b/packages/docs/docs/zod-types/z-textarea.md
new file mode 100644
index 0000000000..4e74000552
--- /dev/null
+++ b/packages/docs/docs/zod-types/z-textarea.md
@@ -0,0 +1,19 @@
+---
+image: /generated/articles-docs-zod-types-z-textarea.png
+title: zTextarea()
+---
+
+Using `zTextarea()`, you can specify in your [schema](/docs/schemas) a string must be a textarea in order to have
+several lines.
+
+In the Remotion Studio, a textarea will be displayed allowing to change the value to have several lines or long text.
+
+:::tip
+When using `zTextarea()`, the value will be a string, even if the user enters several lines. To display the value in a
+component without losing the line breaks, you can use the `white-space: pre-line` CSS property on the element
+displaying the value.
+:::
+
+## See also
+
+- [Defining a schema for your props](/docs/schemas)
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index 2f98b22f9f..6b4eddcd42 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -395,7 +395,7 @@ module.exports = {
type: "doc",
id: "zod-types/index",
},
- items: ["zod-types/z-color"],
+ items: ["zod-types/z-color", "zod-types/z-textarea"],
},
],
mainSidebar: [