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-wc-textarea component. Use ids-wc-textarea with multi-line text input.
For single-line input use ids-input.
Note that
ids-wc-textareaonly accepts onetextareaandlabeleach.
| Name | Description | Default | Control |
|---|---|---|---|
| Textarea | |||
| 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 | Runs when invalid becomes true | - | |
| onValid | Runs 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.
Remember that maxlength will not tell the screen reader if the maxlength is reached. A potential fix is to render a span
with correct aria-labels, and remove it when maxlength is reached.
<span slot="hint" class="hidden" aria-live="assertive" role="alert">Max antal tecken uppnådda.</span>