How to Add a Floating Action Button (FAB) in React Native

How to Use a Floating Action Button in React Native?

  • A Floating Action Button (FAB) is a round button that floats above the UI, commonly used for main actions like Add, Create, or Edit.
  • React Native doesn’t have a built-in FAB, but you can create one with TouchableOpacity and icon libraries like Feather.
  • FABs are great for navigation, launching modals, or adding new items in to-do, notes, and calendar apps.
  • A well-designed FAB uses color, size, shadow, and position to stand out from the rest of the UI.

AppFabButton Component Example

AppFabButton.tsx
import React, { ComponentProps } from 'react';
import { StyleSheet, TouchableOpacity, ViewStyle } from 'react-native';
import { Feather } from '@expo/vector-icons';
import { Colors } from '@/src/style';

type FabProps = {
  onPress: () => void;
  iconName: ComponentProps<typeof Feather>['name'];
  style?: ViewStyle;
  iconColor?: string;
  iconSize?: number;
};

export const AppFabButton = ({
  onPress,
  iconName,
  style,
  iconColor = '#fff',
  iconSize = 24,
}: FabProps) => {
  return (
    <TouchableOpacity onPress={onPress} activeOpacity={0.7} style={[styles.container, style]}>
      <Feather name={iconName} size={iconSize} color={iconColor} />
    </TouchableOpacity>
  );
};

const styles = StyleSheet.create({
  container: {
    position: 'absolute',
    bottom: 12,
    right: 12,
    width: 56,
    height: 56,
    borderRadius: 28,
    backgroundColor: Colors.PrimaryLighter, // Default iOS-like blue; change as needed
    justifyContent: 'center',
    alignItems: 'center',
    elevation: 4, // Android shadow
    shadowColor: '#000', // iOS shadow
    shadowOpacity: 0.3,
    shadowRadius: 3,
    shadowOffset: { width: 0, height: 2 },
  },
});
  • AppFabButton is a reusable floating action button that accepts any Feather icon and custom styles.
  • It positions itself in the bottom-right corner by default, but you can override the style prop to move it anywhere.
  • The iconName prop lets you pick any Feather icon (like plus, edit, camera, etc).
  • TouchableOpacity provides smooth feedback and supports accessibility.
  • You can easily adjust the icon color and size with props.

Key Takeaways

  • You can add a floating action button in React Native using TouchableOpacity and an icon component.
  • FABs are perfect for main app actions and improve user workflow in any mobile app.
  • AppFabButton is fully customizable—change its icon, color, size, and position to fit your needs.
  • Position your FAB absolutely to float above other UI elements.
  • Add elevation and shadow for a Material Design look and feel on Android and iOS.
  • You can combine multiple FABs for advanced actions or multi-step workflows.

Hey! If you're enjoying this content, I write regularly about building apps with React Native, Expo, Firebase, and modern frontend tools.
👉 Join my newsletter here

I'm Matt — a Senior React Native developer with 6+ years of experience. I've shipped over 30 web and mobile apps, led dev teams, and specialize in launching MVPs fast using tools like Expo, TypeScript, Firebase, and AI. Whether it's B2B SaaS, marketplaces, or social platforms, I've probably built something like it.

Have a Product in Mind?

We help founders and small teams turn product ideas into working apps. Send us a message—we’d love to hear what you're building.