Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 771 Bytes

README.md

File metadata and controls

47 lines (30 loc) · 771 Bytes

<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