Database Properties
Database property objects are rendered in the Notion UI as database columns.
Database properties are represented as columns in the Notion database. They are defined by CellPlugin
's that specify how the property behaves and renders in the Notion UI.
Column
A database column object Column<TPlugin>
consists of the common properties and the plugin-specific configuration.
Common Properties
Prop | Type | Description |
---|---|---|
id * | string | Unique identifier of the column. |
name * | string | Name of the column. |
icon | IconData | Displayed icon of the column. |
width | string | Width of the column. |
description | string | Description of the column. |
wrapped | boolean | Whether each cell in the column should be wrapped. |
hidden | boolean | Whether the column is hidden. |
isDeleted | boolean | Whether the column is deleted. |
isCountCapped | boolean | Whether the count of the column should be capped. |
countMethod | CountMethod | The count method of the column. |
Plugin Configuration
The plugin-specific configuration ColumnConfig<TPlugin>
for the column.
Prop | Type | Description |
---|---|---|
type * | PluginType<TPlugins> | Plugin type ID for the column. |
config * | InferConfig<TPlugin> | Plugin-specific config for column. |
ColumnDefs
ColumnDefs<TPlugins>
is an array of column definitions Column<TPlugin>
where the config
property is optional.
Row
A Row<TPlugins>
represents a row of data in the table.
API Reference
Prop | Type | Description |
---|---|---|
id * | string | Unique identifier of the row. |
properties * | Record<string, Cell<TPlugin>> | The row data keyed by column ID. |
icon | IconData | Displayed icon of the row. |
Cell
A Cell<TPlugin>
contains the id
and value
, where the value is determined by the plugin’s data type.
Common Properties
Prop | Type | Description |
---|---|---|
id * | string | Unique identifier of the cell. |
value * | InferData<TPlugin> | Plugin-defined cell data. |