npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ivanvanderbyl/ember-material-components-drawer

v0.77.1-alpha.2

Published

ember-cli addon for @material/drawer.

Downloads

3

Readme

@ivanvanderbyl/ember-material-components-drawer

ember-cli addon for @material/drawer.

Installation

ember install @ivanvanderbyl/ember-material-components-drawer

Components and Mixins

Top-Level Components

Other Topics

{{mdc-drawer}}

Description

Add a side drawer component to the page.

Usage

{{#mdc-drawer style=["dismissible"|"modal"] open=open}}
  {{!-- drawer content --}}
{{/mdc-drawer}}

Attributes

  • style - The type of drawer. Eit
  • open - Open/closes the drawer.

Adding content to the drawer

The content of a drawer goes inside a {{mdc-drawer-content}} block. For menu items, we use {{mdc-list}} and {{mdc-list-group}} components.

{{#mdc-drawer style=style open=open}}
  {{!-- ... --}}

  {{#mdc-drawer-content}}
    {{#mdc-list-group}}
      {{#mdc-list}}
        {{#mdc-list-item-linkto "index"}}{{mdc-list-item-graphic-icon "inbox"}} Inbox{{/mdc-list-item-linkto}}
        {{#mdc-list-item-linkto "star"}}{{mdc-list-item-graphic-icon "star"}} Star{{/mdc-list-item-linkto}}
        {{#mdc-list-item-linkto "sent"}}{{mdc-list-item-graphic-icon "send"}} Sent Mail{{/mdc-list-item-linkto}}
        {{#mdc-list-item-linkto "drafts"}}{{mdc-list-item-graphic-icon "drafts"}} Drafts{{/mdc-list-item-linkto}}
      {{/mdc-list}}

      {{mdc-list-divider}}

      {{#mdc-list}}
        {{#mdc-list-item-linkto "all"}}{{mdc-list-item-graphic-icon "email"}} All Mail{{/mdc-list-item-linkto}}
        {{#mdc-list-item-linkto "trash"}}{{mdc-list-item-graphic-icon "delete"}} Trash{{/mdc-list-item-linkto}}
        {{#mdc-list-item-linkto "spam"}}{{mdc-list-item-graphic-icon "report"}} Spam{{/mdc-list-item-linkto}}
      {{/mdc-list}}
    {{/mdc-list-group}}
  {{/mdc-drawer-content}}
{{/mdc-drawer}}

Opening/closing the drawer

The open attribute on the {{mdc-drawer}} is used to open and close the drawer. When open is true, then the drawer will open. When open is false the drawer will close.

If the drawer has style="modal", then the open attribute is automatically set to false when an item in the drawer is clicked.

Adding a header to the drawer

The header in the drawer is the top portion of the drawer where you display application specific information, such as how is currently logged into the application. You can add a header to the drawer by adding the {{mdc-drawer-header}} block component.

{{#mdc-drawer style=style open=open}}
  {{#mdc-drawer-header}}
    {{#mdc-drawer-title}}Mail{{/mdc-drawer-title}}
    {{#mdc-drawer-subtitle}}[email protected]{{/mdc-drawer-subtitle}}
  {{/mdc-drawer-header}}

  {{!-- drawer content --}}

{{/mdc-drawer}}

Dismissible vs. Modal

A dismissible drawer is one that once opened remains open until the user explicitly closes the drawer. A modal drawer is one that appears on demand (like a modal dialog), and disappears when an item in the drawer is clicked. If style="modal", then the {{mdc-drawer}} component will automatically add a {{mdc-drawer-scrim}} component as the next sibling of the {{mdc-drawer}} component. Likewise, if you switch from a modal drawer to a dismissible drawer, the {{mdc-drawer}} component will automatically remove the {{mdc-drawer-scrim}} element from the page.

{{#mdc-drawer style="modal"}}
  {{!-- drawer content --}}
{{/mdc-drawer}}

<div>
  {{!-- app content --}}
</div>

When working with a dismissible drawer, the page content must placed inside a {{mdc-drawer-app-content}} component. This ensures the drawer and the page function correctly when the drawer is opened.

{{#mdc-drawer style="dismissible"}}
  {{!-- drawer content --}}
{{/mdc-drawer}}

{{#mdc-drawer-app-content}}
  {{!-- app content --}}
{{/mdc-drawer-app-content}}

Alternating between dismissible and modal

The dismissible drawer requires the app content placed in a {{mdc-drawer-app-content}} component. This is not a requirement for modal drawers. The app content just needs to be placed inside a <div> element. To support alternating between a dismissible and modal drawer, we adapted the {{mdc-drawer-app-content}} to support modal drawers.

If you want to support alternating between dismissible and modal drawers, maybe depending on the screen size, then place the app content inside a {{mdc-drawer-app-content}} component. The {{mdc-drawer-app-content}} will automatically configure itself if the {{mdc-drawer}} style attribute changes.

{{#mdc-drawer style=style}}
  {{!-- drawer content --}}
{{/mdc-drawer}}

{{#mdc-drawer-app-content}}
  {{!-- app content --}}
{{/mdc-drawer-app-content}}