Table of Contents | ||||
---|---|---|---|---|
|
Description
A text area is a multi-line text input control.
Used when the expected user input is long.
Usage & Behavior
General guidelines
Always provide a clear and meaningful label for any input field.
Where appropriate, help users by providing hint texts which describes the expected value of the field.
Text fields should indicate their state - enabled/disabled, empty/filled, valid/invalid.
Proactively guide users to prevent errors. Help them to identify and fix errors as they occur.
Provide an indicator when the field is required.
Structure
The text area consists of:
- Label - a meaningful label of what information the user needs to provide.
- Input Field (the input field can display a hint text).
States
Interaction
Text areas have a fixed height. A vertical scroll is added when the cursor reaches the bottom of the field.
If the input contains a hint text, it will be overwritten as soon as the user starts typing.
Validations and errors
Please refer to Field validation page for more information.
A text area with a warning will have an orange border and a warning icon, as displayed below:
A text area with an error will have a red border and an error icon, as displayed below:
The orange/red border will be removed when the content is updated to a valid.
Best practices
For short input, use the text field component.Table of Contents | ||||
---|---|---|---|---|
|
Description
Status | ||||||
---|---|---|---|---|---|---|
|
A text area is a multi-line text input control.
Used when the expected user input is long.
Usage & Behavior
General guidelines
Structure
The text area consists of:
- Label - a meaningful label of what information the user needs to provide.
- Input Field (the input field can display a hint text).
States
Interaction
Hover - hovering the text area will change the cursor to text cursor.
Focus -
focusing the text area will place the cursor at the focus position and the hint text will disappear.
Double clicking a word inside the text area will select that word.
Triple clicking the text area will select the whole text in the text area, if exists.
Focus out - If no text was inserted, the hint text will be displayed again when the field will lose focus.
If a character limit was set, reaching the limit will prevent the user from keeping typing.
Text areas have a fixed height. A vertical scroll is added when the cursor reaches the bottom of the field.
Validations and errors
Please refer to Field validation page for more information.
A text area with a warning will have an orange border and a warning icon, as displayed below:
A text area with an error will have a red border and an error icon, as displayed below:
The orange/red border will be removed when the content is updated to a valid.
Best practices
- For short input, use the text field component.
Always provide a clear and meaningful label for any input field.
Where appropriate, help users by providing hint texts which describes the expected value of the field.
Text areas should indicate their state - enabled/disabled, empty/filled, valid/invalid.
- Provide an indicator when the field is required.
Accessibility compliance
<<In general each component should be A11y complied, please follow the 3 guidelines linked below. At the very least we should document that each component is in compliance with each of the 3>>
Design
Current appearances in our products
WFM → Queue Analytics → Create Statistics View
New LUX design
Html macro | ||
---|---|---|
| ||
<link rel="stylesheet" href="https://ux.verint.com/fonts/css/verint_lux.css"> <link rel="stylesheet" href="https://ux.verint.com/bootstrap-4.0.0/dist/css/bootstrap.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://ux.verint.com/bootstrap-4.0.0/dist/js/bootstrap.bundle.js"></script> <script src="https://ux.verint.com/bootstrap-4.0.0/dist/other/accessibility.js"></script> <script src="https://ux.verint.com/bootstrap-4.0.0/dist/other/prism.min.js"></script> <link rel="stylesheet" href="https://ux.verint.com/bootstrap-4.0.0/dist/other/prism-coy.min.css"> <div class="card"> <div class="card-header">Text Area <button id="toggleMarkup" type="button" class="btn btn-sm btn-outline-primary btn btn-fixed-width float-right m-0" onclick="$('pre' ).toggle()">Toggle Markup</button></div> <div class="card-body"> <form> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm">Regular</label> <div class="col-lg-4"> <textarea class="form-control form-control-sm" placeholder="Guiding Text"></textarea> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><textarea class="form-control form-control-sm" placeholder="Guiding Text"></textarea></script></code></pre> </div> </div> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm"></label> <div class="col-lg-4"> <textarea class="form-control form-control-sm" placeholder="Guiding Text">Lorem ipsum dolor sit amet, id vis ubique cotidieque, ex malis commune mea. Stet explicari in ius, eu sanctus intellegat mea. Mazim atomorum his te, idque nihil percipit an cum.</textarea> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><textarea class="form-control form-control-sm" placeholder="Guiding Text">Lorem ipsum dolor sit amet, id vis ubique cotidieque, ex malis commune mea. Stet explicari in ius, eu sanctus intellegat mea. Mazim atomorum his te, idque nihil percipit an cum.</textarea></script></code></pre> </div> </div> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm">Disabled</label> <div class="col-lg-4"> <textarea class="form-control form-control-sm" placeholder="Guiding Text" disabled></textarea> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><textarea class="form-control form-control-sm" placeholder="Guiding Text" disabled></textarea></script></code></pre> </div> </div> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm"></label> <div class="col-lg-4"> <textarea class="form-control form-control-sm" placeholder="Guiding Text" disabled>Lorem ipsum dolor sit amet, id vis ubique cotidieque, ex malis commune mea. Stet explicari in ius, eu sanctus intellegat mea. Mazim atomorum his te, idque nihil percipit an cum.</textarea> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><textarea class="form-control form-control-sm" placeholder="Guiding Text" disabled>Lorem ipsum dolor sit amet, id vis ubique cotidieque, ex malis commune mea. Stet explicari in ius, eu sanctus intellegat mea. Mazim atomorum his te, idque nihil percipit an cum.</textarea></script></code></pre> </div> </div> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm">Read-Only</label> <div class="col-lg-4"> <textarea class="form-control form-control-sm" placeholder="Guiding Text" readonly></textarea> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><textarea class="form-control form-control-sm" placeholder="Guiding Text" readonly></textarea></script></code></pre> </div> </div> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm"></label> <div class="col-lg-4"> <textarea class="form-control form-control-sm" placeholder="Guiding Text" readonly>Lorem ipsum dolor sit amet, id vis ubique cotidieque, ex malis commune mea. Stet explicari in ius, eu sanctus intellegat mea. Mazim atomorum his te, idque nihil percipit an cum.</textarea> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><textarea class="form-control form-control-sm" placeholder="Guiding Text" readonly>Lorem ipsum dolor sit amet, id vis ubique cotidieque, ex malis commune mea. Stet explicari in ius, eu sanctus intellegat mea. Mazim atomorum his te, idque nihil percipit an cum.</textarea></script></code></pre> </div> </div> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm">Error</label> <div class="col-lg-4"> <textarea class="form-control form-control-sm is-invalid" placeholder="Guiding Text" value="Filled Text" data-toggle="tooltip" data-custom-class="input-error" data-placement="right" title="There is an Error on the Text Area"></textarea> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><textarea class="form-control form-control-sm is-invalid" placeholder="Guiding Text"></textarea></script></code></pre> </div> </div> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm"></label> <div class="col-lg-4"> <textarea class="form-control form-control-sm is-invalid" placeholder="Guiding Text" value="Filled Text" data-toggle="tooltip" data-custom-class="input-error" data-placement="right" title="There is an Error on the Text Area">Lorem ipsum dolor sit amet, id vis ubique cotidieque, ex malis commune mea. Stet explicari in ius, eu sanctus intellegat mea. Mazim atomorum his te, idque nihil percipit an cum.</textarea> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><textarea class="form-control form-control-sm is-invalid" placeholder="Guiding Text">Lorem ipsum dolor sit amet, id vis ubique cotidieque, ex malis commune mea. Stet explicari in ius, eu sanctus intellegat mea. Mazim atomorum his te, idque nihil percipit an cum.</textarea></script></code></pre> </div> </div> </form> </div> </div> |
...