AI Suggestion Pills with Halo Rise
Tapping a sparkle button beside a chat input raises an oval purple halo that tints the conversation, then tilted cream pills fly in one by one on an underdamped spring. The halo widens to a circle as more arrive. Shared core, SVG on React Native.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "ai-suggestion-pills-with-halo-rise" to this project. The full source is attached at the end of this prompt. Put the files under components/ai-suggestion-pills-with-halo-rise/, 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
- 15 Nov 2026
- License
- Unlimited commercial projects
- Original design
- Mobbin
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 dark chat-transcript page for an AI companion, with a sparkle button beside the input bar. Tapping it raises a purple halo from the bottom edge, followed by a deep indigo core that tints the conversation text above and then covers it. A suggest label fades in, and five cream pills with slight tilts fly up one after another, overshooting and settling. A white close button turns from gray to white. Midway the whole group climbs two slots and the halo grows into a circle, so the last two pills emerge from behind the close button. Tapping a pill or the close button collapses everything back, and a segmented switch sits at the top.
How it's built
A shared JavaScript core defines the colors, the open and close timelines and a frame function that outputs a display list of groups, rectangles, text, glows and paths. The React Native component renders the list with react-native-svg on a requestAnimationFrame loop. The halo is an SVG radial gradient stretched with a gradient transform, in two layers, one purple and one darker. The pill motion is a closed-form damped oscillator, so no Reanimated is needed. Fonts are loaded with expo-font.
Good for
- Suggested-reply or prompt-starter sheets in an AI chat screen
- Any floating action that opens a stack of options over dimmed content
- Wellness or journaling apps where a soft glow signals a calm mode
Dependencies
react-native-svgexpo-fontreact-native