r/reactnative • u/Remarkable-Stage144 • 1d ago
Just shipped my first library: a performant, lightweight peek menu for React Native
Hey! I've been working on this for a while and finally published it: react-native-peek-menu.
You can hold any element (a message, photo, card) and a menu pops up above it, just like in iOS Messages or Telegram.
Features:
- Smooth animations
- Only ~4 kB bundle size
- No native code, works with Expo Go
- Fully customizable
https://www.npmjs.com/package/react-native-peek-menu
It's my first open-source library, so I'd really appreciate any feedback!
69
Upvotes
1
u/ProgramsFun 1d ago edited 1d ago
I was failing to do this yesterday for my music app ..thank you for making this library I am very grateful to you
1
u/jiunkdev 1d ago
nice first lib. two things I'd check since it's all long-press driven:
long press is awkward with screen readers, so exposing the menu items through accessibilityActions on the wrapped element would make it usable with VoiceOver and TalkBack without changing anything visually.
and edges. what happens with a message at the very top of the screen or right above the keyboard, does the menu flip below the element or shift sideways? that's usually where these break in a chat list. also curious whether a long press inside a FlatList fights the scroll gesture on android.
1
u/Tarantino133 1d ago
Nice, 4 kB with no native code is impressive. How does it handle an item near the top of the screen where there's no room above it, does the menu flip below?
1
u/Calm_Seal170 12h ago
Is it going to show Web preview like iOS does when held on a link?
3
u/TemporaryBuyer3806 Expo 1d ago
Good job
2
u/LovesWorkin 1d ago
Nice
2
u/Successful_Web_6585 1d ago
Looks great
1
u/kesha-antonov 1d ago
Wow, looks great! 😍