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

micropen

v1.0.21

Published

A feather-light (< 1KB) SSR-compatible rich text editor with dynamic features

Readme

micropen

npm version Bundle Size License: MIT

A feather-light (< 1KB) rich text editor with SSR compatibility and dynamic feature generation. Perfect for applications where every byte counts.

Features

  • Ultra Lightweight: Less than 1KB in size
  • SSR Compatible: Works seamlessly in server-side rendered applications
  • Dynamic Features: Load editing features on-demand
  • Framework Agnostic: Use with React, Vue, or vanilla JavaScript
  • Mobile Ready: Touch-friendly and responsive
  • Customizable: Enable only the features you need

Installation

# npm
npm install micropen

# yarn
yarn add micropen

# pnpm
pnpm add micropen

Quick Start

Vanilla JavaScript (ESM)

import { Editor } from 'micropen';
import 'micropen/style.css';

const editor = new Editor({
  element: document.getElementById('editor'),
  placeholder: 'Start typing...',
  onChange: (html) => console.log('Content changed:', html)
});

React

import { Editor } from 'micropen/react';
import 'micropen/style.css';

function MyEditor() {
  const [content, setContent] = useState('');

  return (
    <Editor
      value={content}
      onChange={setContent}
      placeholder="Start typing..."
      features={['bold', 'italic', 'link']}
    />
  );
}

Vue 3

<template>
  <Editor
    v-model="content"
    :features="['bold', 'italic', 'link']"
    placeholder="Start typing..."
    @change="handleChange"
  />
</template>

<script setup>
import { ref } from 'vue';
import { Editor } from 'micropen/vue';

const content = ref('');
const handleChange = (html) => {
  console.log('Content changed:', html);
};
</script>

Next.js (App Router)

'use client';

import { Editor } from 'micropen/react';
import 'micropen/style.css';

export default function EditorPage() {
  return (
    <Editor
      placeholder="Start typing..."
      features={['bold', 'italic', 'link']}
    />
  );
}

Nuxt 3

<template>
  <ClientOnly>
    <Editor
      v-model="content"
      placeholder="Start typing..."
      :features="['bold', 'italic', 'link']"
    />
  </ClientOnly>
</template>

<script setup>
import { ref } from 'vue';
const content = ref('');
</script>

API Reference

Editor Options

interface EditorOptions {
  element: HTMLElement;              // Target element (required for vanilla JS)
  placeholder?: string;             // Placeholder text
  onChange?: (html: string) => void; // Change callback
  features?: string[];              // Features to enable
  initialContent?: string;          // Initial HTML content
}

Available Features

  • bold: Bold text formatting
  • italic: Italic text formatting
  • underline: Underline text
  • link: Add hyperlinks
  • list: Bullet and numbered lists
  • heading: Heading styles
  • code: Code formatting

React Props

interface EditorProps {
  value?: string;                   // Controlled content value
  defaultValue?: string;            // Uncontrolled initial content
  placeholder?: string;             // Placeholder text
  onChange?: (html: string) => void; // Change callback
  features?: string[];              // Features to enable
  className?: string;               // Additional CSS class
  style?: React.CSSProperties;      // Inline styles
}

Vue Props

interface EditorProps {
  modelValue?: string;              // v-model content
  placeholder?: string;             // Placeholder text
  features?: string[];              // Features to enable
  class?: string | object;          // Additional CSS class
  style?: object;                   // Inline styles
}

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

Size Comparison

| Editor | Size (min+gzip) | |--------|----------------| | micropen | < 1KB | | TinyMCE | ~200KB | | CKEditor 5 | ~230KB | | Quill | ~43KB |

Why micropen?

  • Size Matters: When every kilobyte counts, micropen delivers essential editing capabilities in less than 1KB
  • SSR First: Built with modern frameworks in mind, works perfectly with Next.js, Nuxt, etc.
  • Dynamic Loading: Pay only for what you use with feature-level code splitting
  • Framework Agnostic: Use it anywhere, with any framework
  • Modern Architecture: Built with TypeScript, zero dependencies

License

MIT

Support