northwestern-sysdev/northwestern-filament-theme
composer require northwestern-sysdev/northwestern-filament-theme
Register the plugin in your Filament panel provider:
use Northwestern\FilamentTheme\NorthwesternTheme;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
NorthwesternTheme::make(),
// ... other plugins
])
// ... rest of panel config
;
}
Then publish the theme assets:
php artisan filament:assets
[!NOTE]
If your panel has a custom theme via
->viteTheme(), it will continue to work alongside this plugin. The Northwestern theme is an additive CSS layer registered separately through Filament's asset system. It does not replace your custom theme.
You can also import the theme directly into your panel's Vite-compiled stylesheet instead of loading it as a separate <link> tag. This gives you a single compiled CSS bundle, access to Northwestern design tokens as Tailwind v4 utility classes (e.g., bg-nu-purple-100, text-nu-gold), and the ability to override specific theme styles in your own CSS.
Run the install command:
php artisan northwestern-theme:install
This will:
@import after the Filament base importThen disable automatic asset registration in your panel provider to prevent the CSS from loading twice:
NorthwesternTheme::make()
->withoutAssetRegistration()
Finally, compile your assets:
npm run build
When you opt in to design tokens during northwestern-theme:install, the plugin provides Northwestern colors as Tailwind v4 utility classes:
<div class="bg-nu-purple-100 text-white">Purple background</div>
<span class="text-nu-gold">Gold accent text</span>
<div class="border border-nu-black-20">Subtle border</div>
Available token groups:
| Group | Examples |
|---|---|
| Purple scale | nu-purple-10 through nu-purple-160 |
| Grays | nu-black-10, nu-black-20, nu-black-50, nu-black-80, nu-black-100 |
| Brand colors | nu-green, nu-teal, nu-blue, nu-yellow, nu-gold, nu-orange |
| Dark brand colors | nu-dark-green, nu-dark-teal, nu-dark-blue, etc. |
| Semantic colors | nu-success, nu-info, nu-warning, nu-danger |
[!NOTE]
Design tokens require Tailwind CSS v4+ (they use the
@themesyntax). The core theme CSS works with any Tailwind version.
The theme adapts to Filament's dark mode setting automatically. No extra configuration needed.
The plugin automatically sets a Northwestern favicon and brand logo when the panel has not already configured them. If you call ->favicon() or ->brandLogo() on your panel, your values take precedence.
The brand logo is resolved in the following order:
->brandLogo() (if set, the plugin does not override it)config('northwestern-theme.lockup') (from northwestern-sysdev/northwestern-laravel-ui, if installed)If your application uses northwestern-sysdev/northwestern-laravel-ui, the northwestern-theme.lockup config value is already published for you. The Filament theme plugin reads it automatically.
The theme includes a built-in environment indicator that displays a gold badge in the topbar and a colored top-border on non-production environments. This is enabled by default.
The indicator automatically hides in production and on small screens.
NorthwesternTheme::make()
->withoutEnvironmentIndicator()
To control when the indicator appears (e.g., only for admins):
NorthwesternTheme::make()
->environmentIndicator(
visible: fn () => ! app()->isProduction() && auth()->user()?->hasRole('admin'),
)
By default, the badge reads "Environment: Local" (or whatever APP_ENV is set to). To customize:
NorthwesternTheme::make()
->environmentIndicator(label: Str::upper(App::environment()))
[!NOTE]
If you are using
pxlrbt/filament-environment-indicator, you can remove that package. RemoveEnvironmentIndicatorPlugin::make()from your panel provider and the theme handles the rest.
The theme includes a built-in impersonation banner that renders a red bar above the topbar when a user is being impersonated. It is registered by default and shows automatically when lab404/laravel-impersonate is installed and an impersonation session is active. Without lab404, the banner will not appear unless you provide a custom visible closure.
If you are not using lab404/laravel-impersonate, or want to override the default detection, provide your own visibility logic:
NorthwesternTheme::make()
->impersonationBanner(
visible: fn () => session()->has('impersonating'),
)
NorthwesternTheme::make()
->impersonationBanner(
label: fn () => 'Acting as ' . auth()->user()->name,
)
NorthwesternTheme::make()
->impersonationBanner(
leaveUrl: '/my-app/stop-impersonating',
)
NorthwesternTheme::make()
->impersonationBanner(
leaveLabel: 'Return to Admin',
)
The leave form defaults to POST. If your leave endpoint expects a different HTTP method:
NorthwesternTheme::make()
->impersonationBanner(
leaveUrl: '/my-app/stop-impersonating',
leaveMethod: 'DELETE',
)
NorthwesternTheme::make()
->withoutImpersonationBanner()
[!NOTE]
If your application has a custom impersonation banner registered, remove it when enabling the built-in banner to avoid duplicates. A warning is logged in local environments when both are detected.
The footer is disabled by default. Your application may have multiple Filament panels, some internal where a footer would just be noise, others end-user-facing where institutional branding matters. You opt in per panel by chaining ->footer():
NorthwesternTheme::make()
->footer()
This renders Northwestern branding, legal links, office contact info, and social media links.
Office contact details displayed in the footer are resolved in the following order:
->footer() (see below)config('northwestern-theme.office.*') values (from northwestern-sysdev/northwestern-laravel-ui, if installed)If your application already has northwestern-sysdev/northwestern-laravel-ui installed, the footer will pick up office.name, office.addr, office.city, office.phone, and office.email automatically.
To override specific fields:
NorthwesternTheme::make()
->footer(
officeName: 'My Office',
officeAddr: '633 Clark St',
officeCity: 'Evanston, IL 60208',
officePhone: '847-555-1234',
officeEmail: 'my-office@northwestern.edu',
)
Pass enabled: false or a closure that returns a boolean:
NorthwesternTheme::make()
->footer(enabled: false)
NorthwesternTheme::make()
->footer(enabled: fn () => auth()->user()?->isStudent())
To modify the environment indicator, impersonation banner, or footer markup, publish the views:
php artisan vendor:publish --tag=northwestern-filament-theme-views
This publishes the following templates to resources/views/vendor/northwestern-filament-theme/:
environment-indicator.blade.php — the topbar badge and borderimpersonation-banner.blade.php — the impersonation session bannerfooter.blade.php — the institutional footerThis theme loads fonts, icons, the favicon, and the default brand logo from Northwestern's CDN (common.northwestern.edu). Your application needs network access to this CDN at runtime. If your environment restricts outbound requests or enforces a strict CSP, allowlist https://common.northwestern.edu.
See UPGRADING.md for migration guides between major versions.
The MIT License (MIT). Please see LICENSE for more information.
How can I help you explore Laravel packages today?