/03 npm package
astro-markdown-block
A Markdown block for Astro and React. Readers flip between the rendered preview and the raw source, and copy the Markdown in one click.
The overview
Prompts, READMEs, and snippets usually get pasted somewhere else. This block shows them rendered, keeps the original Markdown one toggle away, and copies it exactly as written.
What I built
A React component on npm with GitHub Flavored Markdown, light and dark themes from CSS variables, your own remark and rehype plugins, and about 1.7 KB of JS gzipped.
In practice
What you can do with it
- 01
Install with npm install astro-markdown-block
- 02
Switch between rendered preview and raw Markdown, then copy it in one click
- 03
Restyle it with --amb-* CSS variables, no Tailwind needed