Skip to content

ColorFieldCell

ColorFieldCell<TData>(props): Element

Defined in: packages/react/src/fields/color/Cell.tsx:28

Colour field cell component for the data-table list view.

Renders a swatch beside the stored value. backgroundColor is set from the raw value, so a var(--token) reference resolves through CSS and the swatch follows the active colour scheme for free. Null, undefined, and empty values show an em-dash placeholder.

TData extends TDocument = TDocument

CellComponentProps<ColorField<string, { }>, TData>

Component props.

Element

The cell component for this field type, or an em-dash placeholder for an empty value.

<ColorFieldCell value={doc.primaryLight} fieldDef={primaryLightField} row={row} isTitleField={false} />