@lexical/a11y

Framework-agnostic accessibility helpers (ARIA live regions, focus management, roving tab index, focus trap) usable with Lexical from React, Svelte, Vue, Solid, or vanilla DOM.
12,617,619 23,971
Install
npm install @lexical/a11y
Latest Version:0.52.0
License:MIT
Last Updated:Oct 21, 2026
Links: GitHub  ·  npm
Maintainer: fantactuka

Lexical

An extensible text editor framework that provides excellent reliability, accessibility and performance.

NPM Version NPM Downloads Build Status Discord

Documentation | Getting Started | Playground | Gallery


Features

  • Framework Agnostic Core - Works with any UI framework, with official React bindings
  • Reliable & Accessible - Built-in accessibility support and WCAG compliance
  • Extensible - Plugin-based architecture with powerful extension points
  • Immutable State Model - Time-travel ready with built-in undo/redo
  • Collaborative Editing - Real-time collaboration via Yjs integration
  • Serialization - Import/export from JSON, Markdown, and HTML
  • Rich Content - Support for tables, lists, code blocks, images, and custom nodes
  • Cross-browser - Firefox 115+, Safari 15+, Chrome 86+ (see Supported Browsers)
  • Type Safe - Written in TypeScript with comprehensive type definitions

Quick Start

For framework-agnostic usage, start with the Vanilla JS quick start or the Vanilla JS example.

For React applications, install Lexical with the official React bindings:

npm install lexical @lexical/react
import { $getRoot, $getSelection } from 'lexical';
import { LexicalComposer } from '@lexical/react/LexicalComposer';
import { PlainTextPlugin } from '@lexical/react/LexicalPlainTextPlugin';
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary';

const initialConfig = {
  namespace: 'MyEditor',
  onError: (error) => console.error(error),
};

function Editor() {
  return (
    <LexicalComposer initialConfig={initialConfig}>
      <PlainTextPlugin
        contentEditable={<ContentEditable />}
        ErrorBoundary={LexicalErrorBoundary}
      />
      <HistoryPlugin />
    </LexicalComposer>
  );
}

Try it yourself:

Development

# Install dependencies
pnpm install

# Start playground dev server
pnpm run start

# Run tests
pnpm run test-unit
pnpm run test-e2e-chromium

# Lint and type check
pnpm run ci-check

See CONTRIBUTING.md for detailed development guidelines.

Documentation

Community & Support

Browser Support

Browser Version
Chrome 86+
Firefox 115+
Safari 15+
Edge 86+

Contributors

We welcome contributions! Please read our Contributing Guide to learn about our development process and how to propose bugfixes and improvements.

License

MIT License Copyright ©2026 Meta Platforms, Inc.

Related Packages

lexical-vue

An extensible Vue 3 web text-editor based on Lexical.

166,694 362
vue-a11y-utils

Utilities for accessibility (a11y) in Vue.js

8,047 122
nuxt-a11y

This module integrates Axe tool for auditing website against common Accessibilit...

462
oxlint-plugin-vue-sfc-a11y

Vue SFC accessibility rules for oxlint, as a JS plugin. Ports of eslint-plugin-v...

6,833 0
@open-wysiwyg-editor/vue

Vue 3 component for open-wysiwyg-editor: . Accessible (WCAG 2.2 AA), RTL-first,...

680 0

Version History

Version Released License
0.52.0 MIT
0.51.0 MIT
0.50.0 MIT
0.49.0 MIT
0.48.0 MIT
Pre-releases (80)
Version Released License
0.52.1-nightly.20261021.0 MIT
0.52.1-nightly.20261020.0 MIT
0.52.1-nightly.20261019.0 MIT
0.52.1-nightly.20261016.0 MIT
0.52.1-nightly.20261015.0 MIT