DotPattern
is a SwiftUI component for generating a dot pattern background. It provides customization options for setting the dot color, spacing between dots, brightness, and background color.
Include the DotPattern.swift
file in your SwiftUI project. File Link
dotColor: Color
(Default: Color.blue
) - The color of the dots.spacing: CGFloat
(Default: 0
) - Additional spacing between dots.brightness: Double
(Default: 1.0
, Range: 0.0-1.0
) - Opacity of the dots.backgroundColor: Color
(Default: Color.black
) - The background color of the pattern.Here’s how you can use the DotPattern
component with default parameters:
Here’s how you can use the DotPattern
component with custom parameters:
DotPattern
is a SwiftUI component for generating a dot pattern background. It provides customization options for setting the dot color, spacing between dots, brightness, and background color.
Include the DotPattern.swift
file in your SwiftUI project. File Link
dotColor: Color
(Default: Color.blue
) - The color of the dots.spacing: CGFloat
(Default: 0
) - Additional spacing between dots.brightness: Double
(Default: 1.0
, Range: 0.0-1.0
) - Opacity of the dots.backgroundColor: Color
(Default: Color.black
) - The background color of the pattern.Here’s how you can use the DotPattern
component with default parameters:
Here’s how you can use the DotPattern
component with custom parameters: