New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@m3e/app-bar

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@m3e/app-bar

App Bar for M3E

latest
Source
npmnpm
Version
1.3.1
Version published
Maintainers
1
Created
Source

@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/lit@3.3.0/+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

AttributeTypeDefaultDescription
centeredbooleanfalseWhether the title and subtitle are centered.
size"small" | "medium" | "large""small"The size of the bar.
forstringThe identifier of the interactive control to which this element is attached.

🧩 Slots

SlotDescription
leading-iconRenders a leading icon.
titleRenders the title.
subtitleRenders the subtitle.
trailing-iconRenders 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

PropertyDescription
--m3e-app-bar-container-colorBackground color of the app bar container.
--m3e-app-bar-container-color-on-scrollBackground color when scrolled.
--m3e-app-bar-container-elevationElevation (shadow) of the app bar container.
--m3e-app-bar-container-elevation-on-scrollElevation (shadow) when scrolled.
--m3e-app-bar-title-text-colorColor of the app bar title text.
--m3e-app-bar-subtitle-text-colorColor of the app bar subtitle text.
--m3e-app-bar-padding-leftLeft padding for the app bar container.
--m3e-app-bar-padding-rightRight padding for the app bar container.

Small Size Properties

PropertyDescription
--m3e-app-bar-small-container-heightHeight of the small app bar container.
--m3e-app-bar-small-title-text-font-sizeFont size for the small app bar title text.
--m3e-app-bar-small-title-text-font-weightFont weight for the small app bar title text.
--m3e-app-bar-small-title-text-line-heightLine height for the small app bar title text.
--m3e-app-bar-small-subtitle-text-trackingLetter spacing for the small app bar title text.
--m3e-app-bar-small-subtitle-text-font-sizeFont size for the small app bar subtitle text.
--m3e-app-bar-small-subtitle-text-font-weightFont weight for the small app bar subtitle text.
--m3e-app-bar-small-subtitle-text-line-heightLine height for the small app bar subtitle text.
--m3e-app-bar-small-heading-padding-leftLeft padding for the small app bar heading.
--m3e-app-bar-small-heading-padding-rightRight padding for the small app bar heading.

Medium Size Properties

PropertyDescription
--m3e-app-bar-medium-container-heightHeight of the medium app bar container.
--m3e-app-bar-medium-container-height-with-subtitleHeight of the medium app bar with subtitle.
--m3e-app-bar-medium-title-text-font-sizeFont size for the medium app bar title text.
--m3e-app-bar-medium-title-text-font-weightFont weight for the medium app bar title text.
--m3e-app-bar-medium-title-text-line-heightLine height for the medium app bar title text.
--m3e-app-bar-medium-subtitle-text-trackingLetter spacing for the medium app bar title text.
--m3e-app-bar-medium-subtitle-text-font-sizeFont size for the medium app bar subtitle text.
--m3e-app-bar-medium-subtitle-text-font-weightFont weight for the medium app bar subtitle text.
--m3e-app-bar-medium-subtitle-text-line-heightLine height for the medium app bar subtitle text.
--m3e-app-bar-medium-heading-padding-leftLeft padding for the medium app bar heading.
--m3e-app-bar-medium-heading-padding-rightRight padding for the medium app bar heading.
--m3e-app-bar-medium-padding-topTop padding for the medium app bar.
--m3e-app-bar-medium-padding-bottomBottom padding for the medium app bar.
--m3e-app-bar-medium-title-max-linesMax lines for the medium app bar title.
--m3e-app-bar-medium-subtitle-max-linesMax lines for the medium app bar subtitle.

Large Size Properties

PropertyDescription
--m3e-app-bar-large-container-heightHeight of the large app bar container.
--m3e-app-bar-large-container-height-with-subtitleHeight of the large app bar with subtitle.
--m3e-app-bar-large-title-text-font-sizeFont size for the large app bar title text.
--m3e-app-bar-large-title-text-font-weightFont weight for the large app bar title text.
--m3e-app-bar-large-title-text-line-heightLine height for the large app bar title text.
--m3e-app-bar-large-subtitle-text-trackingLetter spacing for the large app bar title text.
--m3e-app-bar-large-subtitle-text-font-sizeFont size for the large app bar subtitle text.
--m3e-app-bar-large-subtitle-text-font-weightFont weight for the large app bar subtitle text.
--m3e-app-bar-large-subtitle-text-line-heightLine height for the large app bar subtitle text.
--m3e-app-bar-large-heading-padding-leftLeft padding for the large app bar heading.
--m3e-app-bar-large-heading-padding-rightRight padding for the large app bar heading.
--m3e-app-bar-large-padding-topTop padding for the large app bar.
--m3e-app-bar-large-padding-bottomBottom padding for the large app bar.
--m3e-app-bar-large-title-max-linesMax lines for the large app bar title.
--m3e-app-bar-large-subtitle-max-linesMax 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.

Keywords

material design

FAQs

Package last updated on 20 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts