Course contentsShow
← React Native
Lesson 214 of 1,5553. Core Primitive ComponentsFree lesson

Building Bottom Sheet Interfaces

Learners will create sliding drawers for secondary navigation or contextual actions.

In this lesson, you will learn how to build interactive bottom sheet interfaces to provide secondary navigation or contextual actions without taking the user away from their current screen.

Understanding the Bottom Sheet

A bottom sheet is essentially a container that slides up from the bottom edge of the screen. Unlike a standard modal that often blocks the entire view, a bottom sheet is "partially covering." It feels like an extension of the current view, making it perfect for showing extra details, filter options, or quick settings while keeping the background context visible.

The Anatomy of a Drawer

At its core, a bottom sheet is just a View that you position absolutely at the bottom of your screen. To make it feel like a professional component, we use three layers:

  1. The Overlay: A semi-transparent View that sits behind the sheet to dim the main content.
  2. The Sheet Container: A View with a defined height and rounded top corners.
  3. The Handle: A small, pill-shaped View at the top of the sheet that acts as a visual cue for the user to drag or interact with.

Here is a simplified structure of how you might define the layout:

<View style={styles.container}>
  {/* Main App Content */}
  
  {/* The Bottom Sheet */}
  <View style={styles.sheetContainer}>
    <View style={styles.handle} />
    <Text>Contextual Actions</Text>
  </View>
</View>

const styles = StyleSheet.create({
  sheetContainer: {
    position: 'absolute',
    bottom: 0,
    width: '100%',
    height: 300,
    backgroundColor: 'white',
    borderTopLeftRadius: 20,
    borderTopRightRadius: 20,
    // Add shadow/elevation here
  },
  handle: {
    width: 40,
    height: 5,
    borderRadius: 3,
    backgroundColor: '#ccc',
    alignSelf: 'center',
    marginVertical: 10,
  }
});

Why use them?

Bottom sheets are excellent for "secondary navigation." If a user is viewing a list of items and wants to sort them, a bottom sheet provides a smooth transition that doesn't feel like a heavy page change. Because they are positioned absolutely, they sit on top of your existing lists or images, allowing the user to peek at the content underneath while they make their selection.

Key Takeaway: Bottom sheets act as floating, non-intrusive containers that provide context-aware functionality while keeping the user grounded in the main view.