App Bar

Die obere Leiste eines Bildschirms: eine Zurück-Schaltfläche oder ein Zurück-Link, der Titel als echte Überschrift mit Untertitel und Aktionen am Ende, in einem Header, der oben haften kann und die Notch freilässt.

Verfügbar für
  • Angular: verfügbar
  • Vue: verfügbar
  • React: verfügbar
  • React Native: verfügbar

Verwendung

Inbox

12 unread

Back pressed 0 times

Import

ts
import {
  SoneAppBarComponent,
  SoneAppBarTrailingDirective,
} from "@surface-one/angular/app-bar";

API-Referenz

SoneAppBarComponentKomponente

`<sone-app-bar>` — the top bar of a screen (the web twin of the React Native `SoneAppBar`): an optional back button, the title as a real heading (`level`, default 1) with a subtitle under it, and `[soneAppBarTrailing]` actions at the end. It renders a `<header>`, so it is the page's banner when it sits outside `main`. `sticky` pins it to the top of the scrolling page; its top padding clears the notch (`env(safe-area-inset-top)`). `showBack` draws a back button that emits `(back)`; `backHref` makes it a link.

Selektor
sone-app-bar
Inputs
NameTyp Standard
titleerforderlichstring—
subtitle

A line under the title.

string | nullnull
level

The title's heading level, 1–6.

HeadingLevel1
showBack

Shows the back button, which emits `(back)`.

booleanfalse
backHref

Makes the back button a link to this URL (it shows without `showBack`).

string | nullnull
backLabel

The back button's accessible name.

—$localize`:Goes back to the previous screen:Back`
sticky

Pins the bar to the top of the scrolling page.

booleanfalse
Outputs
NameTyp
back

The back button was pressed (not emitted for a `backHref` link).

void

SoneAppBarTrailingDirectiveDirektive

`[soneAppBarTrailing]` — what sits at the end of the bar: icon buttons, an avatar …

Selektor
[soneAppBarTrailing]