Navigation
Navigation types
Section titled “Navigation types”Coolsam\FilamentChrome\Enums\NavigationType decides where each navigation level lives.
Filament’s native depth stays three levels (group → item → child).
| Type | Level 1 | Levels 2–3 |
|---|---|---|
NavigationType::Side |
Sidebar | Sidebar |
NavigationType::Top |
Top bar | Top bar (desktop sidebar offcanvas) |
NavigationType::App |
Sidebar | Top bar (children of the active level-1 item) |
NavigationType::AppInverse |
Top bar | Sidebar (children of the active level-1 item; offcanvas when none) |
use Coolsam\FilamentChrome\Enums\NavigationType;
FilamentChromePlugin::make()->navigationType(NavigationType::AppInverse);Shorthand helpers
Section titled “Shorthand helpers”Each case has a fluent shorthand that sets exactly the same state as passing the enum:
| Helper | Equivalent |
|---|---|
->navigationTypeSide() |
->navigationType(NavigationType::Side) |
->navigationTypeTop() |
->navigationType(NavigationType::Top) |
->navigationTypeApp() |
->navigationType(NavigationType::App) |
->navigationTypeAppInverse() |
->navigationType(NavigationType::AppInverse) |
Resolution order: theme switcher override (when enabled) → explicit ->navigationType() →
theme defaultNavigationType() → App.
Top uses Filament’s own topNavigation() body class, so the panel behaves like a stock
top-navigation panel. App and App Inverse keep a sidebar column.
Side-nav mode
Section titled “Side-nav mode”Coolsam\FilamentChrome\Enums\SideNavMode controls multi-level sidebar trees:
SideNavMode::Accordion(default) — groups are exclusive; opening one closes the others.SideNavMode::Static— groups stay expanded.
use Coolsam\FilamentChrome\Enums\SideNavMode;
->sideNavMode(SideNavMode::Static)// or->sideNavModeStatic()// or->navigationAccordion(false)
->sideNavModeAccordion() // same as ->sideNavMode(SideNavMode::Accordion)Resolution order: theme switcher override (when enabled) → explicit ->sideNavMode() /
->navigationAccordion() → theme defaultSideNavMode() → Accordion.
Where it applies:
- Side and App Inverse desktop sidebars honor it.
- App desktop level-1 lists ignore it.
- Top never uses it — topbar dropdowns and the Top mobile tree are always nested accordions.
- Mobile drawers always use an accordion drawer.
In Static mode, Filament’s collapsible() / collapsed() groups keep working with
Filament’s persisted filament:sidebar:collapsed_groups state. In Accordion mode the
active group opens and the rest stay closed; collapsible(false) groups are always expanded.
Treeline
Section titled “Treeline”Treelines are the optional rail-and-tick connectors drawn beside nested navigation.
Resolution order:
- Theme switcher override (when enabled)
- Explicit
->treeline(true|false)on the plugin - Theme
defaultTreeline()when non-null - Resolved side-nav mode: Accordion → on, Static → off
| Setting | Treeline |
|---|---|
SideNavMode::Accordion (default) |
shown |
SideNavMode::Static |
hidden |
->treeline(true) / ->treeline(false) |
forced on / off (wins) |
->sideNavMode(SideNavMode::Static) // treeline off by default->treeline(true) // force connectors back onThe resolved flag applies globally, including Top dropdowns and the “More” overflow menu.
In markup it is exposed as data-fi-chrome-treeline and .fi-chrome-nav--treeline.
Offcanvas sidebar
Section titled “Offcanvas sidebar”- Top hides the desktop sidebar column, matching Filament’s
topNavigation(). - App Inverse hides it only when the active level-1 item has no children and the
sidebar holds nothing else. A sidebar render hook (
SIDEBAR_START,SIDEBAR_NAV_START,SIDEBAR_NAV_END,SIDEBAR_FOOTER), the tenant menu, sidebar global search, or a sidebar user menu / database notifications keeps the column docked.
Collapsed sidebar
Section titled “Collapsed sidebar”When the desktop sidebar is collapsed to a rail, level-1 items render as centered icon
tiles. Groups and items with children open a flyout (Filament’s
<x-filament::dropdown teleport>), and navigation badges stay visible as compact pills — or
as a presence dot on a flyout trigger whose descendants carry badges.