Thumbtack Jesse Stauffer Nov 9, 2023

SwiftUI In Action: Prototyping An Interactive 3D Carousel Experience

Article Summary

Jesse Stauffer from Thumbtack built a stunning 3D carousel in SwiftUI—then convinced his team NOT to ship it. Here's why that prototype was still worth every line of code.

When designers proposed an interactive 3D rotating carousel with complex animations, the initial reaction was to descope. Instead, Thumbtack's iOS team built a SwiftUI prototype to understand the true implementation cost. The carousel featured cards that rotated along a circular path with dynamic scaling, opacity, and z-index transformations based on drag gestures.

Key Takeaways

Critical Insight

The prototype proved too complex for the user value, but building it early saved the team from investing in a fully polished feature that would have been shelved.

The article includes the exact code for calculating card transformations using trigonometry and explains how SwiftUI Previews accelerated the entire prototyping process.

About This Article

Problem

Jesse Stauffer's team at Thumbtack wasn't sure how much work a 3D carousel would actually take. The designers wanted rotating cards with scaling and opacity effects, but nobody had built a prototype yet. Without one, the team faced a tough choice: strip out features or spend way too much time polishing something that might not ship.

Solution

Stauffer built a SwiftUI prototype using ZStack to layer the cards in 3D space. He used ViewModifiers like scaleEffect, offset, opacity, and zIndex to transform each card. DragGesture with @State variables handled the interactions and automatically re-rendered dependent views when things changed.

Impact

The prototype let the team share early designs across departments and make informed decisions about what to build. The component never shipped because the complexity wasn't worth the value it added. But prototyping saved them from polishing a feature that would have ended up unused.