Interface

ShadowScope

Scope that can be used to define properties to render either a drop shadow or inner shadow.

Source set: Common
public interface ShadowScope : Density

Scope that can be used to define properties to render either a drop shadow or inner shadow. This includes the radius, spread, color, brush, alpha, blendMode, and offset parameters.

Properties

radius

Source set: Common
public var radius: Float

Blur radius of the shadow, in pixels. Defaults to 0.

spread

Source set: Common
public var spread: Float

Spread parameter that adds to the size of the shadow, in pixels. Defaults to 0.

color

Source set: Common
public var color: Color

Color of the shadow, Defaults to Color.Black. Attempts to provide Color.Unspecified will fallback to rendering with Color.Black. This parameter is consumed if brush is null.

brush

Source set: Common
public var brush: Brush?

The brush to use for the shadow. If null, the color parameter is consumed instead

alpha

Source set: Common
public var alpha: Float

Opacity of the shadow. Defaults to 1f indicating a fully opaque shadow

blendMode

Source set: Common
public var blendMode: BlendMode

Blending algorithm used by the shadow. Defaults to BlendMode.SrcOver

offset

Source set: Common
public var offset: Offset

Offset of the shadow. Defaults to Offset.Zero.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: