Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:
import "@inera/ids-core/components/form/textarea/register"; // optional import "@inera/ids-core/components/form/error-message/register";
Wrap one label and textarea inside the ids-textarea component. Use ids-textarea with multi-line text input. For
single-line input use ids-input.
Note that
ids-textareaonly accepts onetextareaandlabeleach.
| Name | Description | Default | Control |
|---|---|---|---|
| Properties | |||
| autosize | Sets width to 100% and sets height depending on content | false | - |
| block | Sets display block on the wrapper | false | - |
| invalid | Reflects the validity of the textarea | false | - |
| light | Light version (white background) | false | - |
| novalidation | Prevents validation | false | - |
| slots | |||
| hint | For a hint | - | |
| tooltip | For a tooltip (ids-tooltip) | - | |
| events | |||
| onInvalid | Emitted when invalid becomes true | - | |
| onValid | Emitted when invalid becomes false | - | |
Can be used to visualize maximum length of a textarea.
If using the required property, validation is checked on blur and on form submit.
Validation can be turned off by supplying
novalidation.
Hint can be used to visualise maximum length of a textarea. Remember that maxlength will not tell the screen reader if the maxlength is reached. A potential fix would be to render:
<span slot="hint" class="hidden" aria-live="assertive" role="alert">Max antal tecken uppnådda.</span>
If maxlength is reached. Then remove it anytime textarea.value.lengh < maxlength.