# CarouselItemScope

Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/carousel/CarouselItemScope.kt+class:androidx.compose.material3.carousel.CarouselItemScope) Common/All
- Cmn

  ```
  sealed interface CarouselItemScope
  ```

*** ** * ** ***

Receiver scope for `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/package-summary#Carousel(androidx.compose.material3.carousel.CarouselState,androidx.compose.foundation.gestures.Orientation,kotlin.Function2,androidx.compose.foundation.layout.PaddingValues,kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,kotlin.Function2)` item content.

## Summary

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#(androidx.compose.ui.Modifier).maskBorder(androidx.compose.foundation.BorderStroke,androidx.compose.ui.graphics.Shape)(border: https://developer.android.com/reference/kotlin/androidx/compose/foundation/BorderStroke, shape: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)` Draw a border on the composable using the given `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#(androidx.compose.ui.Modifier).maskBorder(androidx.compose.foundation.BorderStroke,androidx.compose.ui.graphics.Shape)`, taking into account the item's size in the cross axis and mask in the main axis. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#(androidx.compose.ui.Modifier).maskClip(androidx.compose.ui.graphics.Shape)(shape: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)` Clips the composable to the given `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#(androidx.compose.ui.Modifier).maskClip(androidx.compose.ui.graphics.Shape)`, taking into account the item's size in the cross axis and mask in the main axis. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/GenericShape` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#rememberMaskShape(androidx.compose.ui.graphics.Shape)(shape: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)` Converts and remembers `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#rememberMaskShape(androidx.compose.ui.graphics.Shape)` into a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/GenericShape` that uses the intersection of the carousel item's mask Rect and Size as the final shape's bounds. | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemDrawInfo` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#carouselItemDrawInfo()` Information regarding the carousel item, such as its minimum and maximum size. | Cmn |

## Public functions

### Modifier.maskBorder

Cmn Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/carousel/CarouselItemScope.kt+function:maskBorder)

```
@Composable
fun Modifier.maskBorder(border: BorderStroke, shape: Shape): Modifier
```

Draw a border on the composable using the given `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#(androidx.compose.ui.Modifier).maskBorder(androidx.compose.foundation.BorderStroke,androidx.compose.ui.graphics.Shape)`, taking into account the item's size in the cross axis and mask in the main axis.

| Parameters |
|---|---|
| `border: https://developer.android.com/reference/kotlin/androidx/compose/foundation/BorderStroke` | the border to be drawn around the composable |
| `shape: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | the shape of the border |

### Modifier.maskClip

Cmn Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/carousel/CarouselItemScope.kt+function:maskClip)

```
@Composable
fun Modifier.maskClip(shape: Shape): Modifier
```

Clips the composable to the given `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#(androidx.compose.ui.Modifier).maskClip(androidx.compose.ui.graphics.Shape)`, taking into account the item's size in the cross axis and mask in the main axis.

| Parameters |
|---|---|
| `shape: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | the shape to be applied to the composable |

### rememberMaskShape

Cmn

```
@Composable
fun rememberMaskShape(shape: Shape): GenericShape
```

Converts and remembers `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#rememberMaskShape(androidx.compose.ui.graphics.Shape)` into a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/GenericShape` that uses the intersection of the carousel item's mask Rect and Size as the final shape's bounds.

This method is useful if using a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` in a Modifier other than `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#(androidx.compose.ui.Modifier).maskClip(androidx.compose.ui.graphics.Shape)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/carousel/CarouselItemScope#(androidx.compose.ui.Modifier).maskBorder(androidx.compose.foundation.BorderStroke,androidx.compose.ui.graphics.Shape)` where the shape should follow the changes in the item's mask size.

| Parameters |
|---|---|
| `shape: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | The shape that will be converted and remembered and react to changes in the item's mask. |

## Public properties

### carouselItemDrawInfo

Cmn

```
val carouselItemDrawInfo: CarouselItemDrawInfo
```

Information regarding the carousel item, such as its minimum and maximum size.

The item information is updated after every scroll. If you use it in a composable function, it will be recomposed on every change causing potential performance issues. Avoid using it in the composition.