# cellStyle

Inline style object, callback, or array of these for the cell.

Canonical: https://grid.syidax.com/docs/columns/cellStyle/

<a id="meaning"></a>

## What does this API do?

Inline style object, callback, or array of these for the cell.

<a id="contract"></a>

## Exact input and result types

```typescript
cellStyle?: | Record<string, string | number>
    | GridCallback<
        [CellCallbackParams<TData, TValue, TContext>],
        Record<string, string | number> | null | undefined
      >
    | ReadonlyArray<
        | Record<string, string | number>
        | GridCallback<
            [CellCallbackParams<TData, TValue, TContext>],
            Record<string, string | number> | null | undefined
          >
      >
```

| Item | Value |
| --- | --- |
| Required | Optional |
| Input type | \| Record<string, string \| number><br>    \| GridCallback<<br>        [CellCallbackParams<TData, TValue, TContext>],<br>        Record<string, string \| number> \| null \| undefined<br>      ><br>    \| ReadonlyArray<<br>        \| Record<string, string \| number><br>        \| GridCallback<<br>            [CellCallbackParams<TData, TValue, TContext>],<br>            Record<string, string \| number> \| null \| undefined<br>          ><br>      > |

<a id="usage"></a>

## Usage flow

Set this on an individual column object in columnDefs. Pass arrays, objects, and callbacks through JavaScript, and use new arrays or objects when applying changes.

<a id="types"></a>

## Read related types

- [GridCallback](https://grid.syidax.com/docs/types/GridCallback.md)
- [CellCallbackParams](https://grid.syidax.com/docs/types/CellCallbackParams.md)

<a id="recipes"></a>

## Feature explanations and examples

- [Customize cell appearance](https://grid.syidax.com/docs/features/custom-cells.md) — Cell renderers change how data is displayed. Use them for status badges, links, and action buttons while retaining the original values for sorting and filtering.
