Hold-to-Delete Context Menu
Long-pressing an app icon lifts it and springs a menu card out below; holding Delete inflates the row into a pill swept by a soft red band, then the row fades and the card shrinks. One timeline drives HTML and React Native.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "hold-to-delete-context-menu" to this project. The full source is attached at the end of this prompt. Put the files under components/hold-to-delete-context-menu/, install the listed dependencies with `npx expo install`, and render it on a route I can open. Keep the timing and easing values documented in the source comments. Replace the sample copy and artwork with content from my app, or leave placeholders and list what I still need to supply. === Source files are attached here for paid plans ===
Details
- Platforms
- iOS, Android
- Requires
- Expo SDK 54+
- Access
- Pro
- Updated
- 24 Nov 2026
- License
- Unlimited commercial projects
- Original design
- @a_cucos on X
Are you the designer? Ask us to change or remove this.
Add pieces from the terminal or let your agent fetch them. Until then, Copy prompt does the same job. Docs
What it does
A long-press context menu on a dark home-screen icon grid. Pressing and holding an app icon lifts it out of the dimmed, blurred grid and enlarges it. After half a second a menu card springs open directly under the icon, holding a title, three line-icon rows with gray placeholder bars, and a red delete row at the bottom. Pressing and holding the delete row lifts it into a pill wider than the card while a soft pink band of light sweeps across it from left to right. If the finger stays down until the sweep ends, the pill settles back, the row fades and the card shrinks around the remaining four rows. Releasing early cancels, and tapping outside closes the menu.
How it's built
A shared JavaScript file holds the timeline and a small state machine fed by five press and release moments. It returns a full display list of rects, paths, text, gradients, clips and a blur definition for any time. The component maps those nodes one to one onto react-native-svg, and a few transparent Pressable areas capture the touches. A requestAnimationFrame clock supplies time, and the demo, interactive and frozen-time modes share the same code. The menu card uses a damped spring, and the other motions are short eased tweens. The entry blur needs a recent react-native-svg.
Good for
- Destructive actions on list rows or home-screen tiles that need a deliberate hold
- A long-press menu for cards, files or apps
- A reference for a hold-progress cue that is a sweeping light instead of a ring
Dependencies
react-native-svgexpo-fontreact-native