Kinetic Textarea

A multi-line field that grows with what you type and shows a live character counter with a progress bar when maxlength is set.

  • <kt-kinetic-textarea>
  • Inputs
  • No framework

Kinetic Textarea

The code

Copy the Kinetic Textarea

Fastest: press Copy on the card above for one complete file. To build it into your own project, use the files below: the markup, the styles, this component’s script and the shared effects script (effects.js) that every component uses.

<kt-kinetic-textarea label="Release notes" maxlength="280" placeholder="What changed in this build?" value="Fixed the checkout crash on Safari and cut cold start time by a third."></kt-kinetic-textarea>

<kt-kinetic-textarea label="Feedback" rows="2" maxrows="6" helper="Markdown is not supported yet."></kt-kinetic-textarea>

<kt-kinetic-textarea label="Internal note" value="Locked by the billing team." disabled></kt-kinetic-textarea>

Attributes

NameWhat it doesDefault
labelLabel above the text.—
valueCurrent text. Kept in sync as the visitor types.—
placeholderHint shown while the field is empty.—
helperSmall text at the bottom left.—
maxlengthCharacter limit. Turns on the counter and the progress bar.—
rowsMinimum height in lines.3
maxrowsHeight in lines at which the field stops growing and scrolls.8
disabledPresent when the field cannot be used.—
readonlyPresent when the text can be read and copied but not edited.—
nameName of the inner textarea, for forms.—
sfxSound-effect text when typing hits the limit.ビシッ!

Keyboard and screen readers

  • A real textarea with a label tied to it; helper text is linked with aria-describedby.
  • The visible counter is hidden from screen readers; a polite status announces only when 10% remains and when the limit is reached, not on every key.
  • The browser enforces maxlength, so the limit also applies to paste.
  • Fires input and change events with the text and its length in detail.

Styling variables

Every look is a CSS variable: --kt-accent, --kt-accent-ink, --kt-radius-btn, --kt-surface-radius, --kt-surface-bg, --kt-border-w, --kt-comp-shadow and --font-sans. The copied file sets them all from your choices.

FAQ

Kinetic Textarea: questions answered

How do I use the Kinetic Textarea?

Press Copy on the card to get a complete HTML file, or copy the HTML, CSS and JavaScript tabs into your own page. In your markup the element is written as <kt-kinetic-textarea>.

Which attributes does <kt-kinetic-textarea> accept?

label, value, placeholder, helper, maxlength, rows, maxrows, disabled, readonly, name, sfx. Each one is described in the attributes table on this page.

Is the Kinetic Textarea accessible?

A real textarea with a label tied to it; helper text is linked with aria-describedby. The visible counter is hidden from screen readers; a polite status announces only when 10% remains and when the limit is reached, not on every key. The browser enforces maxlength, so the limit also applies to paste. Fires input and change events with the text and its length in detail.

Can I change the Kinetic Textarea colors, corners and font?

Yes. Use the options on this page: accent color, border radius, background, border, shadow and Google font. The copied code already contains your choices, and every one of them is a CSS variable you can edit later.