Configuration File
Laravel Livewire Tables provides extensive configuration options through theconfig/livewire-tables.php file. Publish the configuration file using:
Configuration Options
Theme
The CSS framework theme used to render the tables.The theme determines which CSS classes are applied to table elements. Supported values:
tailwind- Tailwind CSS stylingbootstrap-5(aliases:bootstrap5,bootstrap)bootstrap-4(alias:bootstrap4)
Primary Color Palette
Customize the primary color used across all table components including buttons, checkboxes, pagination, filter badges, and selection bars.Define colors for shades 50, 100, 200, 400, 500, 600, and 700. These map to CSS custom properties
--lt-primary-50 through --lt-primary-700. Works identically for both Tailwind and Bootstrap themes.Dark Mode
Enable dark mode support for data tables. When enabled, the package injects CSS that automatically styles tables for dark backgrounds whenever the configured selector is present on a parent element.Whether dark mode CSS is injected into the page
The CSS selector that activates dark mode. Common choices:
.dark- Tailwind default.lt-dark- Package default[data-bs-theme=dark]- Bootstrap 5.3body.dark-mode- Custom selector
Customize the dark mode color palette:
bg- Page/outer backgroundbg-card- Card/panel/table container backgroundbg-subtle- Subtle backgrounds (thead, stripes, hover)border- Borders and dividerstext- Primary text colortext-muted- Secondary/muted text color
Search Debounce
The debounce time in milliseconds for the search input. This delays the search request until the user stops typing for the given time.Recommended: 300-500 milliseconds for a smooth user experience without excessive server requests
Component Namespace
The subdirectory insideapp/Livewire/ where the make:livewiretable command will generate new table components.
Examples:
"Tables"generates inapp/Livewire/Tables/"DataTables"generates inapp/Livewire/DataTables/"Admin/Tables"generates inapp/Livewire/Admin/Tables/
Component Configuration
In addition to the global configuration file, each table component can override settings in itsconfigure() method. See the Methods Reference for all available configuration methods.