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

Class Description
.appbar Base app bar (required)
.appbar-top Top app bar (default)
.appbar-bottom Bottom app bar
.appbar-fixed Fixed position
.appbar-sticky Sticky position
.appbar-static Static position
.appbar-surface Surface background
.appbar-surface-container Surface container
.appbar-surface-container-low Surface container low
.appbar-surface-container-high Surface container high
.appbar-surface-container-highest Surface container highest
.appbar-primary Primary color
.appbar-secondary Secondary color
.appbar-tertiary Tertiary color
.appbar-transparent Transparent background
.appbar-blur Backdrop blur effect
.appbar-compact Compact size
.appbar-comfortable Comfortable size
.appbar-prominent Large/prominent variant
.appbar-flat No shadow
.appbar-bordered With border
.appbar-center Center-aligned title

Content Classes

Class Description
.appbar-leading Leading section (left)
.appbar-title Title section (center)
.appbar-trailing Trailing section (right)
.appbar-heading Main heading text
.appbar-subtitle Subtitle text
.appbar-action Action button
.appbar-back Back button
.appbar-search Search input

See Also