@bktl/mdr
v0.0.1-alpha.0
Published
A quiet React component for reading markdown files.
Readme
@bktl/mdr
A quiet React component for reading markdown files — drag-and-drop or paste a document and read it with GFM, math (KaTeX), syntax highlighting, and a table of contents.
Install
npm install @bktl/mdrreact and react-dom (^19) are peer dependencies.
Usage
import { Mdr } from '@bktl/mdr'
import '@bktl/mdr/style.css'
export default function App() {
return <Mdr />
}Mdr renders the full reader experience (file open, paste, theme/font-size controls, table of contents) and manages its own state via localStorage.
Building blocks
The individual pieces used by Mdr are also exported, in case you want to compose your own UI:
import { TableOfContents, useDocument, useFontSize, useTheme } from '@bktl/mdr'Development
This repo is both the standalone app (in src/, built with npm run build) and the published library (npm run build:lib, output to lib/).
npm run dev— run the standalone app locallynpm run build— build the standalone app todist/npm run build:lib— build the publishable library tolib/npm run lint— lint with oxlint
