Markdown Check

Markdown Check is a copy-paste React component that stops markdown renders differently than written 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/markdown-check
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

StopsMarkdown renders differently than written

Was this component page useful?

How do I install Markdown Check?

pnpm dlx shadcn@latest add @bollard/markdown-check

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

How do I use Markdown Check in React?

markdown-check-usage.tsx
import { MarkdownCheck } from "@/components/ui/markdown-check"

return <MarkdownCheck label="Release notes" defaultValue={draft} rows={5} className="max-w-sm" />

What input mistakes does Markdown Check catch?

  • Unclosed emphasis or code backticks
  • [text] (url) with a space, and empty or space-broken links
  • #Title with no space after #
  • Raw HTML tags your sanitizer strips (allowedTags)

What props does Markdown Check accept?

MarkdownCheck props
PropTypeDefault
label

Visible label.

string"Description"
hint

Helper text shown while there is nothing to warn about.

string"Markdown supported."
value

Controlled value.

string—
defaultValue

Initial value when uncontrolled.

string""
onValueChange

Called with the text on every change, including one-tap fixes.

(value: string) => void—
allowedTags

HTML tags the renderer keeps. Others are flagged as stripped.

string[]DEFAULT_ALLOWED_TAGS
delay

Pause in ms before problems show while typing. Leaving the field shows them at once.

number600
maxShown

How many problem spots are previewed at once.

number3
summary

Heading of the preview list; `{count}` is filled in.

string"{count} will render wrong"
validMessage

Shown when nothing will render wrong.

string"Renders as written"
fixLabels

Labels of the one-tap fixes, per mistake.

Partial<Record<MarkdownMistake, string>>—
showLabel

Text of the button that selects the spot in the textarea.

string"Show"
moreLabel

Shown when more spots exist than `maxShown`; `{count}` is filled in.

string"+{count} more"

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

How is Markdown Check accessible?

  • Visible label; textarea is described by a polite status region
  • Problems wait for a pause while typing and show at once on blur
  • Each issue has a select button and a fix button

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

What are the limitations and server boundaries?

  • Follows CommonMark/GitHub-style rules; other renderers differ
  • Not a full Markdown parser, so nested edge cases can be missed
  • Default allowed tags mirror GitHub-style sanitizers; pass yours

What expensive mistakes does Markdown Check stop?

Markdown renders differently than written

Also known as

markdown · md editor · readme · comment box · rich text · preview · github markdown · docs

Field type

What dependencies does Markdown Check require?

Markdown Check facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameMarkdown Check
Registry identifier@bollard/markdown-check
Install commandnpx shadcn@latest add @bollard/markdown-check
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 Markdown Check

What form validation mistake does Markdown Check catch?

Markdown Check prevents markdown renders differently than written. Catches Markdown that will render differently from how it reads, like an unclosed ** or a link broken by a space, and previews each spot. Catches: Unclosed emphasis or code backticks, [text] (url) with a space, and empty or space-broken links, #Title with no space after #, Raw HTML tags your sanitizer strips (allowedTags). Limitation: validate markdown-check schemas on backend.

How do I install markdown-check with shadcn?

Run `npx shadcn@latest add @bollard/markdown-check`. Sources added: registry/default/markdown-check/markdown-check.tsx, registry/default/markdown-check/markdown-rules.ts. Package requirements: lucide-react.

What props customize Markdown Check?

Markdown Check accepts `label`, `hint`, `value`, `defaultValue`, `onValueChange`. Configures markdown, md editor, readme behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of markdown-check?

Follows CommonMark/GitHub-style rules; other renderers differ. Not a full Markdown parser, so nested edge cases can be missed. Default allowed tags mirror GitHub-style sanitizers; pass yours Server requirement: backend verification for markdown-check.

How does Markdown Check meet accessibility guidelines?

Visible label; textarea is described by a polite status region. Problems wait for a pause while typing and show at once on blur. Each issue has a select button and a fix button. Minimizes errors: markdown link broken, unclosed bold markdown.

Which components pair with Markdown Check?