<!-- textarea --><formclass="ui-form"><divclass="ui-form__group"><label><divclass="ui-form__label">...</div><divclass="ui-form__sublabel">...</div><divclass="ui-form__textarea-wrapper"><textareaclass="ui-textarea"placeholder="...">...</textarea></div></label></div></form><!-- textarea with error --><formclass="ui-form"><!-- if there is an error, dynamically (JS) add/remove the error modifier class "ui-form__group--error" here --><divclass="ui-form__group ui-form__group--error"><label><divclass="ui-form__label">...</div><divclass="ui-form__sublabel">...</div><divclass="ui-form__textarea-wrapper"><textareaclass="ui-textarea"placeholder="...">...</textarea></div><!-- warning/error message --><!-- this can be left empty or have text pre-populated (even if error is not currently active) --><!-- this element is ONLY displayed if the error modifier class is present (see above) --><divclass="ui-form__message">...</div></label></div></form>
Textarea with Counter
Default
Error
<!-- textarea with counter --><formclass="ui-form"><divclass="ui-form__group"><label><divclass="ui-form__label">...</div><divclass="ui-form__sublabel">...</div><divclass="ui-form__textarea-wrapper"><!-- extra modifier class when counter required --><!-- the HTML marlup and logic for character count is handled by Javascript --><textareaclass="ui-textarea ui-textarea--has-counter"placeholder="..."maxlength="200">...</textarea></div></label></div></form>
Textarea with File Download
Default
Textarea error
File attachment error
<!-- textarea with file download --><formclass="ui-form"><!-- this component consist of 2 adjacent "ui-form--group" with extra modifier classes --><!-- the textarea and file attachment have their own separate error state (see below) --><!-- the textarea group --><!-- adding the error class "ui-form__group--error" here would show the error message and make the border red --><divclass="ui-form__group ui-form__group--nested-textarea"><label><divclass="ui-form__label">...</div><divclass="ui-form__sublabel">...</div><divclass="ui-form__textarea-wrapper"><textareaclass="ui-textarea"placeholder="..."></textarea></div></label><!-- exceptionally for this component, the error message IS NOT added here (as it would for a normal textarea) --><!-- see below --></div><!-- the file attachment group --><!-- adding the error class "ui-form__group--error" here would show the file attachment error message --><divclass="ui-form__group ui-form__group--nested-file"><label><divclass="ui-form__file-wrapper"><divclass="ui-file"><inputtype="file"><divclass="ui-file__label">...</div><divclass="ui-file__cta">...<iclass="ui-icon ui-icon--attachment ui-icon--primary"></i></div></div><ulclass="ui-cloud"><liclass="ui-tag ui-tag--close">...<buttonclass="ui-tag__close"></button></li></ul></div><divclass="ui-form__message">...</div></label></div><!-- because the file download component sits between the textarea and the textarea error message, --><!-- the textarea error MUST be placed here, below the 2 components --><divclass="ui-form__message">...</div></form>
Textarea with Counter and File Download
Default
Textarea/File error
<!-- textarea with counter and file download --><formclass="ui-form"><divclass="ui-form__group ui-form__group--nested-textarea"><label><divclass="ui-form__label">...</div><divclass="ui-form__sublabel">...</div><divclass="ui-form__textarea-wrapper"><textareaclass="ui-textarea ui-textarea--has-counter"placeholder="..."maxlength="200"></textarea></div></label></div><divclass="ui-form__group ui-form__group--nested-file"><label><divclass="ui-form__file-wrapper"><divclass="ui-file"><inputtype="file"><divclass="ui-file__label">...</div><divclass="ui-file__cta">...<iclass="ui-icon ui-icon--attachment ui-icon--primary"></i></div></div><ulclass="ui-cloud"><liclass="ui-tag ui-tag--close">...<buttonclass="ui-tag__close"></button></li></ul></div><!-- error message for file attachment --><divclass="ui-form__message">...</div></label></div><!-- error message for textarea --><divclass="ui-form__message">...</div></form>