Skip to content

jio-navbar

Props

Prop nameDescriptionTypeValuesDefault
titleThe title of the navbar or screenstring-"Demo"
fluidThe container type
wether it should be fluid or not.
booleantrue, falsetrue
themeThe theme color palette of the navbarstringprimary, secondary, base"primary"
searchEnabledShould search be enabled?booleantrue, falsefalse

Slots

NameDescriptionBindings
mobile-search-icon
brandPlace organisation name or branding text inside me
nav-listPlace <li></li> items or components inside me
nav-list-bottomPlace <li></li> items or components inside me

View on Gitlab

General

This is the standard navbar.

View navbar design in Figma

View hamburger menu design in Figma

Code example

Jio Navbar uses scss variables $jio-palette-primary and $jio-palette-secondary to set the theme colors. The default theme is primary. The theme can be changed by setting the theme prop to secondary.

The example below uses a project veriables.scss overwriting default scss variables as follows:

scss
// src/scss/variables.scss
$jio-palette-primary: meta.get-function(jio-palette-robijnrood);
$jio-palette-secondary: meta.get-function(jio-palette-hemelblauw);




In order to load the preferred title for the current route in the jio-navbar component, the meta property title is used. In order for jio-navbar component to determine wether the current route is a leaf route, the meta property isLeaf is used. The isLeaf property is used to determine wether the back button should be shown or not instead of the hamburger.

ts
// src/router/index.ts

const router = createRouter({
  ...,
  routes: [
    {
      path: "/failure/:id",
      name: "failure-detail",
      props: true,
      meta: {
        title: "Meldingen",
        isLeaf: true,
      },
      component: () => import("../views/FailureDetailView.vue"),
    },
  ],
});