Customize the look and feel of your data grid to match your brand.
Customize the look and feel of your data grid to match your brand.
The grid uses CSS variables for granular control over sizing and colors. You can override these variables in your global CSS or within a specific scope.
Native support for dark mode via Tailwind classes is built-in. The grid automatically adapts to the .dark class on the html or body element.
Optimized for readability with high contrast borders and light backgrounds.
Reduces eye strain with softened borders and muted background colors.
You can customize individual cells using the meta property in your column definition.
:root {
/* Dimensions */
--grid-row-height: 40px;
--grid-header-height: 36px;
--grid-group-header-height: 32px;
--grid-filter-bar-height: 32px;
/* Spacing */
--grid-cell-padding-x: 0.75rem;
--grid-cell-padding-y: 0.5rem;
}const columns = [
{
accessorKey: 'status',
header: 'Status',
meta: {
// Conditional classes
cellClassRules: {
'text-green-600': (value) => value === 'active',
'text-red-600': (value) => value === 'inactive',
},
// Inline styles
cellStyle: (value) => ({
fontWeight: value === 'active' ? 'bold' : 'normal',
})
}
}
]