Toolbar is a fixed area at the bottom (or top) of a screen that contains navigation elements. Toolbar does not have any parts, just plain links inside
There are following components included:
Toolbar
Name | Type | Default | Description |
---|---|---|---|
bgClass | string | Additional class to add on Toolbar's "background" element | |
colors | object | Object with Tailwind CSS colors classes | |
colors.bgIos | string | 'bg-gradient-to-t from-ios-light-surface to-transparent dark:from-ios-dark-surface/50' | |
colors.bgMaterial | string | 'bg-md-light-surface-2 dark:bg-md-dark-surface-2' | |
colors.tabbarHighlightBgIos | string | '' | |
colors.tabbarHighlightBgMaterial | string | 'bg-md-light-primary dark:bg-md-dark-primary' | |
component | string | 'div' | Component's HTML Element |
innerClass | string | Additional class to add on Toolbar's "inner" element | |
outline | boolean | undefined | Material theme only: Renders outer hairlines (borders) |
tabbar | boolean | false | Enables tabbar, same as using |
tabbarIcons | boolean | false | Enables tabbar with icons, same as using |
tabbarLabels | boolean | false | Enables tabbar with labels, same as using |
top | boolean | false | Enables top toolbar, in this case it renders border on shadows on opposite sides |
<template><k-page><k-navbar title="Toolbar" /><k-toolbarv-if="isTop"top:class=="`left-0 ios:top-safe-15 ios:mt-1 material:top-safe-16 sticky w-full`"><k-toolbar-pane><k-link>Link 1</k-link><k-link>Link 2</k-link></k-toolbar-pane><k-toolbar-pane><k-link>Link 3</k-link></k-toolbar-pane></k-toolbar><k-block strong inset class="space-y-4"><p>Toolbar supports both top and bottom positions. Click the followingbutton to change its position.</p><p><k-button rounded @click="() => (isTop = !isTop)">Toggle Toolbar Position</k-button></p></k-block><k-block strong inset class="space-y-4"><p>Mauris fermentum neque et luctus venenatis. Vivamus a sem rhoncus,ornare tellus eu, euismod mauris. In porta turpis at semper convallis.Duis adipiscing leo eu nulla lacinia, quis rhoncus metus condimentum.Etiam nec malesuada nibh. Maecenas quis lacinia nisl, vel posuere dolor.Vestibulum condimentum, nisl ac vulputate egestas, neque enim dignissimelit, rhoncus volutpat magna enim a est. Aenean sit amet ligula neque.Cras suscipit rutrum enim. Nam a odio facilisis, elementum tellus non,tortor. Pellentesque felis eros, dictum vitae lacinia quis, lobortisvitae ipsum. Cras vehicula bibendum lorem quis imperdiet.</p><p>In hac habitasse platea dictumst. Etiam varius, ante vel ornarefacilisis, velit massa rutrum dolor, ac porta magna magna lacinia nunc.Curabitur cursus laoreet. Aenean vel tempus augue. Pellentesque inimperdiet nibh. Mauris rhoncus nulla id sem suscipit volutpat.Pellentesque ac arcu in nisi viverra pulvinar. Nullam nulla orci,bibendum sed ligula non, ullamcorper iaculis mi. In hac habitasse plateadictumst. Praesent varius at nisl eu luctus. Cras aliquet porta est.Quisque elementum quis dui et consectetur. Cum sociis natoque penatibuset magnis dis parturient montes, nascetur ridiculus mus. Sed sed laoreetpurus. Pellentesque eget ante ante.</p><p>Duis et ultricies nibh. Sed facilisis turpis urna, ac imperdiet eratvenenatis eu. Proin sit amet faucibus tortor, et varius sem. Etiam vitaelacinia neque. Aliquam nisi purus, interdum in arcu sed, ultrices rutrumarcu. Nulla mi turpis, consectetur vel enim quis, facilisis viverra dui.Aliquam quis convallis tortor, quis semper ligula. Morbi ullamcorpermassa at accumsan. Etiam purus odio, posuere in ligula vitae, viverraultricies justo. Vestibulum nec interdum nisi. Aenean ac consecteturvelit, non malesuada magna. Sed pharetra vehicula augue, vel venenatislectus gravida eget. Curabitur lacus tellus, venenatis eu arcu in,interdum auctor nunc. Nunc non metus neque. Suspendisse viverra lectussed risus aliquet, vel accumsan dolor feugiat.</p></k-block><k-toolbar v-if="!isTop" :class=="`left-0 sticky bottom-0 w-full mt-auto`"><k-toolbar-pane><k-link>Link 1</k-link><k-link>Link 2</k-link></k-toolbar-pane><k-toolbar-pane><k-link>Link 3</k-link></k-toolbar-pane></k-toolbar></k-page></template><script>import { ref } from 'vue';import {kPage,kNavbar,kNavbarBackLink,kToolbar,kLink,kBlock,kButton,kToolbarPane,} from 'konsta/vue';export default {components: {kPage,kNavbar,kNavbarBackLink,kToolbar,kLink,kBlock,kButton,kToolbarPane,},setup() {const isTop = ref(false);return {isTop,};},};</script>