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

@ivanvanderbyl/ember-material-components-top-app-bar

v0.77.1-alpha.2

Published

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

Downloads

3

Readme

@ivanvanderbyl/ember-material-components-top-app-bar

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

Installation

ember install @ivanvanderbyl/ember-material-components-top-app-bar

Components and Mixins

Components

{{mdc-top-app-bar}}

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

{{#mdc-top-app-bar style=["fixed"|"dense"|"prominent"|"short"]
                   alwaysClosed=[true|false]
                   navigation=navigation}}
  {{#mdc-top-app-bar-row}}

  {{/mdc-top-app-bar-row}}
{{/mdc-top-app-bar}}

Attributes

  • style - The top app bar style.
  • alwaysClosed - The top app bar is always closed. This only applies for short top app bars.
  • navigation - The action invoked when the navigation icon is clicked.

Adding sections to a row

The {{mdc-top-app-bar}} component can contain sections. The sections can either be aligned to the start or end of the {{mdc-top-app-bar-row}}. The default position is alignStart.

{{#mdc-top-app-bar style="fixed"}}
  {{#mdc-top-app-bar-row}}
    {{#mdc-top-app-bar-section}}

    {{/mdc-top-app-bar-section}}

    {{#mdc-top-app-bar-section position="alignEnd"}}

    {{/mdc-top-app-bar-section}}
  {{/mdc-top-app-bar-row}}
{{/mdc-top-app-bar}}

Adding a title to the app bar

Use the {{mdc-top-app-bar-title}} component to add a title to the top app bar.

{{#mdc-top-app-bar style="fixed"}}
  {{#mdc-top-app-bar-row}}
    {{#mdc-top-app-bar-section}}
      {{#mdc-top-app-bar-title}}Ember Material{{/mdc-top-app-bar-title}}
    {{/mdc-top-app-bar-section}}

    {{#mdc-top-app-bar-section position="alignEnd"}}

    {{/mdc-top-app-bar-section}}
  {{/mdc-top-app-bar-row}}
{{/mdc-top-app-bar}}

The navigation icon

The {{mdc-top-app-bar-navigation-icon}} is used to add a navigation icon to the top app bar. Likewise, the navigation attribute on {{mdc-top-app-bar}} is invoked when the navigation icon is clicked.

{{#mdc-top-app-bar style="fixed" navigation=(action (mut openDrawer) true)}}
  {{#mdc-top-app-bar-row}}
    {{#mdc-top-app-bar-section}}
      {{mdc-top-app-bar-navigation-icon}}
      {{#mdc-top-app-bar-title}}Ember Material{{/mdc-top-app-bar-title}}
    {{/mdc-top-app-bar-section}}

    {{#mdc-top-app-bar-section position="alignEnd"}}

    {{/mdc-top-app-bar-section}}
  {{/mdc-top-app-bar-row}}
{{/mdc-top-app-bar}}

The default icon is the menu icon. You can use the icon attribute to change the navigation icon.

{{#mdc-top-app-bar style="fixed"}}
  {{#mdc-top-app-bar-row}}
    {{#mdc-top-app-bar-section}}
      {{mdc-top-app-bar-navigation-icon icon="search"}}
      {{#mdc-top-app-bar-title}}Ember Material{{/mdc-top-app-bar-title}}
    {{/mdc-top-app-bar-section}}

    {{#mdc-top-app-bar-section position="alignEnd"}}

    {{/mdc-top-app-bar-section}}
  {{/mdc-top-app-bar-row}}
{{/mdc-top-app-bar}}

The {{mdc-top-app-bar-navigate-up-to}} component is a design to add the navigate up to icon to the top app bar. It also allows you to link to a page in the application.

{{#mdc-top-app-bar style="fixed"}}
  {{#mdc-top-app-bar-row}}
    {{#mdc-top-app-bar-section}}
      {{mdc-top-app-bar-navigate-up-to "index"}}
      {{#mdc-top-app-bar-title}}Ember Material{{/mdc-top-app-bar-title}}
    {{/mdc-top-app-bar-section}}

    {{#mdc-top-app-bar-section position="alignEnd"}}

    {{/mdc-top-app-bar-section}}
  {{/mdc-top-app-bar-row}}
{{/mdc-top-app-bar}}

Adding action items to the top app bar

Action items usually appear at the end of the action bar. The {{mdc-top-app-bar-action-item}} components adds an action item to the top app bar.

{{#mdc-top-app-bar style="fixed"}}
  {{#mdc-top-app-bar-row}}
    {{#mdc-top-app-bar-section}}
      {{mdc-top-app-bar-navigate-up-to "index"}}
      {{#mdc-top-app-bar-title}}Ember Material{{/mdc-top-app-bar-title}}
    {{/mdc-top-app-bar-section}}

    {{#mdc-top-app-bar-section position="alignEnd"}}
      {{mdc-top-app-bar-action-item label="Download" alt="Download" icon="file_download"}}
    {{/mdc-top-app-bar-section}}
  {{/mdc-top-app-bar-row}}
{{/mdc-top-app-bar}}

The {{mdc-top-app-bar-action-item}} supports the following attributes:

  • icon - The icon for the action item.
  • label - The accessibility label for the action item (optional).
  • alt - The alternate text for the item link (optional).

{{mdc-content}}

Description

The {{mdc-content}} block component contains the content for a page that contains a {{mdc-top-app-bar}} component. The {{mdc-content}} components ensure the content has the correct padding so the page's content is not covered by the {{mdc-top-app-bar}}.

The {{mdc-content}} automatically sets its style based on the style of the {{mdc-top-app-bar}} component. This allows you to dynamically change the {{mdc-top-app-bar}} style at runtime and have the {{mdc-content}} component update its style accordingly.

Usage

{{#mdc-top-app-bar}}

{{/mdc-top-app-bar}}

{{#mdc-content}}

  {{!-- page content goes here --}}

{{/mdc-content}}