Input

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.

React + Tailwind, shadcn-compatible: press “Copy for AI” and your Cursor or Claude Code agent installs it with the shadcn CLI.

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
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.

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.club/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…

How to use

<Label006
  label="Short description"
  limit={140}
  defaultValue="A pottery studio in the town centre."
/>

A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.

Settings

Label
label · default: Short description
Character limit
limit · default: 140
Accent
accent · default: theme colour
Surface
background · default: theme colour

FAQ

How do I add Counter Label with Cursor or Claude Code?
Press “Copy for AI” on this page and paste it into your agent's chat. The instruction contains the shadcn CLI install command, the dependencies and what to keep, so the agent installs this exact component instead of recreating a lookalike.
What does Counter Label depend on?
No npm packages beyond React and Tailwind CSS.
What can I change in Counter Label?
Adapt: 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. Keep as installed: the local --vibeui-label-006-* palette — do not swap it for your theme tokens; the absence of a hard maxLength: a silently truncated paste is someone's lost text; tabular figures on the counter — proportional ones jerk the right edge on every character.
Is Counter Label free?
Yes. The preview is open without an account; with a free account you can copy up to 20 components a month.

For developers

npx shadcn@latest add https://vibeui.club/r/pro/label-006.json

This command needs a signed link: sign in and open “Component source” below — it issues a working link valid for 30 minutes. All install options

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…