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

    22
  • Network Graph

    Network Graph

    20
  • Stamp Seal

    Stamp Seal

    19
  • Board Checklist

    Board Checklist

    17
  • Navbar

    Navbar

    17
  • Running Order Timeline

    Running Order Timeline

    14
  • Milestone Chart

    Milestone Chart

    13
  • Hero

    Hero

    9

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    135
  • Astryx Chat Tokenized Text

    Astryx Chat Tokenized Text

    14
  • Scroll Fill Headline

    Scroll Fill Headline

    67
  • Blur Reveal

    Blur Reveal

    400
  • Apple Hello Effect

    Apple Hello Effect

    692
  • Rainbow Text Effect

    Rainbow Text Effect

    61
  • Text Reveal

    Text Reveal

    31
  • Vapour Text Effect

    Vapour Text Effect

    2.1K