diff --git a/apps/website/pages/components/textarea/code.tsx b/apps/website/pages/components/textarea/code.tsx
new file mode 100644
index 0000000000..2347321b98
--- /dev/null
+++ b/apps/website/pages/components/textarea/code.tsx
@@ -0,0 +1,17 @@
+import Head from "next/head";
+import type { ReactElement } from "react";
+import TextareaPageLayout from "screens/components/textarea/TextareaPageLayout";
+import TextareaCodePage from "screens/components/textarea/code/TextareaCodePage";
+
+const Code = () => (
+ <>
+
+
- | defaultValue |
+ ariaLabel |
string
|
- Initial value of the textarea, only when it is uncontrolled. |
- - |
+
+ Specifies a string to be used as the name for the textarea element when no label is provided.
+ |
+ 'Text area' |
- | value |
+ autocomplete |
string
|
- Value of the textarea. If undefined, the component will be uncontrolled and the value will be managed
- internally.
+ HTML autocomplete attribute. Lets the user specify if any permission the user agent has to
+ provide automated assistance in filling out the input value. Its value must be one of all the possible
+ values of the HTML autocomplete attribute. See{" "}
+ MDN{" "}
+ for further information.
+ |
+
+ 'off'
|
- - |
- | label |
+ defaultValue |
string
|
- Text to be placed above the textarea. |
+ Initial value of the textarea, only when it is uncontrolled. |
- |
- | name |
+ disabled |
+
+ boolean
+ |
+ If true, the component will be disabled. |
+
+ false
+ |
+
+
+ | error |
string
|
- Name attribute of the textarea element. |
+
+ If it is a defined value and also a truthy string, the component will change its appearance, showing the
+ error below the textarea. If the defined value is an empty string, it will reserve a space below the
+ component for a future error, but it would not change its look. In case of being undefined or null, both
+ the appearance and the space for the error message would not be modified.
+ |
- |
@@ -67,79 +89,71 @@ const sections = [
| - |
- | placeholder |
+ label |
string
|
- Text to be put as placeholder of the textarea. |
+ Text to be placed above the textarea. |
- |
- | disabled |
+ margin |
- boolean
+ 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | Margin
|
- If true, the component will be disabled. |
- false
+ Size of the margin to be applied to the component. You can pass an object with 'top', 'bottom', 'left' and
+ 'right' properties in order to specify different margin sizes.
|
+ - |
- | optional |
-
- boolean
- |
+ maxLength |
- If true, the textarea will be optional, showing '(Optional)' next to the label. Otherwise, the field will
- be considered required and an error will be passed as a parameter to the onBlur and{" "}
- onChange functions when it has not been filled.
+ number
|
- false
+ Specifies the maximum length allowed by the textarea. This will be checked both when the input element
+ loses the focus and while typing within it. If the string entered does not comply the maximum length, the{" "}
+ onBlur and onChange functions will be called with the current value and an
+ internal error informing that the value length does not comply the specified range. If a valid length is
+ reached, the error parameter of both events will not be defined.
|
+ - |
- | readOnly |
+ minLength |
- boolean
+ number
|
- If true, the component will not be mutable, meaning the user can not edit the control. |
- false
+ Specifies the minimum length allowed by the textarea. This will be checked both when the input element
+ loses the focus and while typing within it. If the string entered does not comply the minimum length, the{" "}
+ onBlur and onChange functions will be called with the current value and an
+ internal error informing that the value length does not comply the specified range. If a valid length is
+ reached, the error parameter of both events will not be defined.
|
+ - |
- | verticalGrow |
-
- 'auto' | 'manual' | 'none'
- |
-
- Defines the textarea's ability to resize vertically. It can be:
-
- -
- 'auto': The textarea grows or shrinks automatically in order to fit the content.
-
- -
- 'manual': The height of the textarea is enabled to be manually modified.
-
- -
- 'none': The textarea has a fixed height and can't be modified.
-
-
- |
+ name |
- 'auto'
+ string
|
+ Name attribute of the textarea element. |
+ - |
- | rows |
+ onBlur |
- number
+ {"(val: { value: string; error?: string }) => void"}
|
- Number of rows of the textarea. |
- 4
+ This function will be called when the textarea loses the focus. An object including the textarea value and
+ the error (if the value entered is not valid) will be passed to this function. If there is no error,{" "}
+ error will not be defined.
|
+ - |
| onChange |
@@ -154,29 +168,18 @@ const sections = [
- |
- | onBlur |
-
- {"(val: { value: string; error?: string }) => void"}
- |
+ optional |
- This function will be called when the textarea loses the focus. An object including the textarea value and
- the error (if the value entered is not valid) will be passed to this function. If there is no error,{" "}
- error will not be defined.
+ boolean
|
- - |
-
-
- | error |
- string
+ If true, the textarea will be optional, showing '(Optional)' next to the label. Otherwise, the field will
+ be considered required and an error will be passed as a parameter to the onBlur and{" "}
+ onChange functions when it has not been filled.
|
- If it is a defined value and also a truthy string, the component will change its appearance, showing the
- error below the textarea. If the defined value is an empty string, it will reserve a space below the
- component for a future error, but it would not change its look. In case of being undefined or null, both
- the appearance and the space for the error message would not be modified.
+ false
|
- - |
| pattern |
@@ -193,59 +196,40 @@ const sections = [
- |
- | minLength |
-
- number
- |
+ placeholder |
- Specifies the minimum length allowed by the textarea. This will be checked both when the input element
- loses the focus and while typing within it. If the string entered does not comply the minimum length, the{" "}
- onBlur and onChange functions will be called with the current value and an
- internal error informing that the value length does not comply the specified range. If a valid length is
- reached, the error parameter of both events will not be defined.
+ string
|
+ Text to be put as placeholder of the textarea. |
- |
- | maxLength |
+ readOnly |
- number
+ boolean
|
+ If true, the component will not be mutable, meaning the user can not edit the control. |
- Specifies the maximum length allowed by the textarea. This will be checked both when the input element
- loses the focus and while typing within it. If the string entered does not comply the maximum length, the{" "}
- onBlur and onChange functions will be called with the current value and an
- internal error informing that the value length does not comply the specified range. If a valid length is
- reached, the error parameter of both events will not be defined.
+ false
|
- - |
- | autocomplete |
-
- string
- |
-
- HTML autocomplete attribute. Lets the user specify if any permission the user agent has to
- provide automated assistance in filling out the input value. Its value must be one of all the possible
- values of the HTML autocomplete attribute. See{" "}
- MDN{" "}
- for further information.
- |
+ ref |
- 'off'
+ {"React.Ref"}
|
+ Reference to the component. |
+ - |
- | margin |
+ rows |
- 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | Margin
+ number
|
+ Number of rows of the textarea. |
- Size of the margin to be applied to the component. You can pass an object with 'top', 'bottom', 'left' and
- 'right' properties in order to specify different margin sizes.
+ 4
|
- - |
| size |
@@ -270,22 +254,38 @@ const sections = [
- | ref |
+ value |
- {"React.Ref"}
+ string
+ |
+
+ Value of the textarea. If undefined, the component will be uncontrolled and the value will be managed
+ internally.
|
- Reference to the component. |
- |
- | ariaLabel |
+ verticalGrow |
- string
+ 'auto' | 'manual' | 'none'
|
- Specifies a string to be used as the name for the textarea element when no label is provided.
+ Defines the textarea's ability to resize vertically. It can be:
+
+ -
+ 'auto': The textarea grows or shrinks automatically in order to fit the content.
+
+ -
+ 'manual': The height of the textarea is enabled to be manually modified.
+
+ -
+ 'none': The textarea has a fixed height and can't be modified.
+
+
+ |
+
+ 'auto'
|
- 'Text area' |
@@ -310,15 +310,13 @@ const sections = [
},
];
-const TextareaCodePage = () => {
- return (
-