Menu List is an extension of List View. Menu List unlike usual links list is designed to indicate currently active screen (or section) of your app. Think about it like a Tabbar but in a form of a list.
There are following components included:
MenuList
- menu list componentMenuListItem
- menu list item elementMenuList
component doesn't have specific props, but as it extends List
component, it supports all List
props
MenuListItem
component extends ListItem
component, it supports all ListItem
props, ListItem
slots and the following additional props:
Name | Type | Default | Description |
---|---|---|---|
active | boolean | false | Makes menu list item highlighted (active) |
href | string | boolean | Menu list item link's | |
subtitle | string | Content of the menu list item "subtitle" area |
<template><k-page><k-navbar title="Menu List" /><k-block strong><p>Menu list unlike usual links list is designed to indicate currentlyactive screen (or section) of your app. Think about it like a Tabbar butin a form of a list.</p></k-block><k-menu-list><k-menu-list-itemtitle="Home":active="selected === 'home'"@click="() => (selected = 'home')"><template #media><demo-icon /></template></k-menu-list-item><k-menu-list-itemtitle="Profile":active="selected === 'profile'"@click="() => (selected = 'profile')"><template #media><demo-icon /></template></k-menu-list-item><k-menu-list-itemtitle="Settings":active="selected === 'settings'"@click="() => (selected = 'settings')"><template #media><demo-icon /></template></k-menu-list-item></k-menu-list><k-menu-list><k-menu-list-itemtitle="Home"subtitle="Home subtitle":active="selectedMedia === 'home'"@click="() => (selectedMedia = 'home')"><template #media><demo-icon /></template></k-menu-list-item><k-menu-list-itemtitle="Profile"subtitle="Profile subtitle":active="selectedMedia === 'profile'"@click="() => (selectedMedia = 'profile')"><template #media><demo-icon /></template></k-menu-list-item><k-menu-list-itemtitle="Settings"subtitle="Settings subtitle":active="selectedMedia === 'settings'"@click="() => (selectedMedia = 'settings')"><template #media><demo-icon /></template></k-menu-list-item></k-menu-list></k-page></template><script>import { ref } from 'vue';import {kPage,kNavbar,kNavbarBackLink,kBlock,kMenuList,kMenuListItem,} from 'konsta/vue';import DemoIcon from '../components/DemoIcon.vue';export default {components: {kPage,kNavbar,kNavbarBackLink,kBlock,kMenuList,kMenuListItem,DemoIcon,},setup() {const selected = ref('home');const selectedMedia = ref('home');return {selected,selectedMedia,};},};</script>