Label

Counter Label

A label with a character counter on the right edge of the line: the limit is visible before typing starts, and going over is highlighted without truncating pasted text.

What you can change

  • the field name through label, the threshold through limit and the starting text through defaultValue
  • the live messages through overText and nearText — {count} takes the number
  • the focus color through accent

A link for your AI agent: preview, code and instructions.

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.
AI
1Pick it here

put this on the home page as the hero:

https://vibeui.ru/c/label-006?lang=en&theme=dark

2Paste into the chat
3Get it in your project

Not sure where to paste it? Step-by-step guide

Show the full instructions

What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.

Loading…

For developers

The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.

Technical notes

A client component: the field value is held by useState, and the remaining count is computed from it. One file, no dependencies, a palette in local variables --vibeui-label-006-*. The counter stands in the label row rather than under the field: the limit is visible before a person has started typing. The counter state is expressed by the data-state attribute (ok/near/over), and the colours hang on it — there are no separate classes. The field deliberately has no hard maxLength: text pasted from the clipboard is not truncated silently, instead the field gets aria-invalid and the counter turns red. The figures are set in tabular numerals (font-variant-numeric:tabular-nums), so the right edge does not jitter while typing. The live message is turned on only near the limit: announcing every character is noise that makes people turn the screen reader off. The palette is built on light-dark(): the block follows the surrounding color-scheme, there is no surface by default, and it appears only through the background prop.

Tags

  • label
  • counter
  • textarea
  • limit
Component source

The same file your agent installs. Here in case you would rather copy it by hand.

Loading…