Table Field
Table Custom Field - Structured data sets out-of-the-box
A Strapi plugin that adds a custom field that handles dynamic creation and handling of table structured data sets.
📋 Table of Contents
- ✨ Features
- 📋 Requirements
- 📦 Installation
- 🚀 Usage
- 💾 Data Structure
- 👨💻 Development & Testing
- 🔗 Links
- 💬 Community Support
- 📄 License
✨ Features
- Custom field type for creating table structured data
- Dynamic column management - add/remove columns with labels
- Dynamic row management - add/remove rows
- Editable cells with text input
- Data stored as JSON in Strapi database
- Seamless integration with Strapi Content Types
- Responsive and intuitive UI
- No external dependencies or services required
📋 Requirements
- Strapi v5.0.0 or later
- Node.js 18+
📦 Installation
npm install @sensinum/strapi-table-field@latest
# or
yarn add @sensinum/strapi-table-field@latest
After installation, the plugin will be automatically available in your Strapi admin panel.
🚀 Usage
Adding Table Field to Content Type
- Go to Content-Type Builder in your Strapi admin panel
- Select an existing content type or create a new one
- Click Add another field
- Select Table from the Custom Fields section
- Configure the field name and settings
- Save and restart the server if prompted
Working with Table Data
Once added to a content type, you can:
- Add Columns: Click the
+
button in the column header area - Remove Columns: Click the trash icon on any column header (minimum 1 column required)
- Add Rows: Click the "Add row" button below the table
- Remove Rows: Click the trash icon on any row (minimum 1 row required)
- Edit Cells: Simply click and type in any cell
The table data is automatically saved with your content entry.
💾 Data Structure
The table field stores data as JSON with the following structure:
1{
2 columns: [
3 {
4 label: string, // Column header label
5 type: string, // Field type (currently 'text')
6 required: boolean // Whether field is required
7 }
8 ],
9 rows: [
10 [string, string, ...] // Array of cell values matching column order
11 ]
12}
Example Data
1{
2 "columns": [
3 { "label": "Name", "type": "text", "required": false },
4 { "label": "Age", "type": "text", "required": false },
5 { "label": "City", "type": "text", "required": false }
6 ],
7 "rows": [
8 ["John Doe", "30", "New York"],
9 ["Jane Smith", "25", "London"],
10 ["Bob Johnson", "35", "Paris"]
11 ]
12}
Accessing Data in API Responses
When you query content with a table field, the data will be included in the response as JSON:
1{
2 "data": {
3 "id": 1,
4 "myTableField": {
5 "columns": [...],
6 "rows": [...]
7 }
8 }
9}
👨💻 Development & Testing
- Build:
yarn build
- Test backend:
yarn test:server
- Test frontend:
yarn test:ts:front
- Watch mode:
yarn watch
🔗 Links
💬 Community support
GitHub (Bug reports, contributions)
You can also used official support platform of Strapi, and search [VirtusLab]
prefixed people (maintainers)
- Discord (For live discussion with the Community and Strapi team)
- Community Forum (Questions and Discussions)
📄 License
See the MIT License file for licensing information.
Install now
npm install @sensinum/strapi-table-field
Create your own plugin
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.