Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
React Native docs
NavigationReact Native

Collapsible navigation bar

Animate a React Native destination bar in response to native vertical scroll travel.

Public APILumenCollapsibleNavigationBarReact Native

Native example

Use Collapsible navigation bar

Use with the visibility hook when more content space is valuable during deliberate vertical scrolling. Keep safe areas, virtualization, and routing in application code.

View verified React Native runtime capture
Collapsible navigation bar rendered in the Expo web renderer Lumen playground
Verified runtime captureExpo web renderer
tsx
const navigation = useLumenNavigationBarVisibility()

<FlatList
  data={items}
  onScroll={navigation.onScroll}
  scrollEventThrottle={16}
  renderItem={renderItem}
/>
<LumenCollapsibleNavigationBar
  items={destinations}
  value={destination}
  visible={navigation.visible}
  onValueChange={setDestination}
/>

Reference

Public API

The primary shared and platform-specific options exposed by LumenCollapsibleNavigationBar.

APIValues or typeDefaultDescription
visiblebooleanRequiredControls the animated expanded or collapsed state.
itemsreadonly LumenNavigationItem[]RequiredDefines peer destinations.
valuestringRequiredIdentifies the selected destination.
onValueChange(value: string) => voidRequiredRequests destination selection.
containerStyleStyleProp<ViewStyle>undefinedStyles the animated outer container without replacing its collapse dimensions.
accessoryReactNodeundefinedAdds compact application-owned content that collapses with the navigation bar.

Native behavior

Design and accessibility

When to use it

Use with the visibility hook when more content space is valuable during deliberate vertical scrolling. Keep safe areas, virtualization, and routing in application code.

Accessibility

Hidden destinations stop receiving pointer input and are removed from the accessibility tree. The application keeps native list and router ownership.

React Native docsNative primitives