Drawers are flexible containers anchored to the top, right, bottom, or left of the screen. They are used primarily in Chi for displaying menus on small devices.
<div class="m-drawer -left -active">
<div class="m-drawer__header">
<button class="a-btn -icon -close">
<div class="a-btn__content">
<i class="a-icon icon-x"></i>
</div>
</button>
</div>
<div class="m-drawer__content">
<div class="-px--2 -text">Drawer content here</div>
</div>
</div>
<div class="m-drawer -right -active">
<div class="m-drawer__header">
<button class="a-btn -icon -close">
<div class="a-btn__content">
<i class="a-icon icon-x"></i>
</div>
</button>
</div>
<div class="m-drawer__content">
<div class="-px--2 -text">Drawer content here</div>
</div>
</div>
<div class="m-drawer -top -active">
<div class="m-drawer__header">
<button class="a-btn -icon -close">
<div class="a-btn__content">
<i class="a-icon icon-x"></i>
</div>
</button>
</div>
<div class="m-drawer__content">
<div class="-px--2 -text">Drawer content here</div>
</div>
</div>
<div class="m-drawer -bottom -active">
<div class="m-drawer__header">
<button class="a-btn -icon -close">
<div class="a-btn__content">
<i class="a-icon icon-x"></i>
</div>
</button>
</div>
<div class="m-drawer__content">
<div class="-px--2 -text">Drawer content here</div>
</div>
</div>
An optional backdrop can be added to focus the users attention on drawer content.
<div class="a-backdrop">
<div class="m-drawer -bottom -active">
<button class="a-btn -icon -close">
<div class="a-btn__content">
<i class="a-icon icon-x"></i>
</div>
</button>
<div class="m-drawer__content -d--flex -align-items--center -justify-content--center">
<div class="-px--2 -text">Drawer content here</div>
</div>
</div>
</div>
Header markup is optional. Remove it to make the content fill the drawer.
<div class="a-backdrop">
<div class="m-drawer -left -active">
<div class="m-drawer__header">
<button class="a-btn -icon -close">
<div class="a-btn__content">
<i class="a-icon icon-x"></i>
</div>
</button>
</div>
<div class="m-drawer__content">
<div class="-px--2 -text">Drawer content here</div>
</div>
</div>
</div>
<div class="a-backdrop">
<div class="m-drawer -left -active">
<button class="a-btn -icon -close">
<div class="a-btn__content">
<i class="a-icon icon-x"></i>
</div>
</button>
<div class="m-drawer__content">
<div class="-px--2 -text">Drawer content here</div>
</div>
</div>
</div>