Carregando…
Carregando…
Carregando…Textarea with live word / char / sentence / read-time counters and limit bar.
$ npx kikitocn add word-counterimport { WordCounter } from "@/components/ui/cn/word-counter/WordCounter";
export function WordCounterExample() {
return (
<WordCounter />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
value | string | — | Valor controlado |
defaultValue | string | — | Valor padrão não-controlado |
onChange | (value: string) => void | — | Callback ao alterar o texto |
maxWords | number | — | Limite de palavras |
maxChars | number | — | Limite de caracteres |
rows | number | 4 | Linhas visíveis do textarea |
placeholder | string | — | Placeholder do textarea |
label | string | — | Label do campo |
showSentences | boolean | false | Exibir contagem de frases |
showReadTime | boolean | false | Exibir tempo de leitura estimado |
className | string | — | Classes CSS extras |
Uncontrolled — word + char limit
No limit — sentence and read-time only