Resource navigation
Resource / page fields
Section titled “Resource / page fields”static override navigationGroup = 'Content'static override navigationSubGroup = 'Catalog'static override navigationSort = 10/** Short name or full Blade-icons id (`heroicon-o-…`, `heroicon-s-…`, `heroicon-m-…`). */static override icon = 'heroicon-o-cube'// static override icon = 'cube' // same as heroicon-o-cubestatic override navigationHidden = falseNavigation items are merged with Pages and media library entries.
Icons resolve through Shamar’s Blade Icons–style registry (Heroicons by default). Short names become heroicon-o-{name}. Full ids keep their stack prefix. Register another set later with Icons.add('fontawesome', { prefix: 'fas', path: '…' }) for names like fas-user.
Panel navigation type (Firefly parity)
Section titled “Panel navigation type (Firefly parity)”Prefer the NavigationType const for IDE autocomplete. String literals remain accepted for backward compatibility.
import { panel, NavigationType } from '@shamar/adonis'
panel('admin') .navigationType(NavigationType.APP) // default: L1 groups in sidebar; active children in top bar // .navigationType(NavigationType.APP_INVERSE) // or NavigationType.INVERSE / 'app_inverse' // .navigationType(NavigationType.SIDE) // accordion by default; NavigationType.SIDEBAR is the same // .navigationAccordion(false) // always-open SIDE groups // .navigationType(NavigationType.TOP) // or .topNavigation()| Const / value | Level 1 | Levels 2–3 |
|---|---|---|
NavigationType.APP ('app', default) |
Sidebar | Top bar (active L1 children; nested = dropdowns) |
NavigationType.APP_INVERSE / INVERSE ('inverse' / 'app_inverse') |
Top bar | Sidebar |
NavigationType.SIDE / SIDEBAR ('side' / 'sidebar') |
Sidebar (accordion groups by default; navigationAccordion(false) keeps them open) |
Sidebar |
NavigationType.TOP ('top') |
Top bar (groups as nested dropdowns) | Top bar |
Desktop vs mobile
Section titled “Desktop vs mobile”Desktop keeps the Firefly layout from navigationType (including TOP’s offcanvas sidebar and More overflow when the top-bar row overflows).
On narrow viewports the top item row is hidden and the hamburger always opens a sidebar drawer with the full tree as accordion groups, regardless of desktop APP / TOP / SIDE / INVERSE. Desktop sideNavMode (static vs accordion) does not change that mobile drawer.