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

@editkit/react

v1.0.9

Published

React and Next.js rich text editor with tables, color picker, bubble menu, and no third-party editor engine. A TypeScript alternative to TipTap, Quill, Lexical, and Slate.

Readme

EditKit React Rich Text Editor — @editkit/react

@editkit/react is the official React and Next.js integration for EditKit Text Editor, with native tables, a color picker, floating menus, and modular toolbars.


⚡ Why @editkit/react?

  • 🚀 No Third-Party Editor Engine: Built in TypeScript without ProseMirror, Lexical, Slate, or Quill.
  • ⚛️ Universal React Support: Works seamlessly in React 16.8+, React 18, React 19, Next.js (App & Pages Router), Remix, and Laravel Inertia React.
  • 📊 First-Class Interactive Tables: 6×6 visual hover grid, one-click row/column add & delete, cell background coloring, and contextual table menu.
  • 🎨 2D HSV Custom Color Picker: Text and background highlight color with 21 palette swatches + 2D saturation/brightness spectrum and hue slider.
  • 🫧 Contextual Floating Menus: Smart text selection bubble toolbar, floating table actions, and image resize bar.
  • 🎛️ Granular Feature Props: Turn any toolbar item on or off with simple boolean props.
  • 🌗 CSS Variable Theming: Beautiful dark & light modes out of the box. Fully customizable with plain CSS.

📦 Installation

# Using npm
npm install @editkit/react @editkit/ui

# Using pnpm (recommended)
pnpm add @editkit/react @editkit/ui

# Using yarn
yarn add @editkit/react @editkit/ui

All-in-one alternative: npm install editkit-text-editor react react-dom, then import from editkit-text-editor/react and editkit-text-editor/styles.


🚀 Quick Start

1. Ready-to-Use Component (<EditKitEditor />)

'use client';

import React, { useState } from 'react';
import { EditKitEditor } from '@editkit/react';
import '@editkit/ui/styles';

export default function App() {
  const [content, setContent] = useState('<h1>Hello EditKit</h1><p>Start writing...</p>');

  return (
    <div className="max-w-4xl mx-auto p-4">
      <EditKitEditor
        value={content}
        onChange={setContent}
        theme="dark" // 'dark' | 'light' | 'system'
        placeholder="Type something amazing..."
        // Granularly toggle any feature on or off:
        features={{
          math: false,           // Hide LaTeX Math formula modal
          chart: false,          // Hide Chart widget
          panel: false,          // Hide callout / panel menu
          insertElements: false, // Hide Insert Elements menu
        }}
        bubbleMenu={true}        // Floating selection bubble menu
        tableMenu={true}         // Contextual floating table actions
        imageMenu={true}         // Floating image resize bar
      />
    </div>
  );
}

2. Custom Headless Hook (useEditKitEditor)

If you want to build custom toolbars or programmatic workflows:

import React from 'react';
import { useEditKitEditor } from '@editkit/react';
import '@editkit/ui/styles';

export function CustomEditor() {
  const { editor, containerRef } = useEditKitEditor({
    content: '<p>Custom headless editor</p>',
    theme: 'dark',
    features: {
      chart: false,
    },
  });

  return (
    <div>
      <div className="custom-toolbar flex gap-2 mb-2">
        <button onClick={() => editor?.commands.bold()}>Bold</button>
        <button onClick={() => editor?.commands.italic()}>Italic</button>
        <button onClick={() => editor?.commands.heading(2)}>H2</button>
        <button onClick={() => editor?.commands.insertTable({ rows: 3, cols: 3 })}>Table</button>
      </div>
      <div ref={containerRef} className="editor-container" />
    </div>
  );
}

🎛️ Complete Component Props Reference

Core Editor Props (<EditKitEditor />)

| Prop Name | Type | Default | Description | | :--- | :--- | :--- | :--- | | value | string | undefined | Controlled HTML content of the editor | | defaultValue | string | undefined | Initial uncontrolled HTML content | | onChange | (html: string) => void | - | Callback triggered whenever content changes | | onFocus | (editor: EditKitEditor) => void | - | Callback when editor gains focus | | onBlur | (editor: EditKitEditor) => void | - | Callback when editor loses focus | | theme | 'light' \| 'dark' \| 'system' | 'dark' | Visual theme mode | | placeholder | string | 'Write something...' | Placeholder text when empty | | editable | boolean | true | Read-only mode toggle (false makes it non-editable) | | showToolbar | boolean | true | Show or hide the top formatting toolbar | | bubbleMenu | boolean | true | Enable floating selection bubble toolbar | | tableMenu | boolean | true | Enable contextual table action floating menu | | imageMenu | boolean | true | Enable floating image resizer menu | | className | string | '' | Custom CSS class name on root container | | features | ToolbarFeaturesConfig | {} | Granular toolbar button toggles (see table below) |


Toolbar Feature Flags (features prop)

You can pass features={{ [key]: boolean }} to customize every single button on the toolbar:

| Feature Key | Type | Default | Description | | :--- | :--- | :--- | :--- | | history | boolean | true | Undo (Ctrl+Z) & Redo (Ctrl+Y) button group | | block | boolean | true | Paragraph & Heading dropdown (Heading 1 to 6) | | fontFamily | boolean | true | Font family dropdown (DM Sans, Inter, Geist, etc.) | | fontSize | boolean | true | Font size stepper (- 14 +) | | bold | boolean | true | Bold text button (B) | | format | boolean | true | Character formats dropdown (Italic, Underline, Strikethrough, Code, Sub/Superscript) | | color | boolean | true | 2D HSV color picker popover (A ˅) | | align | boolean | true | Text alignment dropdown (Left, Center, Right, Justify) & Line Height | | lists | boolean | true | Bullet, Numbered, Task lists & Indent/Outdent | | image | boolean | true | Image upload dropzone & URL modal | | table | boolean | true | Interactive 6×6 visual hover grid table inserter | | chart | boolean | true | Insert Chart / Poll widget | | math | boolean | true | LaTeX Math & Equation editor modal | | link | boolean | true | In-place floating link preview & edit popover (Ctrl+K) | | emoji | boolean | true | Searchable emoji picker with category tabs | | symbol | boolean | true | Special characters & math symbols picker (Ω) | | panel | boolean | true | Info, warning, error, success, and note panels | | insertElements | boolean | true | Dividers, uploads, signatures, and layout blocks | | selectAll | boolean | true | Select all editor content button (⌘A) | | clearAll | boolean | true | Clear all content button (Cross icon, enabled only when all selected) | | preview | boolean | true | Responsive document preview button |


🎨 CSS Variable Theming

[data-editkit],
[data-editkit-theme="dark"] {
  --editkit-bg: #0c0d10;
  --editkit-card-bg: #141519;
  --editkit-toolbar-bg: #18191e;
  --editkit-border: #23252f;
  --editkit-border-focus: #7c3aed;
  --editkit-primary: #7c3aed;
  --editkit-font: 'DM Sans', sans-serif;
}

value, defaultValue, and content are trusted-HTML inputs. Sanitize content from users or external systems before passing it to EditKit and before rendering saved HTML.


📄 License

MIT © Ashikur Rahman