Velocity X Components

Forms

Textarea with Character Counter

Textarea with a live N/max counter that shifts to warning and error colour near the limit.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add textarea-character-counter

Built for astro.

Full docs for Textarea with Character Counter →

Needs a licence key — subscribe here, then velocityx loginonce.

astro v1.0.1
Textarea with Character Counter
0 / 240

Props

NameTypeRequiredDefaultDescription
namestringNo'bio'
labelstringNo'Short bio'
placeholderstringNo'Tell people a little about yourself…'
maxLengthnumberNo240
rowsnumberNo4
defaultValuestringNo''
helpTextstringNo
classNamestringNo''

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/textarea-character-counter/TextareaCharacterCounter.astro

Using the Textarea with Character Counter component

Install it with velocityx add textarea-character-counter. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from Forms.