Compact Theme
Featured OfficialA theme that makes data-heavy panels easier to scan by fitting more useful information on each screen.
Author:
Filament
Package health
BetaAutomated checks of this plugin's Composer package
15 checks
- Skipped: GitHub Actions pinned to SHA
- Skipped: GitLab CI includes pinned to SHA
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Skipped: Dependabot or Renovate configured
- Skipped: Dependency update cooldown configured
- Passed: Provides a security policy
- Passed: Abandoned or archived — No consulted source marks the package abandoned (github).
- Passed: Commit and release recency — Active: last commit 0 days ago; no release date available.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
- Skipped: Current Laravel version supported
-
Passed:
Current PHP version supported
—
Constraint
^8.2supports current PHP8.5. - Skipped: Current Symfony version supported
Documentation
- Preview
- Installation
- Using another theme with the Compact Theme
- Configuration
- Customizing the theme
- Support
The Compact Theme makes data-heavy Filament panels easier to scan by fitting more useful information onto each screen. It is a good fit for operational dashboards, back-office tools and apps where people spend much of their day working with tables and forms.
It tightens rows, controls, cards and modals without changing your colors, fonts or icons. Mobile keeps Filament's default spacing, while a small set of customization tokens lets you tune the density and corner radii for your app.
#Preview
These previews follow your light or dark color scheme. Open either version at full size below each image.
| Orders | Edit product |
|---|---|
|
|
| Light · Dark | Light · Dark |
| Project overview | Edit department |
|
|
| Light · Dark | Light · Dark |
#Installation
After purchasing the Compact Theme, install it through Filament's Composer repository:
composer config repositories.filament composer https://packages.filamentphp.com/composer
composer config --auth http-basic.packages.filamentphp.com "YOUR_EMAIL_ADDRESS" "YOUR_LICENSE_KEY"
composer require filament/compact-theme
You can find your license key in your Filament Packages account.
Add the following imports to your panel's theme file, such as
resources/css/filament/admin/theme.css:
@import '../../../../vendor/filament/compact-theme/resources/css/layers.css';
@import '../../../../vendor/filament/filament/resources/css/theme.css';
@import '../../../../vendor/filament/compact-theme/resources/css/theme.css';
@source '../../../../app/Filament/**/*';
@source '../../../../resources/views/filament/**/*';
Then rebuild your assets:
npm run build
The layers.css import must come before Filament's CSS. If the theme does not
look right, run this in your browser console:
getComputedStyle(document.body).getPropertyValue('--compact-theme-layer-order')
The result should be ok.
#Using another theme with the Compact Theme
The Compact Theme can be used with the Sharp Theme, Soft Theme or Noir Theme. Add the other theme's import between Filament's CSS and the Compact Theme:
@import '../../../../vendor/filament/compact-theme/resources/css/layers.css';
@import '../../../../vendor/filament/filament/resources/css/theme.css';
@import '../../../../vendor/filament/sharp-theme/resources/css/theme.css';
@import '../../../../vendor/filament/compact-theme/resources/css/theme.css';
@source '../../../../app/Filament/**/*';
@source '../../../../resources/views/filament/**/*';
Replace sharp-theme with soft-theme or noir-theme as needed. The order of
the two theme imports does not matter.
#Configuration
The Compact Theme does not require any panel configuration. These Filament options can help you make better use of the available space.
#Show more table rows
Since more rows fit on the screen, you may want to increase the default page size:
use Filament\Tables\Table;
Table::configureUsing(fn (Table $table) => $table->defaultPaginationPageOption(25));
#Use compact table repeaters
Filament can make repeaters with a table layout even more compact:
use Filament\Forms\Components\Repeater;
Repeater::make('members')
->table([
// ...
])
->compact()
->schema([
// ...
])
#Use inline labels
Inline labels reduce the vertical space used by forms. You can enable them on a field, layout component or the whole form schema:
use Filament\Forms\Components\TextInput;
TextInput::make('name')
->inlineLabel()
#Hide secondary table columns
Keep less important columns available by making them toggleable and hidden by default:
use Filament\Tables\Columns\TextColumn;
TextColumn::make('updated_at')
->toggleable(isToggledHiddenByDefault: true)
#Use the full page width
Wide tables can use more of the available screen by removing the panel's maximum content width:
use Filament\Support\Enums\Width;
$panel->maxContentWidth(Width::Full)
#Use a sidebar-only layout
You can hide the topbar to give page content more vertical space:
$panel->topbar(false)
Filament places global search, the user menu and database notifications in the sidebar by default when the topbar is hidden.
#Collapse the sidebar
You can make the sidebar narrower and allow it to collapse to its icons:
$panel
->sidebarWidth('16rem')
->sidebarCollapsibleOnDesktop()
To let users hide it completely instead, use
sidebarFullyCollapsibleOnDesktop().
Choose one collapse mode:
$panel->sidebarFullyCollapsibleOnDesktop()
#Customizing the theme
Override these variables in your panel's theme file after the imports:
.fi-body {
--compact-theme-cell-py: 0.625rem;
--compact-theme-topbar-h: 3rem;
}
Compact uses the same token values in light and dark mode. An override on
.fi-body applies to both.
| Variable | Used for | Default |
|---|---|---|
--compact-theme-cell-py |
Table row height | 0.5rem |
--compact-theme-cell-px |
Horizontal table cell padding | 0.625rem |
--compact-theme-control-py |
Button and control height | 0.375rem |
--compact-theme-card-p |
Card and section padding | 1rem |
--compact-theme-topbar-h |
Topbar height | 3.5rem |
--compact-theme-radius-card |
Cards, sections, modals and widgets | 0.5rem |
--compact-theme-radius-control |
Buttons, inputs and dropdowns | 0.375rem |
To restore Filament's default page heading size:
.fi-header-heading {
font-size: var(--text-3xl);
}
#Support
If you encounter an issue or have a suggestion for improving the Compact Theme, please open an issue or discussion on the Compact Theme GitHub repository. You can get an invite by adding your GitHub username to your customer dashboard at packages.filamentphp.com. For account, purchase or license-related questions, email support@filamentphp.com.
The author
Filament is a powerful open source UI framework for Laravel, built with Livewire to help you ship apps & admin panels fast.
It includes a collection of beautifully designed, fully extensible components that handle the hard parts, so you can focus on what matters.
From the same author
Spatie Media Library
Filament support for Spatie's Laravel Media Library package.
Author:
Filament
Spatie Settings
Filament support for Spatie's Laravel Settings package.
Author:
Filament
Spatie Google Fonts
Filament support for Spatie's Laravel Google Fonts package.
Author:
Filament
Blueprint
Filament Blueprint is a premium Laravel Boost extension that helps AI agents produce accurate, detailed implementation plans and security reports for Filament apps.
Author:
Filament
Featured Plugins
A selection of plugins curated by the Filament team
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese
Noir Theme
A theme that gives panels a focused, refined look with near-black surfaces, crisp actions, and restrained color.
Filament