
Spotlight Card
A card that follows your finger with a soft spotlight, a lit border and a 3D tilt, plus optional holographic foil. Ships with an animated MeshGradient aurora background.
- card
- gesture
- gradient
snippet.swift197 lines
3 files • Scroll to see all →
/// A card that reacts to your finger: a soft spotlight follows the touch,/// the border lights up nearest to it, and the card tilts in 3D toward/// the press. Optional holographic foil for "membership pass" vibes.public struct SpotlightCard<Content: View>: View { var cornerRadius: CGFloat var glowColor: Color var maxTilt: Double var holographic: Bool let content: Content @State private var location: CGPoint = .zero @State private var size: CGSize = .zero @State private var isTouching = false public init( cornerRadius: CGFloat = 28, glowColor: Color = .white, maxTilt: Double = 9, holographic: Bool = false, @ViewBuilder content: () -> Content// ... (click "Show full code" to see more)Viewing: SpotlightCard.swift•1 of 3