Top app bar
Top app bars (COMPONENT_SPEC §11): small (Compose TopAppBar), center-aligned (CenterAlignedTopAppBar), medium and large flexible (MediumFlexibleTopAppBar, LargeFlexibleTopAppBar) and two-rows (TwoRowsTopAppBar). Plain HTML with m3e-css classes; the scroll behaviors come from attachTopAppBarScroll (m3e-elements) or <TopAppBar scrollBehavior> (m3e-react). The page decides positioning, such as position: sticky.
Small and center-aligned
Medium and large flexible, two-rows
Expanded (no scroll behavior). The top row holds the collapsed title, shown as the bar collapses; the expanded title sits in the second row, its last baseline 24dp (medium) or 28dp (large) above the bottom, moved up when it does not fit. Two-rows bars take custom heights and per-row titles (here Compose's CustomTwoRowsTopAppBar: 64 / 156dp).
Scroll behaviors
Pinned: the single-row container color changes once content scrolls under the bar. Enter-always: the bar hides with the scroll and returns on any scroll up. Exit-until-collapsed (the flexible bars): the expanded row collapses with the scroll down to the small bar's 64dp, the titles crossfade and the container color follows the collapsed fraction; it expands again when the content comes back to its start. A partly collapsed bar snaps open or closed on the default effects spring when scrolling stops.
React
<TopAppBar variant titleHorizontalAlignment scrollBehavior scrollTarget={ref}>
Sources
androidx Compose Material3 1.5.0-beta01 (19991f2c): AppBar.kt (TopAppBar, CenterAlignedTopAppBar, MediumFlexibleTopAppBar, LargeFlexibleTopAppBar, TwoRowsTopAppBar, TopAppBarDefaults, TopAppBarState, the scroll behaviors and settleAppBar), AppBarTokens.kt, AppBarSmallTokens.kt, AppBarMediumFlexibleTokens.kt, AppBarLargeFlexibleTokens.kt and the values Compose renders in components/top-app-bar-defaults.css; AppBarSamples.kt for the configurations above.