Types
The types of toolbar and fab.
ToolbarOptions
The toolbar, with buttons that take onPress.
type ToolbarOptions = Omit<OptionsToolbar, 'buttons'> & {
buttons?: (NavigationButton | OptionsToolbarSpace | OptionsToolbarSearchField)[];
}
| Member | Type | Description |
|---|---|---|
| testID | string | The identifier tests find the toolbar by. |
| visible | boolean | Whether the toolbar shows. It applies when the screen appears and on |
| buttons | (NavigationButton | OptionsToolbarSpace | OptionsToolbarSearchField)[] |
OptionsToolbarSpace
A space in the buttons of the toolbar. It has no id, text, icon or component, so it is not a button.
interface OptionsToolbarSpace
| Member | Type | Description |
|---|---|---|
| systemItemRequired | 'flexibleSpace' | 'fixedSpace' |
|
OptionsToolbarSearchField
(iOS 26+) The search field of the screen, placed between the buttons of the toolbar. The system puts it there for any topBar.searchBar.placement, even 'stacked'; it needs topBar.searchBar.visible. Before iOS 26 it is skipped and the field is where the placement puts it.
interface OptionsToolbarSearchField
| Member | Type | Description |
|---|---|---|
| systemItemRequired | 'searchField' | Marks the search field. |
NavigationFab
The floating action button, and each of its actions, with what its press does.
type NavigationFab = Omit<OptionsFab, 'actions'> & {
onPress?: ButtonPressHandler;
actions?: NavigationFab[];
}
| Member | Type | Description |
|---|---|---|
| iconColor | Color | The tint of the icon. Without it, the |
| idRequired | string | The identifier of the button. A press reports it, and the app finds the |
| icon | ImageResource | The icon: the name of a drawable resource of the app (for example a Material Symbols icon) or an image source with a |
| testID | string | An identifier for tests and accessibility tools, set on the button (and on the main button of a menu). The scrim of a menu gets |
| backgroundColor | Color | The color of the button's container. Without it, the |
| clickColor | Color | The color of the container while the button is pressed. Without it, the color doesn't change and only the ripple shows. It is independent of |
| rippleColor | Color | The color of the press ripple. Without it, the one from the theme's style. It stays on a light/dark switch. |
| visible | boolean | Whether the button shows. |
| alignHorizontally | 'left' | 'right' | The side of the row where the button stands. |
| hideOnScroll | boolean | Whether the button hides after a drag that scrolls the content down and shows after a drag up. Only the vertical lists of the top screen count. A merge applies it; |
| size | 'mini' | 'regular' | The size of the button: |
| scrimColor | Color | The color that dims the screen while the menu's entries are open, one with transparency such as |
| onPress | ButtonPressHandler | |
| actions | NavigationFab[] |
OptionsFab
A floating action button over the screen, or an entry of its menu. The button shows while its screen is on top of the stack; without the option there is none. It changes as a push or a pop starts and moves with its screen, as the tab bar does: the new screen's button comes in with it, the old one goes out with the screen it belongs to, and an open menu closes. With an animation of the screens' own the old button shrinks away and the new one grows as it starts; during the back gesture the button of the screen under the top shows with that screen. mergeOptions and the default options of the app apply, and the colors of the theme are read again when the theme changes.
interface OptionsFab
| Member | Type | Description |
|---|---|---|
| idRequired | string | The identifier of the button. A press reports it, and the app finds the |
| testID | string | An identifier for tests and accessibility tools, set on the button (and on the main button of a menu). The scrim of a menu gets |
| backgroundColor | Color | The color of the button's container. Without it, the |
| clickColor | Color | The color of the container while the button is pressed. Without it, the color doesn't change and only the ripple shows. It is independent of |
| rippleColor | Color | The color of the press ripple. Without it, the one from the theme's style. It stays on a light/dark switch. |
| visible | boolean | Whether the button shows. |
| icon | ImageResource | The icon: the name of a drawable resource of the app (for example a Material Symbols icon) or an image source with a |
| iconColor | Color | The tint of the icon. Without it, the |
| alignHorizontally | 'left' | 'right' | The side of the row where the button stands. |
| hideOnScroll | boolean | Whether the button hides after a drag that scrolls the content down and shows after a drag up. Only the vertical lists of the top screen count. A merge applies it; |
| size | 'mini' | 'regular' | The size of the button: |
| actions | OptionsFab[] | The entries of a menu: the button becomes a menu whose main button opens and closes the entries, each a small button above it. An entry takes |
| scrimColor | Color | The color that dims the screen while the menu's entries are open, one with transparency such as |