Skip to the page
TACTILE UI

Kit part · Text areas

Text area

Longer text in a deeper recess: notes, messages, descriptions. It grows by its corner handle.

Element
<textarea>
Needs
kit.css
Rules
field.rules.md · 5
Finishes
Aluminium · Graphite · Porcelain · Black
Volumes
Tactile · Quiet
On this page
  1. Variants
  2. Every state, at once
  3. API
  4. Markup
  5. Accessibility
  6. How it’s built
  7. Rules
  8. Related parts
01

Variants

Empty, with an example
With a count hint
02

Every state, at once

Both finishes, side by side. Hover, pressed and focus are forced with .is-hover, .is-down and .is-focus; checked and disabled are real.

Aluminium

PartRestFocusFilledError
Text area

Graphite

PartRestFocusFilledError
Text area
03

API

NameKindValuesWhat it does
.tui-textareaclasson <textarea>The recess: 96px minimum, 12px inside, 1.5 line height, resizes vertically.
rows · maxlengthattribute—Native. Say the limit in a hint as well.
data-errorattributeon .tui-fieldRed hairline and red hint.
input · changeevent—Native.
04

Markup

<label class="tui-field">
  <span class="tui-label">Notes</span>
  <textarea class="tui-textarea" placeholder="What changed in this take"></textarea>
</label>

Needs kit.css only, no script. How to install the kit.

05

Accessibility

  • Name it with the wrapping label; tie any hint to it with aria-describedby.
  • If there is a length limit, print how much is left in the hint as people type.
06

How it’s built

A native <textarea> in the field recess, with its height freed (min-height: 96px, resize: vertical) and padding on every side, so text never touches the walls.

07

Rules

field.rules.mdIn the brain

A placeholder is an example of what goes here, never the label.

5 rules in this file, with the foundations they rest on and the anti-patterns that break them. Full rules ship in the brain with the Pass.

08

Field

Text entry in a recess, the label printed above it, and a hint that says how to fix an error.

Select

A choice from a longer list, in the same recess as a field, with a printed chevron. The browser’s own menu opens it.

Combo

One field with its one action in a shared well: subscribe, search, add.

Docs
Finish
Volume