@boba-cli/markdown
v0.1.0-alpha.3
Published
Markdown viewer component for Boba terminal UIs
Readme
@boba-cli/markdown
Markdown viewer component for Boba terminal UIs.
Features
- Renders markdown with beautiful terminal styling
- Scrollable viewport for long documents
- Automatic light/dark theme detection
- Support for headers, code blocks, lists, links, and more
- Word wrapping at viewport width
Installation
pnpm add @boba-cli/markdownUsage
import { MarkdownModel } from '@boba-cli/markdown'
import { Program } from '@boba-cli/tea'
let model = MarkdownModel.new({ active: true })
const [updatedModel, cmd] = model.setFileName('README.md')
model = updatedModel
// Handle resize
const [resizedModel] = model.setSize(width, height)
model = resizedModel
// Render
const view = model.view()API
See the API documentation for complete details.
