From c6f2b6f85d151d6d2a2cc68eb05edd7a1e448106 Mon Sep 17 00:00:00 2001 From: jciespuertodelacruz Date: Tue, 20 Jan 2026 08:49:52 +0000 Subject: Initial commit Generated by create-expo-app 3.5.3. --- components/haptic-tab.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 components/haptic-tab.tsx (limited to 'components/haptic-tab.tsx') diff --git a/components/haptic-tab.tsx b/components/haptic-tab.tsx new file mode 100644 index 0000000..7f3981c --- /dev/null +++ b/components/haptic-tab.tsx @@ -0,0 +1,18 @@ +import { BottomTabBarButtonProps } from '@react-navigation/bottom-tabs'; +import { PlatformPressable } from '@react-navigation/elements'; +import * as Haptics from 'expo-haptics'; + +export function HapticTab(props: BottomTabBarButtonProps) { + return ( + { + if (process.env.EXPO_OS === 'ios') { + // Add a soft haptic feedback when pressing down on the tabs. + Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light); + } + props.onPressIn?.(ev); + }} + /> + ); +} -- cgit v1.2.3-54-g00ecf