@pihanga2/markdown
v0.2.5
Published
Pihanga markdown viewer card — rich markdown with mermaid, math, and syntax highlighting
Maintainers
Readme
@pihanga2/markdown
Pihanga markdown viewer card — rich markdown with mermaid, math, and syntax highlighting
Part of the pihanga-shadcn card library.
Installation
npm install @pihanga2/markdownPeer dependencies (already in your project if you use pihanga-shadcn):
npm install react react-dom @pihanga2/coreThe following card-specific packages are installed automatically as dependencies:
highlight.jsmermaidreact-markdownrehype-highlightrehype-katexremark-gfmremark-mathunifiedtailwind-mergeclsxclass-variance-authority
Tailwind CSS
This package ships TypeScript source with Tailwind utility classes. Add it to your Tailwind content scan so the classes are included in your generated CSS.
Tailwind v4 (tailwind.css):
@source "../../node_modules/@pihanga2/markdown/dist-lib-markdown";Tailwind v3 (tailwind.config.js):
module.exports = {
content: ["./node_modules/@pihanga2/markdown/dist-lib-markdown/**/*.{js,jsx}"],
};Usage
import "@pihanga2/markdown/cards/markdownViewer";- Repository: https://github.com/ivcap-works/pihanga-shadcn
- shadcn registry: https://ivcap-works.github.io/pihanga-shadcn/r
