App bar
The top bar of a phone screen (Material's top app bar, the iOS navigation bar): back or menu, a title and subtitle, actions, and an optional row under it. It elevates once the content scrolls, or hides while scrolling down.
Patterns (scroll inside each phone)
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-app-bar> · RayAppBar
It follows the scroller of its ray-app-shell, else scroll-target, else the window; clear of the notch (safe-area inset). The title is plain text: put a heading in the default slot when the page needs one.
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
label | label | string | The title. | |
description | description | string | A line under the title. | |
center | center reflects | boolean | The title centered (iOS). | |
variant | variant reflects | default | filled | transparent | default | default: the page background; filled: the primary color; transparent: until it elevates. |
size | size reflects | sm | md | lg | md | Height: 48, 56 or 64 px. |
scrollBehavior | scroll-behavior reflects | elevate | hide | none | elevate | While the content scrolls: elevate (border and shadow), hide (also slides away going down, back going up), none. |
sticky | sticky reflects | boolean | Sticks to the top of the window (outside a shell). | |
scrollTarget | scroll-target | string | A selector of the element whose scrolling it follows (default: its shell's, else the window). |
| Slot | Description |
|---|---|
| (default) | Title content after the label (a heading, a select). |
start | Before the title: back or menu button. |
end | Actions. |
bottom | A row under the bar: tabs, a search field. |
| Part | Description |
|---|---|
bar | The bar. |
start | The start area. |
title | The title area. |
end | The actions area. |
bottom | The row under the bar. |