Squircle Diffuse Metric Widgets
Five rounded-square cards use diffuse gradients from a dark core to a bright edge: a dot-ring average, a range slider with a draggable triangle, a white dot-matrix card and two colored cards. Values count up and dots light one by one.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "squircle-diffuse-metric-widgets" to this project. The full source is attached at the end of this prompt. Put the files under components/squircle-diffuse-metric-widgets/, 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 set of five dark health widgets in a grid, plus the same variability card on its own over a pink backdrop. One wide card shows an average reading beside a ring of dot-matrix digits and two crossing yellow arcs. A time-in-range card has a gradient bar with a triangle marker you can drag. A variability card shows a percentage next to a nine-dot grid, and two more cards cover a vitamin level and a spike count. Cards fade in one after another, the numbers count up from zero and the dots light one at a time. Each card is a superellipse rather than a plain rounded rectangle, with a diffuse color glow inside.
How it's built
A shared JavaScript core returns a display list for each widget and for the whole set, and react-native-svg draws it, while a PanResponder moves the range marker. The card outline is a superellipse path with twenty segments per corner, so every platform draws the same shape. The glow inside each card is a stack of elliptical radial gradients fitted to the reference, dark in the middle and brighter at the edge. The entrance is time-driven from a requestAnimationFrame loop. Typefaces are iOS system fonts, referenced by name, so no font files are bundled.
Good for
- Health, glucose or fitness widgets that show one number each
- A dashboard of small tiles with a distinct color mood per metric
- A draggable range marker on a gradient bar
Dependencies
react-native-svgreact-native