mip-sidebar sidebar
mip-sidebar sidebar component.
Example
Basic usage
<header> <div id="hamburger" class="mip-button" on="tap:sidebar.open"> <div id="logo" href="/">Open mip-sidebar</div> </div> </header> <mip-sidebar id='sidebar' layout="nodisplay" class="mip-hidden"> <ul> <li> <mip-link href="#">Home</mip-link> <button class="mip-button" on="tap:sidebar.close"> X </button> </li> <li> Nav item 1</li> <li> <mip-fit-text width="220" height="20" layout="responsive" max-font-size="24"> Nav item 2 - <mip-fit-text> </mip-fit-text> </li> <li> <mip-fit-text width="220" height="20" layout="responsive" max-font-size="24"> Nav item 3 - <mip-fit-text> longer text </mip-fit-text> </li> <li> Nav item 4 - Image <mip-img class='mip-sidebar-image' src="http://placeholder.qiniudn.com/100x50" width="20" height="20" alt="an image"></mip-img> </li> <li> Nav item 5</li> <li> Nav item 6</li> </ul> </mip-sidebar>
Right sidebar
<header> <div id="hamburger" class="mip-button" on="tap:right-sidebar.open"> <div id="logo" href="/">Open mip-sidebar</div> </div> </header> <mip-sidebar id='right-sidebar' layout="nodisplay" side="right" class="mip-hidden"> <ul> <li> <mip-link href="#">Home</mip-link> <button class="mip-button" on="tap:right-sidebar.close"> X </button> </li> <li> Nav item 1</li> <li> <mip-fit-text width="220" height="20" layout="responsive" max-font-size="24"> Nav item 2 - <mip-fit-text> </mip-fit-text> </li> <li> <mip-fit-text width="220" height="20" layout="responsive" max-font-size="24"> Nav item 3 - <mip-fit-text> longer text </mip-fit-text> </li> <li> Nav item 4 - Image <mip-img class='mip-sidebar-image' src="http://placeholder.qiniudn.com/100x50" width="20" height="20" alt="an image"></mip-img> </li> <li> Nav item 5</li> <li> Nav item 6</li> </mip-sidebar>
Attributes
id
Description: id
Required: Yes
Format: String
Unit: None
Default value: None
Usage restrictions: None
layout
Description: layout setting
Required: Yes
Format: string
Unit: None
Value: nodisplay
side
Description: Sidebar position setting, left or right
Required: No
Format: String
Unit: None
Value: left, right
Default value: left