Reading Level

Reading Level is a copy-paste React component that stops copy harder to read than its audience needs before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/reading-level
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsCopy harder to read than its audience needs

Was this component page useful?

How do I install Reading Level?

pnpm dlx shadcn@latest add @bollard/reading-level

The files land in your project. They're yours to edit.

How do I use Reading Level in React?

reading-level-usage.tsx
import { ReadingLevel } from "@/components/ui/reading-level"

return <ReadingLevel label="Refund email" defaultValue={NOTICE} targetGrade={8} />

What input mistakes does Reading Level catch?

  • Grade above the target you set (default 8)
  • Sentences that are both long and dense, tinted in place
  • Wordy words and phrases with a plainer swap
  • Non-English text, where it shows a notice instead of a grade

What props does Reading Level accept?

ReadingLevel props
PropTypeDefault
label

Visible label.

string"Text"
value

Text (controlled).

string—
defaultValue

Starting text when uncontrolled.

string""
onValueChange

Called with the new text on every edit or swap.

(value: string) => void—
targetGrade

US school grade to aim for. 8 suits most public writing.

number8
swaps

Wordy word → plain swap.

Record<string, string>PLAIN_WORDS
maxSentences

How many of the hardest sentences to list.

number3
bands

Plain-English band labels per grade range. Override to translate.

typeof READING_BANDSREADING_BANDS
gradeText

`{grade}` is filled in.

string"Grade {grade}"
targetText

`{target}` is filled in.

string"aim for {target} or lower"
hardTitle

Heading above the list of hardest sentences.

string"Hardest sentences"
longText

`{words}` is filled in.

string"{words} words. Try splitting it."
denseText

Reason shown for a sentence that is dense rather than just long.

string"Lots of long words."
swapsTitle

Heading above the plain-word swaps.

string"Plainer words"
swapLabel

Accessible label of a swap. `{word}` and `{plain}` are filled in.

string"Replace “{word}” with “{plain}”"
aboveTargetText

Announced when the grade is above the target.

string"Harder than your target."
onTargetText

Announced when the grade is at or below the target.

string"Within your target."
unsupportedText

Shown instead of a grade when the text isn't English (Hindi, Marathi, French...), where the formula means nothing.

string"Readability grade is English-only"
unsupportedHint

Second line of the unsupported state.

string"This text looks like another language, so no grade is sh…

* required. Also accepts the native props of <textarea> (className, aria-*, data-*…), passed through to it.

How is Reading Level accessible?

  • Visible <label> tied to the textarea, with the grade wired via aria-describedby
  • On/above-target status announced through a polite sr-only live region
  • Each swap button has an aria-label naming the word and its replacement
  • After a swap, focus moves to the next swap button (or back to the field)
  • The tinted backdrop is aria-hidden; sentence difficulty also shown as text

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Syllables are estimated from vowel groups (roughly ±10%), so grades are approximate
  • Flesch-Kincaid is an English-only formula and ignores meaning, layout and audience
  • The swap list is a starter set; it will miss domain jargon

What expensive mistakes does Reading Level stop?

Copy harder to read than its audience needs

Also known as

readability · plain language · flesch-kincaid · writing assistant · content editor · cms · copywriting · grammarly

Field type

What dependencies does Reading Level require?

Reading Level facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameReading Level
Registry identifier@bollard/reading-level
Install commandnpx shadcn@latest add @bollard/reading-level
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Reading Level

What form validation mistake does Reading Level catch?

Reading Level prevents copy harder to read than its audience needs. Flags copy that reads above its audience's grade level and points at the sentences and wordy phrases that cause it. Catches: Grade above the target you set (default 8), Sentences that are both long and dense, tinted in place, Wordy words and phrases with a plainer swap, Non-English text, where it shows a notice instead of a grade. Limitation: validate reading-level schemas on backend.

How do I install reading-level with shadcn?

Run `npx shadcn@latest add @bollard/reading-level`. Sources added: registry/default/reading-level/readability.ts, registry/default/reading-level/reading-level.tsx. Package requirements: lucide-react.

What props customize Reading Level?

Reading Level accepts `label`, `value`, `defaultValue`, `onValueChange`, `targetGrade`. Configures readability, plain language, flesch-kincaid behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of reading-level?

Syllables are estimated from vowel groups (roughly ±10%), so grades are approximate. Flesch-Kincaid is an English-only formula and ignores meaning, layout and audience. The swap list is a starter set; it will miss domain jargon Server requirement: backend verification for reading-level.

How does Reading Level meet accessibility guidelines?

Visible <label> tied to the textarea, with the grade wired via aria-describedby. On/above-target status announced through a polite sr-only live region. Each swap button has an aria-label naming the word and its replacement. After a swap, focus moves to the next swap button (or back to the field). The tinted backdrop is aria-hidden; sentence difficulty also shown as text. Minimizes errors: text too complex, readability score.

Which components pair with Reading Level?