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

    19
  • Board Checklist

    Board Checklist

    15
  • Stamp Seal

    Stamp Seal

    15
  • Network Graph

    Network Graph

    14
  • Navbar

    Navbar

    12
  • Running Order Timeline

    Running Order Timeline

    11
  • Milestone Chart

    Milestone Chart

    10
  • Empty State Card

    Empty State Card

    7

More in Text

View all
  • Motion Blur Text

    Motion Blur Text

    45
  • Rainbow Text Effect

    Rainbow Text Effect

    58
  • Short Slide Down

    Short Slide Down

    45
  • Blur Reveal

    Blur Reveal

    72
  • Text Reveal

    Text Reveal

    29
  • Text Highlight

    Text Highlight

    96
  • Apple Hello Effect

    Apple Hello Effect

    659
  • Scroll Fill Headline

    Scroll Fill Headline

    13