Components
Sidebar
Sidebars are a form of navigation. They provide access to primary content
Selected Theme
Select brand or tribe name to preview style
Default
Usage
A spinner component to display a loading state of a page or section.
import { SidebarNavLink } from 'legion-ui';
Variant
Legion have 2 variant of sidebar
Basic
<Navbar variant="fixed" mode="dark" isBordered><NavbarBrand><Heading size="h3" color="primary500">Legion</Heading><NavbarToggle onClick={() => setActiveToggle(!activeToggle)} /></NavbarBrand></Navbar><SidebarNavLink listItems={[
With Sub Menu
<Navbar variant="fixed" mode="dark"><NavbarBrand style={{display: 'flex', alignItem: 'center'}}><Heading size="h3" color="primary500">Legion</Heading><NavbarToggle onClick={() => setActiveToggle(!activeToggle)} /></NavbarBrand></Navbar><SidebarNavLink listItems={[
Props
Sidebar NavLink
property | propType | required | default | description |
---|---|---|---|---|
children | React.ReactNode | - | - | Pass all the necessary components here as a header slot |
listItems | Array of Object | yes | - | Pass all the menu list as array of object with the following listItems[key]: |
List Item
property | propType | required | default | description |
---|---|---|---|---|
route | string | - | - | Sets menu icon |
icon | IconName from react-feather | - | - | Sets menu link |
title | string | yes | - | Sets menu title |
isParent | boolean | - | - | Sets menu as parent menu |
submenuItems | Array of Object | - | - | Sets submenu items when isParent is true, fill submenuItems with Array of Object contains icon, route, and title. |
Do you have feedback?
Please let us know to make it better