SwiftUI

How would you implement an interaction like this

How would you implement an interaction like this