Scrubbable Glow Curve Metric Card
A squircle glass card shows a breathing live dot, a large reading, two thin crossing glowing curves over a dashed grid and a yellow highlight point. Dragging along the curve updates the reading and hourly change. Shared core for HTML and React Native.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "scrubbable-glow-curve-metric-card" to this project. The full source is attached at the end of this prompt. Put the files under components/scrubbable-glow-curve-metric-card/, 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, Web
- Requires
- Expo SDK 54+
- Access
- Pro
- Updated
- 16 Nov 2026
- License
- Unlimited commercial projects
- Original design
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 large translucent olive-green glass card on a light gray backdrop. A header has a title, a small yellow Active dot with a soft ring, and a collapse icon. Below are a big glucose reading with a unit and a small triangle with a change-over-the-last-hour line, then a chart with two thin glowing curves that cross and finally narrow into a lens-shaped forecast. Dashed gridlines, a right-hand scale and a time axis frame the plot. A yellow highlighted point with a pale halo marks the current time. Dragging across the chart slides that point along the main curve, and the reading and the change line update, the triangle flipping for a drop.
How it's built
A shared JavaScript core builds the display list for the card, and react-native-svg draws it. A PanResponder converts the touch position into a point on the main curve. The card corners are a superellipse path with twenty segments per corner, and the translucent interior is a vertical gradient plus seven Gaussian blobs fitted to the reference, which stands in for glass without a blur module. The two curves are sine-blend segments between nodes. On entry the card fades up, the number counts, the curves reveal left to right, and the markers pop. The Active ring pulses on a requestAnimationFrame loop.
Good for
- A glucose, heart-rate or other single-metric tracking card
- A scrubbable line chart where touching the plot updates a headline number
- Glass-style cards on a plain background without native blur
Dependencies
react-native-svgreact-native