Custom SwiftUI Modifier with Expo UI

Beto, April 2026

I built a rotatingBorder modifier for Inkigo, my AI tattoo app doing ~$650/mo MRR. Drop it on any Expo UI view, chain it like any other modifier, get an animated gradient border.

New to local Expo modules? Start with Extending Expo UI with SwiftUI, then come back.

The modifier

This is a standard SwiftUI ViewModifier with one extra thing: it conforms to Record, and its props are declared with @Field. That's what lets Expo UI pass JS values into Swift.

After registering and exporting the modifier, you can use it on any Expo UI view like you would any other modifier:

import { rotatingBorder } from "@/modules/animated-input";
 
// ... rest of the view
 
<VStack
  modifiers={[
    rotatingBorder({
      isActive: true,
      tint: Color.ios.systemOrange,
      lineWidth: 1,
    }),
  ]}
/>;

Want to go deeper?

My React Native course has a full section on native modules: registering custom views, writing graceful Android fallbacks, and shipping platform-specific code the right way.

LessonCreate a Native View

Want weekly tips on building mobile apps with AI? Join the newsletter. 15k+ developers already reading.

Let's connect!