Skip to content

Lexical vs Slate

Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.

Lexical

Open source · MIT

An extensible text editor framework for building rich text editors in web apps.

Slate

Open source · MIT

A customizable framework for building rich text editors in the browser.

The short answer

Choose Lexical if you need…

  • Developers adding a rich text editor to a web app
  • React teams who want official bindings and a documented quick start
  • Projects that need real-time collaboration through Yjs integration
  • Teams that want import/export to JSON, Markdown, or HTML

Choose Slate if you need…

  • Developers building a custom rich text editor inside a web app
  • Teams who need control over the editor's data model and behavior
  • React developers, since the topics and release name point to slate-react

Side-by-side

LexicalSlate
TypeLibraryFramework
PriceFree and open sourceFree and open source
LicenceMITMIT
GitHub stars24k31.7k
Setup difficultyIntermediateAdvanced
How you get itInstall with a package managerInstall with a package manager
Main languageTypeScriptTypeScript
Last code update4 days ago9 days ago

What each one is

Lexical

Lexical is a framework from Meta for building text editors inside web applications. It is a toolkit rather than a finished editor, so developers use it to create editing experiences with features like lists, tables, code blocks, and undo/redo. The README says it works with any UI framework and offers official React bindings.

Slate

Slate is a TypeScript framework for building rich text editors on the web, such as editors with bold, lists, links, or custom blocks. It is described as completely customizable, so developers can define their own document model and behavior rather than using a fixed editor. The project is currently in beta, according to its description.

Best for

Lexical

  • Developers adding a rich text editor to a web app
  • React teams who want official bindings and a documented quick start
  • Projects that need real-time collaboration through Yjs integration
  • Teams that want import/export to JSON, Markdown, or HTML

Slate

  • Developers building a custom rich text editor inside a web app
  • Teams who need control over the editor's data model and behavior
  • React developers, since the topics and release name point to slate-react

Strengths

Lexical

  • Built-in accessibility support and WCAG compliance, per the README
  • Framework-agnostic core with official React bindings
  • Written in TypeScript with type definitions

Slate

  • Described as completely customizable, which suits unusual editor designs
  • Written in TypeScript, with an MIT license that allows broad reuse
  • Large community interest, with about 31,700 stars on GitHub

Not ideal for

Lexical

  • Non-developers looking for a ready-made word processor, since it is a framework with no standalone end-user app described in the README
  • Projects that must support very old browsers, since it lists Chrome 86+, Firefox 115+, and Safari 15+

Slate

  • People who just want a ready-made editor without writing code, since Slate is a framework to build with
  • Projects that need a stable, non-beta dependency, since the description says it is currently in beta
  • Simple text input needs, where a plain textarea or a lighter editor is enough

Trade-offs

Lexical

  • Requires building your own editor UI from plugins and components, which takes development effort
  • Browser support is limited to the listed recent versions

Slate

  • Described as currently in beta, so APIs may change
  • Building an editor requires real development work, not a drop-in setup
  • The README was truncated here, so detailed setup and API information could not be verified

Getting started

Lexical

Install Lexical with React bindings

npm install lexical @lexical/react

Install dependencies for development

pnpm install
Step-by-step guide: how to use Lexical

Slate

Clone the repository

git clone https://github.com/ianstormtaylor/slate
Step-by-step guide: how to use Slate

Frequently asked questions

What is the difference between Lexical and Slate?

Lexical: An extensible text editor framework for building rich text editors in web apps. Slate: A customizable framework for building rich text editors in the browser. Lexical suits developers adding a rich text editor to a web app, while Slate suits developers building a custom rich text editor inside a web app.

Are Lexical and Slate free?

Lexical: Free and open source. Slate: Free and open source.

Which is easier to set up, Lexical or Slate?

Lexical is easier to get started with (rated intermediate); Slate is rated advanced and usually needs more setup.

Is Lexical or Slate more popular?

Slate has more GitHub stars (31.7k) than Lexical (24k). Popularity isn't the same as fit — check which one matches your use case above.

What are other alternatives to Lexical and Slate?

Other options people compare them with include Tiptap, Next.js, ice.js, Blitz.js.

Keep comparing

Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.