shibro
Show the version of “A character counter counts and never blocks the paste”

Advanced inputs · SU-318

A character counter counts and never blocks the paste

Flip between the version shibroUI flags and the one it ships. The marks and callouts show what changes.

  • Pasted text 7 characters dropped
  • Pasted text kept in full
  • Counter grey 280/280
  • Overflow tinted · 7 characters
  • Counter icon + red · 14px

What changes

Bad
A 287-character paste into maxlength="280": 7 characters vanish mid-sentence and the counter reads a calm grey 280/280.
Good
The whole paste is kept, the last 7 characters are tinted, and the border and a 14px counter turn red with an icon: You have 7 characters too many.

The rules

  • SU-318

    Character counters count and never block. Put a counter at the bottom right of the field in 14px muted text ("0/280" or "120 characters remaining"), shown from 75% of the limit when the limit is long. Never stop typing or paste with maxlength: over the limit, the counter turns to the error color with an icon and says "You have 7 characters too many", and the pasted text is kept.