PACKAGE · RICH TEXT EDITOR

lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessible and performance.

WEEKLY DOWNLOADS 9.5M
STARS 24.0K
FORKS 2.3K
OPEN ISSUES 522
GZIP SIZE 77.3 kB
UNPACKED SIZE 3.7 MB
DEPENDENCIES 1
LAST UPDATED 8mo ago
DOWNLOAD TRENDS

lexical downloads · last 12 months

Download trends for lexical1 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.07.2M14.4M21.6M28.7MNov 2025FebMayAugOct 2026
lexical
ABOUT LEXICAL

Lexical is an extensible text editor framework for building text-editing experiences in web applications. It provides the foundation for managing editable content and editor behavior, addressing the complexity of creating a reliable, accessible, and performant text editor rather than prescribing one fixed interface.

Its design centers on extensibility and developer control: teams can shape the editor around their content model and user experience instead of adopting an all-in-one editor UI. Lexical is aimed at developers building rich-text features who are prepared to compose and maintain editor behavior, including accessibility and performance considerations.

Lexical uses an editor-state and node-based architecture, with commands and update listeners as core patterns for responding to edits and changing content. In React applications, its React integration provides components and hooks such as LexicalComposer and useLexicalComposerContext; custom nodes and commands can extend the editor, while serialization APIs support saving and restoring editor content.

The framework fits into React-based product interfaces and can be connected to application workflows for persistence, content validation, and custom controls. Its extensible model is useful when the editor must participate in a broader application, but developers should account for the work of selecting features, composing the interface, and integrating editor state with surrounding services.

The package is version 0.53.0, licensed under MIT, with a reported gzip bundle size of 77.3 kB and unpacked size of 3.7 MB. Its listed 6.9 million weekly downloads and 24,000 GitHub stars indicate substantial usage, while 405 open issues and the reported last-updated date of 2026-10-29 are useful context for evaluating maintenance and support needs.

WHEN TO USE
  • When building a custom rich-text editor and you want to compose its behavior rather than adopt a fixed editor interface; use Lexical's editor state and node model as the foundation.
  • When editor changes must trigger application behavior, register commands and update listeners to respond to edits and coordinate surrounding UI.
  • When a React interface needs editor context, use LexicalComposer and useLexicalComposerContext to connect editor components to the active instance.
  • When your content requires domain-specific structures, implement custom nodes and commands to represent and manipulate those structures in the editor.
  • When editor content must be saved or restored, use Lexical's serialization APIs to connect editor state with your persistence workflow.
  • When accessibility and performance are explicit requirements for a text editor, evaluate Lexical's stated design goals and test the resulting configuration against your application needs.
WHEN NOT TO USE
  • If you need a ready-made editor interface with a complete toolbar and predefined behavior, choose a packaged editor UI or build on a simpler text input; Lexical's framework approach requires composing the experience.
  • If your content is plain text and does not need rich editing behavior, use a standard input or textarea rather than introducing an editor state and node model.
  • If your application is not built with React and depends on React-specific editor integration, assess whether Lexical's framework integrations fit your stack before adopting them; otherwise, use an editor approach aligned with your framework.
  • If you cannot budget for custom nodes, commands, and editor-state integration, select a more turnkey editing solution or reduce the editor requirements to match the available implementation effort.
  • If your product depends on a specific editing feature, verify that Lexical supports it in your intended configuration before committing; implement and test a custom extension or select a solution that supplies the feature directly.
  • If the reported 77.3 kB gzip bundle size exceeds your client-side budget, compare it with a lighter text-entry approach or limit editor loading to the screens that require it.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 4
lexical vs quill ★ 47.4K · 8.2M/wk lexical vs slate ★ 31.8K · 4.8M/wk lexical vs prosemirror-state ★ 232 · 40.7M/wk lexical vs @tiptap/core ★ 39.1K · 38.5M/wk