# ClipScope

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/style/StyleScope.kt+class:androidx.compose.foundation.style.ClipScope) Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.12.0) Common/All
- Cmn

  ```
  @ExperimentalFoundationStyleApi
  interface ClipScope
  ```
Known direct subclasses [LayerStyleScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/LayerStyleScope)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/LayerStyleScope` | An interface that introduces the graphics layer property to a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` receiver scope. |

Known indirect subclasses [StyleScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` | A `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` is the receiver scope of a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` lambda. |

*** ** * ** ***

An interface that introduces the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ClipScope#clip(kotlin.Boolean)` property to a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` receiver scope.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` |   |

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ClipScope#clip(kotlin.Boolean)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Clips the component to its bounds. | Cmn |

## Public functions

### clip

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

```
fun clip(value: Boolean = true): Unit
```

Clips the component to its bounds. If a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ShapeScope#shape(androidx.compose.ui.graphics.Shape)` is also applied, it clips to the shape. When clip is `true` content that overflows the component's bounds is not drawn.

This property is *not* inherited

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | `true` to clip (default), `false` to allow drawing outside bounds. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ShapeScope#shape(androidx.compose.ui.graphics.Shape)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draw/clip.modifier#(androidx.compose.ui.Modifier).clip(androidx.compose.ui.graphics.Shape)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draw/clipToBounds.modifier#(androidx.compose.ui.Modifier).clipToBounds()` |   |