You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defaultValue="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
29
+
optional
30
+
resizable
31
+
rows={4}
32
+
/>
33
+
<Textarea
34
+
id="3"
35
+
name="error"
36
+
label="This component in error state and it has a very long text"
37
+
placeholder="Placeholder"
38
+
maxCharacters={100}
39
+
theme="danger"
40
+
defaultValue="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
41
+
error="Error message"
42
+
optional
43
+
rows={4}
44
+
/>
45
+
<Textarea
46
+
id="4"
47
+
name="disabled"
48
+
label="Disabled"
49
+
placeholder="Placeholder"
50
+
maxCharacters={100}
51
+
defaultValue="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
52
+
caption="Caption text"
53
+
optional
54
+
rows={4}
55
+
disabled
56
+
/>
57
+
</div>`}
20
58
/>
21
59
22
60
## Usage
@@ -44,21 +82,6 @@ the value changes. When uncontrolled, the `Textarea` will use the `defaultValue`
44
82
its initial value and will call `onChange` when its value changes. The `Textarea` also supports
45
83
all attributes of the `textarea` HTML element.
46
84
47
-
```typescript jsx
48
-
<Textarea
49
-
name="textarea-name"// [OPTIONAL] name of the textarea
50
-
id="textarea-id"// [OPTIONAL] id of the textarea
51
-
value="Textarea value"// [OPTIONAL] value of the textarea
52
-
onChange={handleChange} // [OPTIONAL] callback to call when the value changes
53
-
label="Textarea label"// [OPTIONAL] label for the textarea
54
-
caption="Textarea caption"// [OPTIONAL] caption to describe the textarea
55
-
error="Error message"// [OPTIONAL] error message to display below
56
-
optional// [OPTIONAL] indicate if the textarea is optional
57
-
resizable// [OPTIONAL] indicate if the textarea should be resizable
58
-
disabled// [OPTIONAL] indicate if the textarea is disabled
'FormTextarea must be used within a FormProvider context through FormWrapper. Use the standalone Textarea component if form integration is not required.'
0 commit comments