TypesCore types

Table

A table you keep by hand, such as a budget, a reading log or a list of contacts, with the columns you choose.

Identifiercore.table

Fields

FieldKindDescription
titlestring, requiredThe name of the table.
descriptionstringWhat the table is for.
columnsobject, requiredThe table's columns, by name. A column has a type and may have a label, description, required, enum_values, format, max_length, minimum, maximum, type_constraints, adds_up and searchable, as a column a type declares does.

Settings

SettingValue
pluralTables
title_fieldtitle
body_fielddescription
iconlucide:table
merge_policylast_writer_wins for every field

The item holds one table, named table, whose columns are its columns property, keyed by column name. Field kinds lists the keys a column takes. Its rows are written to table with writeTableRows or marfa rows, as Tables explains.

Example

{
  "type": "core.table",
  "properties": {
    "title": "Trip budget",
    "description": "What the Lisbon trip costs, by day.",
    "columns": {
      "day": { "type": "date", "label": "Day", "required": true },
      "item": { "type": "string", "label": "What", "searchable": true },
      "category": { "type": "enum", "label": "Category", "enum_values": ["travel", "food", "stay"] },
      "amount": { "type": "number", "label": "Amount", "minimum": 0, "adds_up": "sum" }
    }
  }
}

On this page