Make your AI a shadcn expert

Shadcn Markdown

React markdown for assistant replies and docs snippets. Built with TypeScript and Tailwind CSS for Next.js using Base UI — Streamdown, tables, and fenced code.

A markdown renderer for text that arrives as a string — assistant replies, a README, a changelog. It uses Streamdown so a partial fence still paints as code while tokens stream in.

Scroll to load preview...

Usage

import { Markdown } from "@/components/ui/markdown"
<Markdown>{source}</Markdown>

Pass the string as children. Tables, quotes, lists, and fenced code all render.

Composition

Markdown

The file is a thin Streamdown wrapper. Add plugins there if you need more.

In a Bubble

Assistant text inside a Bubble. Keep the user side as plain text.

Scroll to load preview...

In a Message

Same renderer on a Message row.

Scroll to load preview...

API

Prop

Type

Notes

Stream the same string

Do not remount Markdown on every token. Append to one string and let Streamdown update in place.

With other components

Questions

Was this page helpful?

Sign in to leave feedback.