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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-cli-mdc-top-app-bar

v3.0.17

Published

ember-cli addon for @material/top-app-bar.

Downloads

315

Readme

ember-cli-mdc-top-app-bar

ember-cli addon for @material/top-app-bar.

Installation

ember install ember-cli-mdc-top-app-bar

Components and Modifiers

Components

Modifiers

MdcTopAppBar

Description

The top application (app) bar component on a single page. The top app bar usually contains the menu icon or the navigate up icon aligned to the start. Aligned to end are usually action icons and the overflow menu for the page.

Usage

<MdcTopAppBar @fixed=[true|false] 
              @dense=[true|false]
              @prominent=[true|false]
              @short=[true|false]
              @alwaysCollapsed=[true|false]
              @navigation={{this.navigation}}>
  <MdcTopAppBarRow>
  
  </MdcTopAppBarRow>
</MdcTopAppBar>

Attributes

  • fixed - The top app bar is fixed to the top of the page.
  • dense - The top app bar is shorter.
  • prominent - The top app bar is taller.
  • short - The top app bar can collapse to the navigation icon side when scrolled.
  • alwaysCollapsed - The top app bar always appears collapsed (when short).

Adding sections to a row

The <MdcTopAppBar> component can contain sections. The sections can either be aligned to the start or end of the <MdcTopAppBarRow>. There is no default alignment.

<MdcTopAppBar @fixed={{true}}>
  <MdcTopAppBarRow>
    <MdcTopAppBarSection @position="alignStart">
    
    </MdcTopAppBarSection>
  
    <MdcTopAppBarSection @position="alignEnd">
      
    </MdcTopAppBarSection>
  </MdcTopAppBarRow>
</MdcTopAppBar>

Adding a title to the app bar

Use the <MdcTopAppBarTitle> component to add a title to the top app bar.

<MdcTopAppBar @fixed={{true}}>
  <MdcTopAppBarRow>
    <MdcTopAppBarSection @position="alignStart">
      <MdcTopAppBarTitle>Ember Material</MdcTopAppBarTitle>
    </MdcTopAppBarSection>
  
    <MdcTopAppBarSection @position="alignEnd">
      
    </MdcTopAppBarSection>

  </MdcTopAppBarRow>
</MdcTopAppBar>

The navigation icon

The <MdcTopAppBarNavigationIcon> is used to add a navigation icon to the top app bar. Likewise, the @navigation attribute on <MdcTopAppBar> is invoked when the navigation icon is clicked.

<MdcTopAppBar @fixed={{true}} @navigation={{this.openDrawer}}>
  <MdcTopAppBarRow>
    <MdcTopAppBarSection @position="alignStart">
      <MdcTopAppBarNavigationIcon @icon="menu" />
      <MdcTopAppBarTitle>Ember Material</MdcTopAppBarTitle>
    </MdcTopAppBarSection>
  
    <MdcTopAppBarSection @position="alignEnd">
      
    </MdcTopAppBarSection>

  </MdcTopAppBarRow>
</MdcTopAppBar>

The <MdcTopAppBarNavigateUpTo> component adds the navigate up icon to the top app bar. It also allows you to link to a page in the application.

<MdcTopAppBar @fixed={{true}}>
  <MdcTopAppBarRow>
    <MdcTopAppBarSection @position="alignStart">
      <MdcTopAppBarNavigateUpTo @route="index" />
      <MdcTopAppBarTitle>Ember Material</MdcTopAppBarTitle>
    </MdcTopAppBarSection>
  
    <MdcTopAppBarSection @position="alignEnd">
      
    </MdcTopAppBarSection>

  </MdcTopAppBarRow>
</MdcTopAppBar>

Adding action items to the top app bar

Action items usually appear at the end of the action bar. The <MdcTopAppBarActionItem> components adds an action item to the top app bar.

<MdcTopAppBar @fixed={{true}}>
  <MdcTopAppBarRow>
    <MdcTopAppBarSection @position="alignStart">
      <MdcTopAppBarNavigateUpTo @route="index" />
      <MdcTopAppBarTitle>Ember Material</MdcTopAppBarTitle>
    </MdcTopAppBarSection>
  
    <MdcTopAppBarSection @position="alignEnd">
      <MdcTopAppBarActionItem @label="Download" @icon="file_download" alt="Download" />
    </MdcTopAppBarSection>
  </MdcTopAppBarRow>
</MdcTopAppBar>

The <MdcTopAppBarActionItem> supports the following attributes:

  • icon - The icon for the action item.
  • label - The accessibility label for the action item (optional).

mdc-top-app-bar-fixed-adjustment

Description

The {{mdc-top-app-bar-fixed-adjustment}} modifier is designed to adjust a container's top padding to account for the size of the top app bar.

Usage

<MdcTopAppBar @fixed={{true}} 
              @dense={{this.dense}}
              @short={{this.short}}
              @prominent={{this.prominent}} 
              @alwaysCollapsed={{this.alwaysCollapsed}}>
  <MdcTopAppBarRow>
    <MdcTopAppBarSection @position="alignStart">
      <MdcTopAppBarNavigateUpTo @route="index" />
      <MdcTopAppBarTitle>Ember Material</MdcTopAppBarTitle>
    </MdcTopAppBarSection>
  
    <MdcTopAppBarSection @position="alignEnd">
      <MdcTopAppBarActionItem @label="Download" @icon="file_download" alt="Download" />
    </MdcTopAppBarSection>
  </MdcTopAppBarRow>
</MdcTopAppBar>

<div {{mdc-top-app-bar-fixed-adjustment dense=this.dense 
                                        short=this.short
                                        prominent=this.prominent
                                        alwaysCollapsed=this.alwaysCollapsed}}>
  <!-- content goes here -->
</div>

As shown in the example above, the named arguments for {{mdc-top-app-bar-fixed-adjustment}} should be bound to their corresponding argument from the component.