# Shadow

Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/shadow/Shadow.kt+class:androidx.compose.ui.graphics.shadow.Shadow) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0) Common/AllAndroid/JVM
- Cmn

  ```
  class Shadow
  ```

*** ** * ** ***

Group of parameters that represent how a drop shadow or inner shadow should be rendered.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#Shadow(androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Brush,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.DpOffset,kotlin.Float,androidx.compose.ui.graphics.BlendMode)( radius: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, spread: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpOffset, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Creates a group of parameters that represent how a drop shadow or inner shadow should be rendered. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#Shadow(androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.DpOffset,kotlin.Float,androidx.compose.ui.graphics.BlendMode)( radius: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, spread: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpOffset, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Creates a group of parameters that represent how a drop shadow or inner shadow should be rendered. | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#alpha()` Opacity of the shadow | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#blendMode()` Blending algorithm used by the shadow | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#brush()` Optional brush to render the shadow with. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#color()` Color of the shadow. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpOffset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#offset()` The internal offset of the shadow within the geometry provided. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#radius()` The blur radius of the shadow | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#spread()` Spread parameter that adds to the size of the shadow | Cmn |

## Public constructors

### Shadow

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
Shadow(
    radius: Dp,
    brush: Brush,
    spread: Dp = 0.dp,
    offset: DpOffset = DpOffset.Zero,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    blendMode: BlendMode = DefaultBlendMode
)
```

Creates a group of parameters that represent how a drop shadow or inner shadow should be rendered.

| Parameters |
|---|---|
| `radius: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The blur radius of the shadow |
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | Brush used to blend against a mask defined by the shadow geometry |
| `spread: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = 0.dp` | Optional parameter to grow the shadow geometry by |
| `offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpOffset = DpOffset.Zero` | Optional parameter to offset the shadow within the geometry bounds |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Optional opacity of the shadow |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Optional blending algorithm used by the shadow |

### Shadow

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
Shadow(
    radius: Dp,
    color: Color = Color.Black,
    spread: Dp = 0.dp,
    offset: DpOffset = DpOffset.Zero,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    blendMode: BlendMode = DefaultBlendMode
)
```

Creates a group of parameters that represent how a drop shadow or inner shadow should be rendered.

| Parameters |
|---|---|
| `radius: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The blur radius of the shadow |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Black` | The color of the shadow. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` is provided, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Black()` will be used as a default. |
| `spread: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = 0.dp` | Optional parameter to grow the shadow geometry by |
| `offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpOffset = DpOffset.Zero` | Optional parameter to offset the shadow within the geometry bounds |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Optional opacity of the shadow |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Optional blending algorithm used by the shadow |

## Public functions

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### alpha

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
val alpha: Float
```

Opacity of the shadow

### blendMode

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
val blendMode: BlendMode
```

Blending algorithm used by the shadow

### brush

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
val brush: Brush?
```

Optional brush to render the shadow with.

### color

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
val color: Color
```

Color of the shadow. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` is provided, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Black()` will be used as a default. This color is only used if `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow#brush()` is null.

### offset

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
val offset: DpOffset
```

The internal offset of the shadow within the geometry provided.

### radius

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
val radius: Dp
```

The blur radius of the shadow

### spread

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
val spread: Dp
```

Spread parameter that adds to the size of the shadow