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

easy-web-markdown

v0.1.1

Published

A lightweight React Markdown component based on markdown-it

Readme

easy-web-markdown

npm version license

A lightweight, batteries-included React Markdown editor component with live preview, toolbar, and resizable split panes — styled like GitHub.

screenshot

✨ Features

  • 📝 CodeMirror 6 Editor — Syntax highlighting, line numbers, and a first-class editing experience powered by @uiw/react-codemirror
  • 👀 Live Preview — Real-time GitHub-flavored Markdown preview via react-markdown + remark-gfm
  • 🔧 Formatting Toolbar — Bold, italic, heading, code, link, lists, task lists and more — all with keyboard shortcuts
  • ↔️ Resizable Split View — Drag the divider to resize editor and preview panes
  • 🎛️ Multiple View Modessplit (default), edit-only, or preview-only
  • 🎨 GitHub Styling — Preview rendered with github-markdown-css
  • 📱 Mobile Responsive — Touch-friendly toolbar and wider drag targets on small screens
  • 🧩 TypeScript — Fully typed with exported interfaces
  • 📦 Dual Format — Ships both ESM and CommonJS builds via tsup

📦 Installation

# npm
npm install easy-web-markdown

# yarn
yarn add easy-web-markdown

# pnpm
pnpm add easy-web-markdown

Peer Dependencies

This library requires React ≥ 16.8.0 as a peer dependency:

npm install react react-dom

🚀 Quick Start

You'll need to import the component and optionally a CSS theme for the preview pane:

import { Markdown } from "easy-web-markdown";

// Option A: Use the built-in minimal theme
import "easy-web-markdown/styles/preview.css";

// Option B: Bring your own theme (e.g., github-markdown-css)
// import "github-markdown-css/github-markdown.css";

function App() {
  return (
    <div style={{ height: 600 }}>
      <Markdown initialValue="# Hello World" onChange={(value) => console.log(value)} />
    </div>
  );
}

Note: The <Markdown /> component fills the height of its parent container. Make sure the parent has an explicit height set.

📖 API

<Markdown />

The main component that provides the full editor + preview experience.

| Prop | Type | Default | Description | | -------------- | -------------------------------- | --------- | --------------------------------------- | | initialValue | string | "" | Initial Markdown content | | onChange | (value: string) => void | — | Callback fired when the content changes | | mode | "split" \| "edit" \| "preview" | "split" | View mode for the component |

View Modes

| Mode | Description | | --------- | -------------------------------------------------------- | | split | Side-by-side editor and preview with a draggable divider | | edit | Editor only | | preview | Read-only rendered preview |

⌨️ Keyboard Shortcuts

All toolbar actions are accessible via keyboard shortcuts:

| Action | macOS | Windows / Linux | | -------------- | ----- | --------------- | | Heading | ⌘⇧H | Ctrl+Shift+H | | Bold | ⌘B | Ctrl+B | | Italic | ⌘I | Ctrl+I | | Strikethrough | ⌘⇧X | Ctrl+Shift+X | | Quote | ⌘⇧. | Ctrl+Shift+. | | Inline Code | ⌘E | Ctrl+E | | Link | ⌘K | Ctrl+K | | Unordered List | ⌘⇧8 | Ctrl+Shift+8 | | Ordered List | ⌘⇧7 | Ctrl+Shift+7 | | Task List | ⌘⇧L | Ctrl+Shift+L |

🏗️ Development

# Install dependencies
pnpm install

# Start the playground dev server
pnpm dev

# Build the library
pnpm build

# Run tests
pnpm test

# Type check
pnpm typecheck

The playground/ directory contains a Vite-powered demo app for local development and testing.

🛠️ Tech Stack

| Category | Technology | | ------------ | -------------------------------------------------------------------------------------------------------------- | | Editor | CodeMirror 6 via @uiw/react-codemirror | | Preview | react-markdown | | GFM Support | remark-gfm | | HTML Support | rehype-raw | | Styling | github-markdown-css | | Icons | react-icons (Lucide) | | Bundler | tsup | | Dev Server | Vite |

📄 License

MIT