← All Components

CharacterCounter

Utilities

Live character count display with configurable limit and warning threshold.

Live Demo

Animates to 42: 0
Animates to 850 with prefix: $ 0
Animates to 1000 with suffix: 0 users

Usage

<script>
  import { CharacterCounter } from "jatui"
</script>

<CharacterCounter />

Props

PropTypeDefaultDescription
currentnumber0Current character count
maxnumber-Maximum characters
warningThresholdnumber0.8Warning at this % of max