# @lexical/table

> This package provides the Table feature for Lexical.

Latest version **0.50.0** (published 2026-09-02) · MIT license · 3.0M weekly downloads

## Install

```sh
npm install @lexical/table
pnpm add @lexical/table
yarn add @lexical/table
bun add @lexical/table
```

## Health

**Score 95/100 (A)** — status: active.

Positive: high downloads; has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo.

Warnings: pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.50.0 |
| Published | 2026-09-02 |
| First published | 2022-02-18 |
| Weekly downloads | 3.0M |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 895 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 23786 |
| Maintainers | fantactuka, zurfyx, acywatson, ipavlov001, trueadm, etrepum |
| Keywords | lexical, editor, rich-text, table |

## Links

- npm: https://www.npmjs.com/package/@lexical/table
- Repository: https://github.com/facebook/lexical
- npm.io page: https://npm.io/package/@lexical/table

## Dependencies (6)

- [lexical](https://npm.io/package/lexical.md) 0.50.0
- [@lexical/html](https://npm.io/package/@lexical/html.md) 0.50.0
- [@lexical/utils](https://npm.io/package/@lexical/utils.md) 0.50.0
- [@lexical/internal](https://npm.io/package/@lexical/internal.md) 0.50.0
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) 0.50.0
- [@lexical/extension](https://npm.io/package/@lexical/extension.md) 0.50.0

## Alternatives

- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads
- [tanstack-table-hovering](https://npm.io/package/tanstack-table-hovering.md) — 6.3K weekly downloads

## Recent versions

- 0.50.0 (latest) — 2026-09-02
- 0.50.1-nightly.20260910.0 (nightly) — 2026-09-10
- 0.45.1-dev.0 (dev) — 2026-05-30
- 0.6.1-next.0 (next) — 2022-11-04
- 0.50.1-nightly.20260909.0 — 2026-09-09
- 0.50.1-nightly.20260908.0 — 2026-09-08
- 0.50.1-nightly.20260907.0 — 2026-09-07
- 0.50.1-nightly.20260904.0 — 2026-09-04
- 0.50.1-nightly.20260903.0 — 2026-09-03
- 0.49.1-nightly.20260902.0 — 2026-09-02
- 0.49.1-nightly.20260901.0 — 2026-09-01
- 0.49.1-nightly.20260831.0 — 2026-08-31
- 0.49.1-nightly.20260828.0 — 2026-08-28
- 0.49.1-nightly.20260827.0 — 2026-08-27
- 0.49.1-nightly.20260826.0 — 2026-08-26
- … 670 more at https://npm.io/package/@lexical/table/versions

## README

# `@lexical/table`

[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_table)

This package contains the functionality for the Tables feature of Lexical.

# Lexical Table Plugin

A plugin for handling tables in Lexical.

## Installation

```bash
npm install @lexical/table @lexical/react
```

## Usage

See the [react-table example](https://github.com/facebook/lexical/tree/main/examples/react-table)
for a minimal example that uses this package and the
[TablePlugin](https://lexical.dev/docs/api/modules/lexical_react_LexicalTablePlugin)
from @lexical/react/LexicalTablePlugin

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-table?file=src/main.tsx)

## Features

### Tables
- Create and edit tables with customizable rows and columns
- Support for table headers
- Cell selection and navigation
- Copy and paste support

### Limitations

#### Nested Tables
Nested tables (tables within table cells) are not supported in the editor. The following behaviors are enforced:

1. When attempting to paste a table inside an existing table cell, the paste operation is blocked.
2. The editor actively prevents the creation of nested tables through the UI or programmatically.

Note: When pasting HTML content with nested tables, the nested content will be removed by default. Make sure to implement appropriate `importDOM` handling if you need to preserve this content in some form.

This approach allows you to:
1. Detect nested tables in the imported HTML
2. Extract their content before it gets removed
3. Preserve the content in a format that works for your use case

Choose an approach that best fits your needs:
- Flatten nested tables into a single table
- Convert nested tables to a different format (e.g., lists or paragraphs)
- Store nested content as metadata for future processing

---
_Source: https://npm.io/package/@lexical/table · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
