A simple React application for analyzing text. It provides live statistics on characters, words, sentences, paragraphs, and estimated reading time.
- Live analysis: Updates statistics in real time as you type.
- Counts: Characters, words, sentences, paragraphs.
- Estimated reading time: Based on average words per minute.
- Responsive & clean UI.
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open in your browser:
Go to http://localhost:5173 (or the port shown in your terminal). - Type in the textarea
See character, word, sentence, paragraph, and reading time statistics update live.
src/components/WordCounter.tsx
The main UI component that provides the textarea and displays all statistics.src/utils/textAnalysis.ts
Provides the functions for counting characters, words, sentences, and paragraphs, and estimating reading time.src/App.tsx
Root application component that includes app layout and footer.
- Reading Speed:
You can change the default reading speed (words per minute) intextAnalysis.ts:calculateReadingTime(wordCount: number, wordsPerMinute: number = 200): number
- Styling:
Modify styles insrc/components/WordCounter.cssorsrc/App.cssto change the look and feel.
- hosu-kim
MIT