ThemeShadow
public struct ThemeShadow : Equatable
Defines a shadow style for UI elements, including color, blur radius, and offset values. Used to indicate elevation, depth, or focus across your app.
-
The color of the shadow. Typically black with opacity in light mode or white with opacity in dark mode.
Declaration
Swift
public let color: Color -
The blur radius of the shadow. Larger values create softer, more diffused shadows.
Declaration
Swift
public let radius: CGFloat -
The horizontal offset of the shadow. Positive values move the shadow to the right; negative to the left.
Declaration
Swift
public let x: CGFloat -
The vertical offset of the shadow. Positive values move the shadow down; negative values move it up.
Declaration
Swift
public let y: CGFloat -
Initializes a new shadow definition.
Declaration
Swift
public init(color: Color, radius: CGFloat, x: CGFloat, y: CGFloat)Parameters
colorThe shadow color.
radiusThe blur radius of the shadow.
xHorizontal offset in points.
yVertical offset in points.
-
Returns a new
ThemeShadowinstance by copying the current one and applying the specified overrides.Declaration
Swift
func copy( color: Color? = nil, radius: CGFloat? = nil, x: CGFloat? = nil, y: CGFloat? = nil ) -> ThemeShadowParameters
colorOptional override for the shadow color.
radiusOptional override for the blur radius.
xOptional override for the horizontal offset.
yOptional override for the vertical offset.
Return Value
A new
ThemeShadowinstance with the applied overrides.