Appearance
jio-navbar
Props
| Prop name | Description | Type | Values | Default |
|---|---|---|---|---|
| title | The title of the navbar or screen | string | - | "Demo" |
| fluid | The container type wether it should be fluid or not. | boolean | true, false | true |
| theme | The theme color palette of the navbar | string | primary, secondary, base | "primary" |
| searchEnabled | Should search be enabled? | boolean | true, false | false |
Slots
| Name | Description | Bindings |
|---|---|---|
| mobile-search-icon | ||
| brand | Place organisation name or branding text inside me | |
| nav-list | Place <li></li> items or components inside me | |
| nav-list-bottom | Place <li></li> items or components inside me |
General
This is the standard navbar.
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);Navbar Screen Title and back button
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"),
},
],
});