Skip to content

Create Navigation

Navigation is defined in YAML files. Each app has its own navigation configuration.

Noerd Example App

File Location

app-configs/{app}/navigation.yml

For example: app-configs/accounting/navigation.yml

yaml
- title: Accounting
  name: accounting
  hidden: true
  route: accounting-tool
  block_menus:
    - title: Customers
      navigations:
        - title: Customers
          route: 'customers'
          heroicon: 'users'
          newComponent: 'customer-detail'
        - title: Invoices
          route: 'invoices'
          heroicon: 'document-currency-euro'
    - title: Products
      navigations:
        - title: Products
          route: 'products'
          newComponent: 'product-detail'
          heroicon: 'archive-box'

Top-Level Properties

PropertyDescription
titleDisplay name of the app (translation key)
nameUnique identifier for the app
routeThe app's main route
hiddenHide the top-level menu item
block_menusGroups of navigation items (see below)
sub_menuOptional flat secondary menu

Block Properties (block_menus[])

PropertyDescription
titleBlock heading (translation key). Users can collapse a block; the state is kept in the session
navigationsThe entries of the block (see below)
routeA block with a route and no navigations renders as a single top-level entry
heroiconIcon for the single-entry form
stylelist (default) or buttons — renders the block's entries as buttons
dynamicProvider type resolved through the DynamicNavigationRegistry — the block's entries are generated at runtime (e.g. the Setup collections). See Extension Registries

Entry Properties (navigations[])

PropertyDescription
titleDisplay name (translation key)
routeLaravel route name — the entry NAVIGATES there (and drives the active-state highlight)
linkPlain URL (/… or absolute) instead of a named route
externalOpens the target in a new tab and shows an external-link icon
heroiconIcon from Heroicons (e.g., users, cog-6-tooth)
iconAlternative: a noerd blade icon component name (e.g. icons.media)
modalRouteNamed route opened as a MODAL instead of navigating
componentLivewire component opened as a modal — fallback for modalRoute
argumentsArguments passed to the modal component
newRouteNamed detail route opened as a modal by the "+" button (preferred)
newComponentLivewire component opened by the "+" button — fallback for newRoute
quickCreateWith newRoute/newComponent: open the "+" target as a narrow quick-create modal (modelId: null, quickCreate: true)
configThe entry is hidden unless config(...) with this key is truthy (e.g. noerd.features.currency)
superAdminThe entry is only visible to super admins

Route vs. component

route: always means navigate to that page. To open something as a modal, use the separate keys:

yaml
- title: Accounts
  route: crm.accounts          # the list page this entry links to
  newRoute: crm.account.detail # the "+" button opens /crm/account/new?modal=true
  newComponent: crm::account-page  # fallback when the route is not registered
  heroicon: 'building-office'

newRoute:/modalRoute: win when the named route is registered; the *Component key is used otherwise, so an entry may reference a route owned by an optional module. See Modal System for when a route is the right target.

Entries are filtered by target existence

An entry whose target cannot be resolved is silently dropped: a route:/modalRoute: must be a registered route (link: and component: always pass). This keeps navigation YAMLs valid when an optional module that owns the route is not installed — stale entries simply disappear instead of breaking the sidebar.

Full Example

app-configs/accounting/navigation.yml

yaml
- title: Accounting
  name: accounting
  hidden: true
  route: accounting-tool
  block_menus:
    - title: Customers
      navigations:
        - title: Customers
          route: 'customers'
          heroicon: 'users'
          newComponent: 'customer-detail'
        - title: Invoices
          route: 'invoices'
          heroicon: 'document-currency-euro'
    - title: Finances
      navigations:
        - title: Bank Accounts
          route: 'accounting.bank-accounts'
          heroicon: 'building-library'
          newComponent: 'bank-account-detail'
        - title: Bank Transactions
          route: 'accounting.bank-transactions'
          heroicon: 'banknotes'
    - title: Settings
      navigations:
        - title: Settings
          route: 'accounting-settings'
          heroicon: 'cog-6-tooth'

Next Steps

Continue with Create a List View to display data in tables.