App Bar

Material Design 3 app bar component for top and bottom navigation

App Bar

App bars display information and actions related to the current screen. @duskmoon-dev/core provides flexible top and bottom app bars.

Basic Usage

Basic App Bar

Page Title

Position

Static (Default)

Static App Bar

Static App Bar

Fixed

Add appbar-fixed to create a fixed app bar that stays at the top of the viewport.

Fixed App Bar (demo without positioning)

Fixed App Bar

<!-- Usage in production -->
<header class="appbar appbar-fixed">
  <div class="appbar-title">
    <h1 class="appbar-heading">Fixed App Bar</h1>
  </div>
</header>

Sticky

Add appbar-sticky to create a sticky app bar that becomes fixed when scrolling.

Sticky App Bar (demo without positioning)

Sticky App Bar

<!-- Usage in production -->
<header class="appbar appbar-sticky">
  <div class="appbar-title">
    <h1 class="appbar-heading">Sticky App Bar</h1>
  </div>
</header>

Surface Variants

Surface Variants

Surface

Surface Container

Surface Container High

Color Variants

Color Variants

Primary

Secondary

Tertiary

Transparent with Blur

Transparent with Blur

Transparent Blur

With Subtitle

App Bar with Subtitle

Page Title

Subtitle text

With Back Button

App Bar with Back Button

Detail Page

With Actions

App Bar with Actions

App Name

App Bar with Search

Sizes

App Bar Sizes

Compact

Default

Comfortable

Prominent (Large)

Prominent App Bar

Large Title

Bottom App Bar

Bottom app bars display navigation and key actions at the bottom of the screen. In production, appbar-bottom uses fixed positioning.

Bottom App Bar (demo without positioning)

<!-- Usage in production -->
<footer class="appbar appbar-bottom">
  <div class="appbar-leading">
    <button class="appbar-action" aria-label="Menu">☰</button>
  </div>
  <div class="appbar-trailing">
    <button class="appbar-action" aria-label="Search">🔍</button>
    <button class="appbar-action" aria-label="Favorite">❤️</button>
    <button class="appbar-action" aria-label="More">⋮</button>
  </div>
</footer>

Styles

App Bar Styles

Flat

Bordered

API Reference

App Bar Classes

ClassDescription
.appbarBase app bar (required)
.appbar-topTop app bar (default)
.appbar-bottomBottom app bar
.appbar-fixedFixed position
.appbar-stickySticky position
.appbar-staticStatic position
.appbar-surfaceSurface background
.appbar-surface-containerSurface container
.appbar-surface-container-lowSurface container low
.appbar-surface-container-highSurface container high
.appbar-surface-container-highestSurface container highest
.appbar-primaryPrimary color
.appbar-secondarySecondary color
.appbar-tertiaryTertiary color
.appbar-transparentTransparent background
.appbar-blurBackdrop blur effect
.appbar-compactCompact size
.appbar-comfortableComfortable size
.appbar-prominentLarge/prominent variant
.appbar-flatNo shadow
.appbar-borderedWith border
.appbar-centerCenter-aligned title

Content Classes

ClassDescription
.appbar-leadingLeading section (left)
.appbar-titleTitle section (center)
.appbar-trailingTrailing section (right)
.appbar-headingMain heading text
.appbar-subtitleSubtitle text
.appbar-actionAction button
.appbar-backBack button
.appbar-searchSearch input

See Also