Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

shadow(_:)

Draws a shadow behind a view.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.shadow(color: Color? = null, radius: Double, x: Double = 0.0, y: Double = 0.0): Modifier

Overview

Modifier.shadow(radius = 0.0)

This is the Kotlin form of SwiftUI View.shadow(color:radius:x:y:): SwiftUI documentation. In Swift it reads:

nonisolated func shadow(color: Color = Color(.sRGBLinear, white: 0, opacity: 0.33), radius: CGFloat, x: CGFloat = 0, y: CGFloat = 0) -> some View

Topics

Overloads

fun Modifier.shadow(color: Color? = null, radius: Double, x: Double = 0.0, y: Double = 0.0): Modifier
SwiftUI View.shadow(color:radius:x:y:)