Slate

Completely customizable framework for building rich text editors

Framework
npm
v0.146.0
31,742 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
92 /100 Excellent
Development Activity 96
Maintenance 96
Community 76
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
81 /100 Excellent
Architecture 90
Code Quality 84
Innovation 87
Learning Curve 62

Slate is a framework for building fully customizable rich text editors, giving developers the same low-level building blocks that power editors like Medium’s and Dropbox Paper’s rather than a fixed set of editor features. Instead of a pre-built WYSIWYG widget, Slate models editor content as an immutable, JSON-representable document tree and exposes a plugin-based architecture so every behavior — from what elements exist to how selection and history work — can be overridden or extended.

The project is split into focused packages: slate holds the core, view-agnostic document model, editor interface, and operation/transform logic; slate-react binds that core to React and contenteditable; slate-dom provides DOM-level utilities shared across renderers; slate-history adds undo/redo; and slate-hyperscript offers a JSX-like way to build test/seed documents. Because the schema is entirely developer-defined, teams use Slate to build anything from a simple comment box to a full block-based document editor.

What You Get

  • A fully custom, JSON-serializable document schema — you define what block/inline/text types exist
  • An Editor interface and Transforms API for programmatically inserting, deleting, and normalizing content
  • A plugin architecture that lets you override core editor behaviors (isVoid, isInline, normalizeNode, etc.)
  • slate-react for binding the core model to React via contenteditable
  • slate-history for undo/redo built on the same operation log used for collaborative editing
  • slate-hyperscript for writing editor documents in JSX-like test fixtures

Common Use Cases

  • Building a custom block-based document editor (like Notion-style or Medium-style editors)
  • Adding a rich text comment box or annotation editor with a constrained, app-specific schema
  • Implementing collaborative or versioned editing on top of Slate’s operation-based change model
  • Migrating away from contenteditable-only or fixed-feature WYSIWYG editors toward a fully customizable schema

Under The Hood

Architecture The core packages/slate/src directory defines the document model in interfaces/ (over 100 TypeScript files covering editor.ts at nearly 1,000 lines, node.ts, element.ts, text.ts, path.ts, point.ts, range.ts), each interface pairing a data shape with static helper functions rather than classes; create-editor.ts assembles the base Editor object and its default plugin behaviors, while transforms-node/, transforms-selection/, and transforms-text/ implement the composable operations (insertNodes, splitNodes, setSelection, etc.) that mutate the document immutably and emit Operation objects for the history log. slate-react layers React bindings and contenteditable DOM reconciliation on top of this core, slate-dom factors out DOM utilities shared by non-React renderers, and slate-history implements undo/redo by replaying/reversing the operation log — keeping the core package itself completely rendering-framework-agnostic. Tech Stack TypeScript monorepo managed with Yarn workspaces and Lerna, @babel/runtime for compiled output, published per-package to npm (slate, slate-react, slate-dom, slate-history, slate-hyperscript), with a documentation site under site/ and docs/ built with GitBook config. Code Quality The core package has its own test/ directory (24+ test files) run via Jest, alongside a playwright/ directory for end-to-end browser testing of the React bindings — reflecting a two-tier test strategy (pure logic unit tests for the model, browser-level tests for actual contenteditable behavior), and the project uses Changesets (.changeset/) for coordinated multi-package version releases. API Design The API trades a slightly steeper learning curve (developers must understand the immutable node/path/operation model) for very high flexibility — every default behavior is overridable via the plugin pattern, and the extensive docs/ and site/ examples walk through building custom elements, marks, and normalization rules step by step.

Used by 54 apps in this directory

TypeScript
91%
MIT

Dittofeed

Automation · Marketing

3,022

Open-source omni-channel customer engagement platform for automating transactional and marketing messages via email, SMS, WhatsApp, Slack, and mobile push.

View details
72
Repo Health
75
Technical
62
Dependency
Built with
TypeScript 91%
Updated 2 weeks ago
TypeScript
88%
MIT

Drawnix

Design Tools · Productivity

14,977

All-in-one open-source whiteboard combining mind maps, flowcharts, and freehand drawing on a single infinite canvas.

View details
60
Repo Health
69
Technical
79
Dependency
Built with
TypeScript 88%
Updated 1 months ago
TypeScript
88%
MIT

Drawnix

Design Tools · Productivity

14,977

All-in-one open-source whiteboard combining mind maps, flowcharts, and freehand drawing on a single infinite canvas.

View details
60
Repo Health
69
Technical
79
Dependency
Built with
TypeScript 88%
Updated 1 months ago
TypeScript
88%
MIT

Drawnix

Design Tools · Productivity

14,977

All-in-one open-source whiteboard combining mind maps, flowcharts, and freehand drawing on a single infinite canvas.

View details
60
Repo Health
69
Technical
79
Dependency
Built with
TypeScript 88%
Updated 1 months ago
TypeScript
88%
MIT

Drawnix

Design Tools · Productivity

14,977

All-in-one open-source whiteboard combining mind maps, flowcharts, and freehand drawing on a single infinite canvas.

View details
60
Repo Health
69
Technical
79
Dependency
Built with
TypeScript 88%
Updated 1 months ago
TypeScript
47%
AGPL 3.0

Grafana

Analytics · Monitoring

77,469

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
63
Dependency
Built with
TypeScript 47%
Go 47%
Updated 5 days ago
TypeScript
47%
AGPL 3.0

Grafana

Analytics · Monitoring

77,469

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
63
Dependency
Built with
TypeScript 47%
Go 47%
Updated 5 days ago
TypeScript
47%
AGPL 3.0

Grafana

Analytics · Monitoring

77,469

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
63
Dependency
Built with
TypeScript 47%
Go 47%
Updated 5 days ago
TypeScript
99%
MIT

KeystoneJS

CMS · Developer Tools

9,980

The superpowered headless CMS for developers built with GraphQL and React

View details
92
Repo Health
81
Technical
64
Dependency
Built with
TypeScript 99%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers