f0rextasy

Markdown Preview

Text

About

A lightweight component that renders markdown text (headings, lists, inline code, links, bold) as styled JSX without any parser dependency.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Markdown Preview to your project and fits it to your theme.

Code

How Markdown Preview is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { MarkdownPreview } from "@/components/ui/markdown-preview";

const sample = `# Release Notes

## Highlights
- Faster build pipeline with incremental caching
- New **dark mode** toggle for every page
- Fixed a bug where \`npm install\` failed on Windows

## Example

\`\`\`
npm install your-package
npm run build
\`\`\`

Read the full [migration guide](https://example.com/docs) before upgrading.
`;

export default function MarkdownPreviewDemo() {
  return (
    <div className="w-full max-w-xl rounded-lg border border-border bg-background p-6 text-foreground">
      <MarkdownPreview source={sample} />
    </div>
  );
}

More by f0rextasy

View all
  • Newsletter Signup Card

    Newsletter Signup Card

    21
  • Stamp Seal

    Stamp Seal

    18
  • Network Graph

    Network Graph

    18
  • Board Checklist

    Board Checklist

    17
  • Navbar

    Navbar

    14
  • Running Order Timeline

    Running Order Timeline

    13
  • Milestone Chart

    Milestone Chart

    11
  • Empty State Card

    Empty State Card

    9

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    134
  • Astryx Chat Tokenized Text

    Astryx Chat Tokenized Text

    9
  • Text Reveal

    Text Reveal

    31
  • Rainbow Text Effect

    Rainbow Text Effect

    61
  • Scroll Fill Headline

    Scroll Fill Headline

    44
  • Shine Border

    Shine Border

    1K
  • Split text

    Split text

    79
  • Motion Blur Text

    Motion Blur Text

    47