Search by

vitamin2 / bardtable

vitamin2

Statamic addon: table fieldtype with a Bard editor in every cell.

Package info

bitbucket.org/vitamin2/bardtable

Type:statamic-addon

pkg:composer/vitamin2/bardtable

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

v1.0.1 2026-09-30 11:21 UTC

This package is auto-updated.

Last update: 2026-10-05 09:08:55 UTC


README

Statamic table fieldtype where every cell is a Bard editor.

How to Install

composer require vitamin2/bardtable

Requires PHP 8.5 and Statamic 6.

Usage

Add a field of type bard_table to a blueprint or fieldset:

- handle: table
  field:
      type: bard_table
      buttons: [bold, italic, underline, anchor]
      toolbar: floating
      max_rows: 20
      max_columns: 6
OptionDefaultDescription
buttonsbold, italic, underline, anchorBard toolbar buttons available in each cell.
toolbarfloatingfixed or floating Bard toolbar.
container–Asset container, used when the image button is enabled.
max_rows–Limit rows. Empty = unlimited.
max_columns–Limit columns. Empty = unlimited.

Templating

The value augments to a list of rows, each with cells. Every cell has value (Bard HTML) and label. label is the plain text of the same column in the first row (empty in the first row itself), handy for stacked mobile tables via data-label.

<table>
    {{ table }}
        <tr>
            {{ cells }}
                <td data-label="{{ label }}">{{ value }}</td>
            {{ /cells }}
        </tr>
    {{ /table }}
</table>

Development

composer install && npm install
composer test      # PHPUnit
npm test           # Vitest (row/column logic)
npm run build      # rebuild resources/dist (commit the result)