npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hebbar/md-viewer

v1.1.1

Published

A highly customizable React Markdown viewer

Downloads

1,093

Readme

npm

@hebbar/md-viewer

A React Markdown viewer that works immediately. No complex setup, no extra plugins, just a simple component that looks professional out of the box.

Why I Built This

Most React Markdown libraries are a headache to set up. You usually get unstyled text and then spend hours installing extra plugins just to get basic features like tables or code highlighting to work.

I got tired of wasting time making documentation look "not broken." I built @hebbar/md-viewer to solve this. It includes everything you need by default, and you can style it using simple React props.


Features

  • Standard GFM: Tables, tasklists, and links work by default. No extra plugins required.
  • Ready-to-use Syntax Highlighting: Code blocks are styled immediately using built-in highlight.js.
  • Direct Styling: Change fonts, colors, sizes, and backgrounds directly through React props.
  • Fast & Lightweight: Small bundle size that works with both ESM and CommonJS projects.
  • Smart Headers: Automatically adds IDs to headings for easy deep-linking.

Demo Preview

Below is a demonstration of the viewer in action, rendering complex blocks and layouts:


Rapid Start

npm install @hebbar/md-viewer

How to Use

Render from a File Path (Server-Side)


import React, { useEffect, useState } from 'react';
import ReactDOM from 'react-dom/client';
import MDViewer from "@hebbar/md-viewer";

const App = () => {
  const [md, setMd] = useState("Loading...");

  useEffect(() => {
    fetch('/examples/sample.md') 
      .then(res => res.text())
      .then(text => setMd(text))
      .catch(err => setMd("# Error loading file"));
  }, []);

  return <MDViewer content={md} />;
};

ReactDOM.createRoot(document.getElementById('root')!).render(<App />);

Props & Attribute Reference

| Attribute | Input Type | Description | Required? | | ------------- | ------------- | ------------- | ------------- | | filePath | string | The path to the .md file (e.g., "app/docs/intro.md"). Reads from the project root. | No* | | content | string | Raw markdown text string. Used if filePath is not provided. | No* | | className | string | Custom CSS classes to apply to the outer container for specific layout tweaks. | No |

Project Roadmap & Status

Current Updates (Stable)

| Feature | Details | | ------------- | ------------- | | File Path Rendering | Implemented fs and path logic to load local .md files directly into React. | | Testing Suite | Full Vitest & React Testing Library integration added to src/. | | Metadata Parsing | Automatic extraction of titles and descriptions using gray-matter. | | Validation | Unit tests added to verify HTML tag conversion (H1, tables, code blocks). |

Future Updates (Planned)

| Feature | Details | | ------------- | ------------- | | Glassmorphism | A toggle to enable/disable high-end glass-blur effects. | | Advanced Media | Video & Image controls (resize, mute/unmute, autoplay settings). | | Theme Engine | Native support for Light, Dark, and Cyberpunk high-contrast modes. | | Custom Styling | Component-level font family controls and footer styling. |


License

MIT © G V Amaresh