Toolbar

The top and bottom bars of a phone screen: navigation, a title, a search field and actions.

import { NavigationButton, Toolbar } from "@plexui/react-native"

Move between an app's top-level sections with a Tab Bar.

Examples

Overview

Search under the title

Label

Opaque bar

Conversation

Disabled

Between screens

Platforms

iOS 26Android
Native component, topNavigation barAction bar, drawn as glass circles and capsules
Native component, bottomToolbarA bottom row: a field with its circles, or one wide action
LookGlass items over the content, 44pt at the top and 48pt at the bottom; a centered 17pt title or a 34pt large title46dp circles and capsules of see-through glass (the card at 80%, a 0.55dp rim, a soft shadow in light) 6dp from the edges, a centered Medium 17 title in a 62dp bar, the screen's color fading under them
background="hard", topAn opaque bar of the canvas color with a hairline, once content is under itThe classic bar: 56dp in the cards' color with a 3dp shadow, plain icons in 48dp targets, a Medium 18 title from 72dp
background="media"Nothing: the buttons' clear glass adapts to the mediaSystem bar protection over the status bar and the bar: black at 50% at the edge, eased out to clear 1.2 times the bar's height in
Toolbar.Title avatarMessages: the picture 60pt over the name's glass capsule of 33pt, a chevron with onPressGoogle Messages: the picture 36dp and the name from the start, 18sp
avatarPlacement="end"A messenger's: the name over its status in a glass capsule of 44pt, the picture 38pt in a glass circle of 44pt at the endAs top: Google Messages' bar
avatarPlacement="start"From the start: the picture 40pt after Back, the name 17pt over its 13pt status beside it, no glass; the trailing items keep their roomAs top: Google Messages' bar

iOS calls only the bottom bar a toolbar; here Toolbar is both bars, and placement picks one.

API

Toolbar

PropTypeDefaultDescription
placement"top" | "bottom""top"Top bar with 44pt targets, or bottom bar with 48pt targets
titleStyle"inline" | "large""inline"A title in the row of the controls, or the large title on a row of its own under them (iOS; Android keeps it in the row)
titleAlign"center" | "start""center"; "start" in an opaque top bar on AndroidWhere an inline title stands; a large one starts at the leading edge
background"soft" | "hard" | "glass" | "none" | "media""glass" at the top on iOS, "soft" at the bottom and on AndroidHow the bar meets content under it, once scrolled says it is there. media: a bar over a photo or a video, drawn at all times: Android's system bar protection, nothing on iOS
scrolledbooleanfalseContent is under the bar: scrolled under a top bar, running on under a bottom one
scrollYnumber | Animated.Value—How far the content under a top bar has scrolled (contentOffset.y). A large title on iOS rides it up under the controls, its rows stop 10pt under them, and once the title has gone under the bar the bar shows it inline over 300ms; a glass bar's background and a hard bar's line come with it. Content is under the bar once it is past 0
titleShownboolean—Whether the bar shows its inline title. false keeps it unseen and unread in its place, so nothing in the bar moves; true brings it in over the large title's 300ms turn (at once with reduced motion), and it goes the same way. For a heading that stands on the screen and that the bar takes up once the scroll has carried it under the bar. Unset, the title shows as always; a large title riding scrollY keeps its own turn
liftOnScrollbooleanfalseAndroid's opaque top bar (background="hard") lifts on scroll, as Material 3's top app bar: at rest in the screen's color (canvasColor) with no shadow, in the cards' color with its shadow once content is under it (scrolled, or scrollY past 0). Its title, inset and padding stay the opaque bar's
canvasColorstringthe theme's backgroundThe color of the screen under the bar, which its scroll edge takes (a grouped screen's canvas)
safeAreabooleantruePads the bar for the status bar or the home indicator
gutternumberthe platform'sThe room from the screen's sides to the bar's controls and rows, for the product to set: 16, as a messenger keeps on every phone, or 20, UIKit's margin on a wide phone. Without it, on iOS the layout margin at the top (16, and 20 on a phone 414 wide or more; --toolbar-gutter) and 28 at the bottom; on Android Material's
floatingbooleanfalseThe bar lies over the content at its edge, the content running on under it. Inside a ToolbarInsetProvider it tells its height to useToolbarInset() ({ top, bottom }), for the content's padding so it starts under the bar
transition{ from: ReactElement<ToolbarProps>; progress: Animated.Value | Animated.AnimatedInterpolation<number>; direction?: "push" | "back" }—A move between the screens of a stack that the bar stays over: the bar it comes from and the move's progress (0 at its start, 1 once this bar's screen is in front). On iOS the buttons stand still, a shared one as it is and one that changes crossfading, and the titles, rows and edge travel with their screens; on Android the bar's parts fade through. Drop it once the move ends
childrenReactNode—The parts of the bar
styleStyleProp<ViewStyle>—Style of the bar (all of View's props pass through)

Toolbar.Title

PropTypeDefaultDescription
childrenReactNode—The title, announced as a header; with an image, the name it is announced by unless accessibilityLabel is set
imageReactNode—A logo in the title's place; it stays the bar's header, hidden from screen readers itself
accessibilityLabelstring—The header's name with an image, when it has no text children
subtitleReactNode—A second, smaller line under the title
numberOfLinesnumber1Lines of the title before it truncates
actionReactNode—One control right after the title on its line (an IconButton), in the bar's look, --toolbar-title-action-gap after the words (6 on Android, 10 on iOS); the title is cut short before it. Read after the header, and kept unseen with the title by the bar's titleShown. Not with avatar
avatarReactNode—A conversation's title: the person's picture with the name, over the name's glass capsule on iOS and before it on Android. An Avatar takes the size (60 on iOS, 36 on Android); another picture is cut to the circle
onPress() => void—With avatar: the picture and the name are one button, named by the name, that opens the conversation's details; on iOS a chevron follows the name (top). Unset, the title is the bar's header
typingReactNode—Who is typing, on iOS with avatarPlacement="end" or "start": the messenger's three dots in the accent before it, in the subtitle's place; true writes "typing", a group's names as the messenger writes them ("Sam", "Sam and Mia", "Sam and 2 others"). Android keeps its subtitle
avatarPlacement"top" | "start" | "end""top"Where the picture stands on iOS: over the name's capsule as Messages; at the bar's end in a glass circle, the name over its subtitle in a glass capsule of 44, as a messenger; or from the bar's start, the picture 40 beside the name over its subtitle, the title set from the start so the trailing items keep their room. Android sets it from the start either way

useToolbarMetrics

useToolbarMetrics({ placement, background, safeArea, gutter }) returns { height, rowHeight, paddingTop, paddingBottom, gutter }: a bar's height and padding as the bar draws them, for a header of the app's own that keeps a bar's room from its first frame. Android's opaque top bar (background: "hard") is 56 = 4 + 48 + 4 under the status bar, 4 from the sides; its soft and glass bars 62; iOS's top bar --toolbar-padding-bottom over and under a row of --toolbar-top-item-size (10 + 44 + 10, the safe area's top in place of the first 10 when it is larger). It measures a bar with its title inline and the kit's own padding.

import { useToolbarMetrics } from "@plexui/react-native"

const { height } = useToolbarMetrics({ background: "hard" })
<View style={{ paddingTop: height }}>{/* the screen's own large header */}</View>

Toolbar.Group

PropTypeDefaultDescription
mobileMaterial"glass" | "clear" | "clear-light""glass"The capsule's material: iOS 26's clear glass over a photo, a video or a color, its items' labels #f5f5f5 (clear-light: a white frost and dark labels over a bright color); on Android the clear button's translucent gray. An opaque Android bar keeps its plain icons
childrenReactNode—The buttons of the capsule: IconButton, Button, Toolbar.Label

Compound parts

PartPurpose
Toolbar.LeadingBack, Close or menu controls at the leading edge
Toolbar.TitleTitle of the screen, with an optional subtitle
Toolbar.ContentMiddle content: a search field, a main action or a segmented control. fill stretches it between the leading and trailing items
Toolbar.GroupRelated buttons in one capsule: of glass on iOS and on Android
Toolbar.TrailingActions at the trailing edge
Toolbar.RowA row under the controls, part of the bar: a segmented control or a search field across its width, or filter chips scrolling sideways (scroll); several stand in their order
Toolbar.LabelA text that is not a button: a step of a flow, a count, a status. On iOS in a capsule of the bar's glass, on Android plain

Toolbar.Leading, Toolbar.Trailing, Toolbar.Group, Toolbar.Content, Toolbar.Row and Toolbar.Label take a View's props; Toolbar.Group also its mobileMaterial, Toolbar.Row also scroll (its items scroll sideways across the screen's width, from the bar's gutter, 8pt apart).

PropTypeDefaultDescription
action"back" | "close" | "confirm"—The role of the button and its glyph (required); the caller owns the navigation, the dismissal or the submission
accessibilityLabelstring"Back", "Close" or "Confirm"Accessible name of the button
colorButtonColor"primary" for confirm and on Android, "secondary" on iOSSemantic color, as Button's
variant"solid" | "soft" | "outline" | "ghost""solid" for confirm, "soft" on iOS, "ghost" on AndroidFill style, as Button's
mobileMaterial"glass" | "flat" | "clear" | "clear-light""glass" for back and closeiOS 26 glass; on Android the glass circle in a bar. clear: back and close in iOS 26's clear glass over a photo, a video or a glow (clear-light over a bright one); on Android the clear gray
sizeControlSize"lg"Size step, as Button's; in an iOS bar the bar's item size wins
onPress(event) => void—Called on a press

NavigationButton takes Button's other props too, except children, uniform and pill.