0.0.5 • Published 5 years ago

@citizensadvice/cads-form-textareas v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Form textareas

npm (scoped)

Component type

  • Component

Dependencies:

NameDescription
@citizensadvice/cads-supportSystem-wide global variables and functions
@citizensadvice/cads-interactive-blockMixins for handling interactive element (buttons, inputs)

Installation

$ npm install @citizensadvice/cads-form-textareas
@import "@citizensadvice/cads-form-textareas/index.scss";

You can also make use of the unpkg service, try adding the link below to the head of your HTML file <link src="https://unpkg.com/@citizensadvice/cads-form-textareas@latest/build/cads.form-textareas.css" />

Implementation

A textarea gives users a larger amount of space then just a single line text field to type their response. The height of your textarea will set expectations for the user on how much to enter. They may not know that the textarea can expand so make the height proportional to the amount of text to be entered.

<fieldset class="c-fieldset">
  <label class="c-label" for="message">Message:</label>
  <div class="c-textarea">
    <textarea id="message"></textarea>
  </div>
</fieldset>