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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@m3e/app-bar

v1.1.8

Published

App Bar for M3E

Readme

@m3e/app-bar

The m3e-app-bar component is a prominent user interface component that provides consistent access to key actions, navigation, and contextual information at the top of an application screen. Designed according to Material 3 principles, it organizes content with clear hierarchy, supports dynamic color, elevation, alignment, and adapts to scrolling behavior.

This package is part of M3E monorepo, a unified suite of Material 3 web components. Explore the docs to see them in action.

📦 Installation

npm install @m3e/app-bar

💻 Editor Integration

This package includes a Custom Elements Manifest to support enhanced editor tooling and developer experience.

Visual Studio Code

To enable autocomplete and hover documentation for @m3e/app-bar, install the Custom Elements Manifest Language Server extension. It will automatically detect the manifest bundled with this package and surface tag names, attributes, slots, and events in supported files.

Alternately, you can explicitly reference the html-custom-data.json and css-custom-data.json in your workspace settings:

{
  "html.customData": ["./node_modules/@m3e/app-bar/dist/html-custom-data.json"],
  "css.customData": ["./node_modules/@m3e/app-bar/dist/css-custom-data.json"]
}

🚀 Native Module Support

This package uses JavaScript Modules. To use it directly in a browser without a bundler, use a module script similar to the following.

<script type="module" src="/node_modules/@m3e/app-bar/dist/index.js"></script>

In addition, you must use an import map to include dependencies.

<script type="importmap">
  {
    "imports": {
      "lit": "https://cdn.jsdelivr.net/npm/[email protected]/+esm",
      "@m3e/core": "/node_modules/@m3e/core/dist/index.js"
    }
  }
</script>

For production, use index.min.js for faster load times.

🗂️ Elements

  • m3e-app-bar — A bar, placed a the top of a screen, used to help users navigate through an application.

🧪 Examples

The following example illustrates a medium size m3e-app-bar consisting of a leading button, title, subtitle, and trailing button.

This example uses the @m3e/icon package to present Material Design symbols, but any icon package can be substituted depending on your design system or preferences

<m3e-app-bar size="medium">
  <m3e-icon-button slot="leading-icon" aria-label="Back">
    <m3e-icon name="arrow_back"></m3e-icon>
  </m3e-icon-button>
  <span slot="title">Top 10 hiking trails</span>
  <span slot="subtitle">Discover popular trails</span>
  <m3e-icon-button slot="trailing-icon" aria-label="Bookmark" variant="tonal">
    <m3e-icon name="bookmark" filled></m3e-icon>
  </m3e-icon-button>
</m3e-app-bar>

The next example illustrates how to attach an app bar to a parent scroll container to produce elevation on scroll. In this example, the for attribute is used to attach a sticky-positioned m3e-app-bar to a parenting container styled to overflow vertically. When scrolled, the app bar will automatically transition to an elevated state.

<div style="overflow-y: auto; height: 300px" id="scrollContainer">
  <m3e-app-bar for="scrollContainer" style="position: sticky; top: 0">
    <span slot="title">Title</span>
  </m3e-app-bar>
  <div style="height: 400px; display: flex; align-items: center; justify-content: center">I am scrolling content</div>
</div>

📖 API Reference

This section details the attributes, slots and CSS custom properties available for the m3e-app-bar component.

⚙️ Attributes

| Attribute | Type | Default | Description | | ---------- | -------------------------------- | --------- | ---------------------------------------------------------------------------- | | centered | boolean | false | Whether the title and subtitle are centered. | | size | "small" \| "medium" \| "large" | "small" | The size of the bar. | | for | string | | The identifier of the interactive control to which this element is attached. |

🧩 Slots

| Slot | Description | | --------------- | ------------------------ | | leading-icon | Renders a leading icon. | | title | Renders the title. | | subtitle | Renders the subtitle. | | trailing-icon | Renders a trailing icon. |

🎛️ CSS Custom Properties

The m3e-app-bar component supports theming via scoped CSS custom properties for layout, color, elevation, and interaction states.

Container & Color Properties

| Property | Description | | --------------------------------------------- | -------------------------------------------- | | --m3e-app-bar-container-color | Background color of the app bar container. | | --m3e-app-bar-container-color-on-scroll | Background color when scrolled. | | --m3e-app-bar-container-elevation | Elevation (shadow) of the app bar container. | | --m3e-app-bar-container-elevation-on-scroll | Elevation (shadow) when scrolled. | | --m3e-app-bar-title-text-color | Color of the app bar title text. | | --m3e-app-bar-subtitle-text-color | Color of the app bar subtitle text. | | --m3e-app-bar-padding-left | Left padding for the app bar container. | | --m3e-app-bar-padding-right | Right padding for the app bar container. |

Small Size Properties

| Property | Description | | ----------------------------------------------- | ------------------------------------------------ | | --m3e-app-bar-small-container-height | Height of the small app bar container. | | --m3e-app-bar-small-title-text-font-size | Font size for the small app bar title text. | | --m3e-app-bar-small-title-text-font-weight | Font weight for the small app bar title text. | | --m3e-app-bar-small-title-text-line-height | Line height for the small app bar title text. | | --m3e-app-bar-small-subtitle-text-tracking | Letter spacing for the small app bar title text. | | --m3e-app-bar-small-subtitle-text-font-size | Font size for the small app bar subtitle text. | | --m3e-app-bar-small-subtitle-text-font-weight | Font weight for the small app bar subtitle text. | | --m3e-app-bar-small-subtitle-text-line-height | Line height for the small app bar subtitle text. | | --m3e-app-bar-small-heading-padding-left | Left padding for the small app bar heading. | | --m3e-app-bar-small-heading-padding-right | Right padding for the small app bar heading. |

Medium Size Properties

| Property | Description | | ----------------------------------------------------- | ------------------------------------------------- | | --m3e-app-bar-medium-container-height | Height of the medium app bar container. | | --m3e-app-bar-medium-container-height-with-subtitle | Height of the medium app bar with subtitle. | | --m3e-app-bar-medium-title-text-font-size | Font size for the medium app bar title text. | | --m3e-app-bar-medium-title-text-font-weight | Font weight for the medium app bar title text. | | --m3e-app-bar-medium-title-text-line-height | Line height for the medium app bar title text. | | --m3e-app-bar-medium-subtitle-text-tracking | Letter spacing for the medium app bar title text. | | --m3e-app-bar-medium-subtitle-text-font-size | Font size for the medium app bar subtitle text. | | --m3e-app-bar-medium-subtitle-text-font-weight | Font weight for the medium app bar subtitle text. | | --m3e-app-bar-medium-subtitle-text-line-height | Line height for the medium app bar subtitle text. | | --m3e-app-bar-medium-heading-padding-left | Left padding for the medium app bar heading. | | --m3e-app-bar-medium-heading-padding-right | Right padding for the medium app bar heading. | | --m3e-app-bar-medium-padding-top | Top padding for the medium app bar. | | --m3e-app-bar-medium-padding-bottom | Bottom padding for the medium app bar. | | --m3e-app-bar-medium-title-max-lines | Max lines for the medium app bar title. | | --m3e-app-bar-medium-subtitle-max-lines | Max lines for the medium app bar subtitle. |

Large Size Properties

| Property | Description | | ---------------------------------------------------- | ------------------------------------------------ | | --m3e-app-bar-large-container-height | Height of the large app bar container. | | --m3e-app-bar-large-container-height-with-subtitle | Height of the large app bar with subtitle. | | --m3e-app-bar-large-title-text-font-size | Font size for the large app bar title text. | | --m3e-app-bar-large-title-text-font-weight | Font weight for the large app bar title text. | | --m3e-app-bar-large-title-text-line-height | Line height for the large app bar title text. | | --m3e-app-bar-large-subtitle-text-tracking | Letter spacing for the large app bar title text. | | --m3e-app-bar-large-subtitle-text-font-size | Font size for the large app bar subtitle text. | | --m3e-app-bar-large-subtitle-text-font-weight | Font weight for the large app bar subtitle text. | | --m3e-app-bar-large-subtitle-text-line-height | Line height for the large app bar subtitle text. | | --m3e-app-bar-large-heading-padding-left | Left padding for the large app bar heading. | | --m3e-app-bar-large-heading-padding-right | Right padding for the large app bar heading. | | --m3e-app-bar-large-padding-top | Top padding for the large app bar. | | --m3e-app-bar-large-padding-bottom | Bottom padding for the large app bar. | | --m3e-app-bar-large-title-max-lines | Max lines for the large app bar title. | | --m3e-app-bar-large-subtitle-max-lines | Max lines for the large app bar subtitle. |

🤝 Contributing

See the root monorepo CONTRIBUTING.md for guidelines on contributing to this package.

📄 License

This package is licensed under the MIT License.