Data Table Cell
GitHubDate, currency, disabled-state, list, and ellipsis cell renderers for data tables.
Installation
bash
pnpm dlx shadcn@latest add @cs/data-table-cellUsage
tsx
import { DataTableCellDate } from "@/components/cs/data-table-cell";tsx
<DataTableCellDate value={new Date()} />API Reference
DataTableCellDate
Formats a date value using the active next-intl locale.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| className | string | - | - |
| value * | Date | string | undefined | null | - | - |
DataTableCellDisabled
Props
| Name | Type | Default | Description |
|---|---|---|---|
| disabled * | boolean | null | undefined | - | - |
| value * | string | - | - |
DataTableCellCurrency
Props
| Name | Type | Default | Description |
|---|---|---|---|
| currency | string | "EUR" | - |
| value * | number | undefined | null | - | - |
DataTableCellList
Props
| Name | Type | Default | Description |
|---|---|---|---|
| count | number | 1 | - |
| items * | { name: string; color?: string }[] | - | - |
DataTableCellEllipsis
Renders text truncated with an ellipsis while showing the full value in a tooltip. Based on Stack Overflow.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| className | string | - | - |
| text * | string | undefined | null | - | - |