Forms
ITextarea
A multi-line field, with the same sizes and states as IInput.
The model is a string, and rows sets the starting height when you are not using autosize.
Autosize
autosize grows the field with its content instead of scrolling it.
Pass an object to bound the growth. min and max are counted in rows.
Sizes
States
Inside an IFormField, invalid is set for you from the validation state.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'md' | Control scale |
rows | number | — | Starting height, when not autosizing |
autosize | boolean | { min?, max? } | false | Grow with the content, optionally bounded in rows |
placeholder | string | — | Placeholder text |
disabled | boolean | false | Disables the field |
required | boolean | false | Marks it required |
invalid | boolean | — | Error styling; set automatically inside IFormField |
id | string | generated | Useful when an external ILabel targets it |
unstyled | boolean | — | Drop built-in classes |
class | string | — | Merged with the built-in classes |
For a single line use IInput; for a number, INumberInput.