# CellRenderer

**Kind:** Class

Displays the contents of a cell given a field and record.

[[ Story id="cellrenderer--example" title="Cell renderer example" ]]

---

## CellRendererProps

**Kind:** Interface

Props for the `CellRenderer` component. Also accepts:
* `CellRendererStyleProps`

### Properties

#### `cellClassName?`

Type: `undefined | string`

Additional class names to apply to the cell itself, separated by spaces.

#### `cellStyle?`

Type: `React.CSSProperties`

Additional styles to apply to the cell itself.

#### `cellValue?`

Type: `unknown`

The cell value to render. Either `record` or `cellValue` must be provided to the CellRenderer. If both are provided, `record` will be used.

#### `className?`

Type: `undefined | string`

Additional class names to apply to the cell renderer container, separated by spaces.

#### `field`

Type: `Field`

The `Field` for a given `Record` being rendered as a cell.

#### `record?`

Type: `Record | null | undefined`

The `Record` from which to render a cell. Either `record` or `cellValue` must be provided to the CellRenderer. If both are provided, `record` will be used.

#### `renderInvalidCellValue?`

Type: `undefined | object`

Render function if provided and validation fails.

#### `shouldWrap?`

Type: `undefined | false | true`

Whether to wrap cell contents. Defaults to true.

#### `style?`

Type: `React.CSSProperties`

Additional styles to apply to the cell renderer container.
