Spotlight Pattern Membership Card Tilt
A membership card with a batik-style pattern in six colors and three designs. A spotlight under the cursor lights the pattern lines and the card tilts slightly in 3D toward it. Patterns are SVG; React Native uses react-native-svg radial masks.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "spotlight-pattern-membership-card-tilt" to this project. The full source is attached at the end of this prompt. Put the files under components/spotlight-pattern-membership-card-tilt/, 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
- 6 Oct 2026
- License
- Unlimited commercial projects
- Original design
- @muhraufan 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 credit-card-sized membership card with a brand mark, member label, name, join date and number over a diagonal gradient, available in several colorways and three patterns: straight diagonal stripes, a lattice of petal shapes and a wavy diagonal line. The pattern is nearly invisible at rest. When a cursor moves over the card, a soft spotlight follows it and lights up the pattern lines beneath it, the card face brightens slightly and the card tilts a few degrees toward the pointer. On touch screens, pressing and dragging drives the same effect, and releasing fades it out.
How it's built
The pattern is drawn twice with react-native-svg: a faint base layer, and a brighter copy revealed through an SVG mask with a radial gradient centered on the pointer, with another soft white glow above. A shared JavaScript module holds colors, pattern path geometry and a frame function that eases the spotlight toward the pointer and runs the tilt as a spring. Pattern geometry is generated as path strings so both web and native render the same shapes. A requestAnimationFrame loop advances the motion.
Good for
- A loyalty, membership or wallet card with a hover or press highlight
- A themed card whose pattern and color the user can pick
- A reference for a pointer-following spotlight mask in SVG
Dependencies
react-native-svgreact-native