---
title: "Table fields example"
description: "Fill table fields and add or remove body rows while keeping headers and columns fixed."
canonical_url: "https://tiptap.dev/docs/composable-docs/slots/examples/table-fields"
---

# Table fields example

Fill table fields and add or remove body rows while keeping headers and columns fixed.

This example uses [Content Protection](https://tiptap.dev/docs/composable-docs/content-protection/getting-started/overview.md) to restrict what users can edit. Users are allowed to add and remove rows to the table, and edit its content, but they cannot edit content outside the table, add columns, or edit the headers.

The demo uses Slots to define table cells as fields: each table field contains a Slot that can be filled with content and validated afterwards.

> **Interactive demo:** [TableFields](https://embed-pro.tiptap.dev/preview/Examples/TableFields)
