Back to Library
Gradient Border Card

Gradient Border Card

by Luiz Mello

@luizmellodev
cardgradientborderanimationeffect

Description

Stunning cards with animated gradient borders. Includes rotating gradients, glowing borders, dashed borders, pulsing effects, neon borders, and shimmer effects. Multiple preset styles (rainbow, fire, ocean, sunset) and fully customizable. Perfect for premium features and special content.

SwiftUI Code

11 files • Scroll to see all →
public struct GradientBorderStyle {
    let gradientColors: [Color]
    let lineWidth: CGFloat
    let cornerRadius: CGFloat
    let animated: Bool
    let animationSpeed: Double
    
    public init(
        gradientColors: [Color] = [.blue, .purple, .pink],
        lineWidth: CGFloat = 2,
        cornerRadius: CGFloat = 16,
        animated: Bool = true,
        animationSpeed: Double = 3.0
    ) {
        self.gradientColors = gradientColors
        self.lineWidth = lineWidth
        self.cornerRadius = cornerRadius
        self.animated = animated
        self.animationSpeed = animationSpeed
    }

// ... (click "Show full code" to see more)
Viewing: GradientBorderStyle.swift1 of 11