Top app bar
A header with the screen title and actions, in three sizes, with scroll behaviour.
import { TopAppBar } from '@windmorph/react';Purpose
A top app bar shows the current screen's title and its most important actions along the top. small is a single 64px row; medium and large are flexible two-row bars whose big title collapses into the top row as the page scrolls. A title can carry a subtitle and be centred with titleAlign.
It renders a <header> with a leading navigationIcon and trailing actions. Wrap the title in a heading element when it names the page. Add scrollBehavior and point scrollRef at the scroll container to react to content scrolling under the bar; leave them out for a static bar you position.
When not to use
For actions tied to content rather than the screen, use a Toolbar.
See also
- Top app bar on m3.material.io: Material's own guidelines, with anatomy and specs.
- Toolbars: Docked and floating toolbars of related actions, with an optional FAB, scroll collapse and scroll exit.
- Search: A search bar that opens a full-screen view on phones and a docked view on larger windows, and an app bar with search.
- Navigation rail: Top-level destinations along the start edge, collapsed or expanded, in medium windows.