rawilk/filament-inner-nav
Adds in-page inner navigation to Filament panels, rendering anchor links that let users jump between sections of long forms or content pages. Configure nav items and styling to keep large pages easy to scan and navigate.
Install and register
composer require rawilk/filament-inner-nav
php artisan vendor:publish --tag="filament-inner-nav:config" # if config is offered
php artisan vendor:publish --tag="filament-inner-nav:views" # only if you need to override markup
php artisan filament:assets # required in v1.1.1 — CSS is no longer global
Look here first
README.md — the component/trait name and the exact prop signature move between minor versions; copy the snippet rather than guessing.resources/views/ — the published markup is the fastest way to understand how the nav is structured and which Tailwind/Filament classes drive the sticky layout.config/filament-inner-nav.php — defaults for sticky offset, active-item behaviour, and (from v1.1.1) CSS/asset registration.src/ — check whether the package exposes a Filament render hook, a panel plugin, or a plain Blade component; that determines where you mount it.First use case: a long EditSettings / EditProfile custom page with 4–8 logical sections. Drop the inner nav into a two-column layout next to the form so users can jump between "General", "Notifications", "Billing", etc., with the active section highlighting as they scroll.
Mount inside a custom page, not the panel
The nav is page-scoped by design. Give your custom Filament page a Blade view and render the package component there, inside the page's grid wrapper:
<x-filament-panels::page>
<div class="grid gap-6 lg:grid-cols-[16rem_minmax(0,1fr)]">
<aside class="hidden lg:block">
<x-filament-inner-nav::inner-nav :items="$this->getInnerNavItems()" />
</aside>
<div class="space-y-8">
<section id="general" class="scroll-mt-24">…</section>
<section id="notifications" class="scroll-mt-24">…</section>
</div>
</div>
</x-filament-panels::page>
Define items once, in PHP
Keep anchor IDs and labels in a single method or config array so the nav and the section markup can never drift:
public function getInnerNavItems(): array
{
return [
['id' => 'general', 'label' => __('General')],
['id' => 'notifications', 'label' => __('Notifications')],
['id' => 'billing', 'label' => __('Billing')],
];
}
If the package supports auto-discovery of headings, prefer it for content-style pages and manual items for form pages — auto-discovery of <h2>s breaks the moment a section heading is hidden behind a @if.
Sticky behaviour + anchor offset
Two independent knobs, both needed:
sticky top-<topbar height> in your layout (Tailwind, not the package).scroll-mt-24 (or whatever your topbar is) — otherwise the anchored section lands under the fixed topbar and looks broken.Livewire / SPA navigation
The scroll-spy listener and any intersection observers must be re-initialised after wire:navigate and after Livewire morphs. Wrap the nav in wire:ignore when its items are static, and re-init on livewire:navigated:
document.addEventListener('livewire:navigated', () => initInnerNav());
Custom Filament theme
If the panel uses ->viteTheme(...), the on-demand asset loader from v1.1.1 may not be the only CSS path — add the package's stylesheet to your theme's resources/css/filament/admin/theme.css so the nav styles survive your own build:
@import '../../../../vendor/rawilk/filament-inner-nav/resources/dist/filament-inner-nav.css';
Run npm run build afterwards. This is also the safest route if you publish and rewrite the views.
composer update, run php artisan filament:assets and php artisan view:clear. If the nav renders unstyled, that's almost always a missing asset publish or a cached asset manifest, not a broken install. Check the browser network tab for the package CSS file first.overflow-hidden is fatal. Any ancestor with overflow: hidden / overflow-x-auto kills position: sticky with no error. Filament's table wrappers and some widget containers do this — check the ancestor chain before rewriting your CSS.lg unless you add a fallback (a <select> jump menu or an accordion). A sticky sidebar on a 375px viewport eats the form.vendor/ will be wiped on the next composer update; publish the views into resources/views/vendor/filament-inner-nav/ instead.scroll-mt set on targets.tailwindcss 3.3.3 → 3.3.5, git-auto-commit-action 4 → 5) are build/CI-only and require nothing from consuming applications.How can I help you explore Laravel packages today?