This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Reference Expo UI Jetpack Compose HorizontalFloatingToolbar A Jetpack Compose HorizontalFloatingToolbar component for displaying a floating action bar.
Recommended version:
~58.1.0
Expo UI HorizontalFloatingToolbar wraps the official Jetpack Compose HorizontalFloatingToolbar and displays a horizontal toolbar that floats above content, containing action buttons.
Note: If you only need a single floating button, use FloatingActionButton instead.
Installation
- npx expo install @expo/ui
- yarn expo install @expo/ui
- pnpm expo install @expo/ui
- bun expo install @expo/ui
If you are installing this in an existing React Native app , make sure to install expo in your project.
Usage
Floating toolbar over scrollable content
Place the toolbar inside a Box with floatingToolbarExitAlwaysScrollBehavior to get scroll-driven hide/show behavior. Use align('bottomCenter') to position the toolbar at the bottom of the screen. The entire layout stays within the Compose layer — no React Native absolute positioning needed.
FloatingToolbarExample.tsx import {
Box ,
HorizontalFloatingToolbar ,
Host ,
Icon ,
IconButton ,
LazyColumn ,
ListItem ,
Text ,
} from '@expo/ui/jetpack-compose' ;
import {
align,
fillMaxSize,
offset,
} from '@expo/ui/jetpack-compose/modifiers' ;
const ITEMS = Array . from (
{ length: 20 } ,
( _, index) => ` Item ${ index + 1 } `
) ;
export default function FloatingToolbarExample ( ) {
return (
< Host style = { { flex: 1 } } >
< Box
modifiers = { [ fillMaxSize ( ) ] }
floatingToolbarExitAlwaysScrollBehavior = " bottom" >
< LazyColumn modifiers = { [ fillMaxSize ( ) ] } >
{ ITEMS . map ( item => (
< ListItem key = { item} >
< ListItem.HeadlineContent >
< Text > { item} </ Text >
</ ListItem.HeadlineContent >
</ ListItem >
) ) }
</ LazyColumn >
< HorizontalFloatingToolbar
variant = " vibrant"
modifiers = { [ align ( 'bottomCenter' ) , offset ( 0 , - 16 ) ] } >
< IconButton onClick = { ( ) => console . log ( 'Edit pressed' ) } >
< Icon source = { require ( './assets/edit.xml' ) } />
</ IconButton >
< HorizontalFloatingToolbar.FloatingActionButton
onPress = { ( ) => console . log ( 'Add pressed' ) } >
< Icon source = { require ( './assets/add.xml' ) } />
</ HorizontalFloatingToolbar.FloatingActionButton >
</ HorizontalFloatingToolbar >
</ Box >
</ Host >
) ;
}
Use IconButton as direct children for toolbar items, and HorizontalFloatingToolbar.FloatingActionButton for the primary action.
ToolbarWithFABExample.tsx import {
Host ,
HorizontalFloatingToolbar ,
IconButton ,
Icon ,
} from '@expo/ui/jetpack-compose' ;
export default function ToolbarWithFABExample ( ) {
return (
< Host matchContents >
< HorizontalFloatingToolbar >
< IconButton onClick = { ( ) => console . log ( 'Edit pressed' ) } >
< Icon
source = { require ( './assets/edit.xml' ) }
contentDescription = " Edit"
/>
</ IconButton >
< IconButton onClick = { ( ) => console . log ( 'Share pressed' ) } >
< Icon
source = { require ( './assets/share.xml' ) }
contentDescription = " Share"
/>
</ IconButton >
< HorizontalFloatingToolbar.FloatingActionButton
onPress = { ( ) => console . log ( 'Add pressed' ) } >
< Icon
source = { require ( './assets/add.xml' ) }
contentDescription = " Add"
/>
</ HorizontalFloatingToolbar.FloatingActionButton >
</ HorizontalFloatingToolbar >
</ Host >
) ;
}
API
import { HorizontalFloatingToolbar } from '@expo/ui/jetpack-compose' ;
Components Type: React.Element < HorizontalFloatingToolbarProps >
Renders a HorizontalFloatingToolbar component.
A horizontal toolbar that floats above content, typically used for action buttons.
HorizontalFloatingToolbarProps
The children of the component.
Per-slot color overrides. Any field set here replaces the corresponding
color from the variant default; unset fields fall back to the variant.
Optional • Type: ModifierConfig[]
Modifiers for the component.
Optional • Literal type: string • Default: 'standard'
The variant of the horizontal floating toolbar.
Acceptable values are: 'standard' | 'vibrant'
Type: React.Element < HorizontalFloatingToolbarFloatingActionButtonProps >
FloatingActionButton component for HorizontalFloatingToolbar.
This component marks its children to be rendered in the FAB slot.
HorizontalFloatingToolbarFloatingActionButtonProps
The children of the component.
Optional • Type: ( ) => void
A callback that is called when the button is pressed.
Types