Skip to content

fxos-components/gaia-drawer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<gaia-drawer>

Installation

$ bower install gaia-components/gaia-drawer

Usage

<script src="bower_components/gaia-drawer/script.js"></script>
<gaia-drawer>
  <p>Some content hidden in the drawer</p>
</gaia-drawer>

Attributes

  • open - Forces the drawer open.

API

GaiaDrawer#open()

Open the drawer.

GaiaDrawer#close()

Close the drawer.

GaiaDrawer#toggle([state])

Toggle the drawer open/closed. Similar classList.toggle(), if you pass a boolean, that will override the current state.

drawer.toggle(); //=> will toggle
drawer.toggle(true); //=> will always open
drawer.toggle(false); //=> will always close

Examples