Skip to content

Styling & Theming

Class Overrides

Override Tailwind classes on any element:

tsx
<InertiaTable
    tableData={servers}
    className="shadow-none"
    classNames={{
        wrapper: 'rounded-xl border-2 border-indigo-200',
        thead: 'bg-indigo-50',
        th: 'px-6 py-4 text-indigo-700 uppercase',
        tr: 'hover:bg-indigo-50',
        td: 'px-6 py-4',
        search: 'rounded-full',
    }}
/>
vue
<!-- Coming soon -->

ClassNames Keys

KeyElement
wrapperOutermost container
toolbarToolbar row (search + actions)
table<table> element
thead<thead>
th<th> cells
thSortableAdditional classes on sortable headers
thSortedAdditional classes on active sort header
tbody<tbody>
tr<tr> rows
trClickableAdditional classes when onRowClick is set
td<td> cells
searchSearch input
paginationPagination container
paginationButtonPagination buttons
paginationInfoPage info text
emptyEmpty state
loadingBarLoading bar

Dark Mode

All default classes include dark: variants. Dark mode works automatically with your Tailwind configuration - no additional setup needed.

Dynamic Row Styling

tsx
<InertiaTable
    tableData={servers}
    rowClassName={(row, index) => {
        if (row.status === 'Failed') return 'bg-red-50 dark:bg-red-950';
        return '';
    }}
/>
vue
<!-- Coming soon -->

Remove border and shadow for tables embedded in modals or cards:

tsx
<InertiaTable tableData={servers} modal />
vue
<!-- Coming soon -->

Loading States

tsx
<InertiaTable
    tableData={servers}
    isFetching={isFetching}  // reduces opacity, disables pagination
    isLoading={isLoading}     // shows loading bar
/>
vue
<!-- Coming soon -->