---
title: "carouselParallaxScrollEffect"
description: "Add a parallax effect to an item by clipping and translating the item as it enters and exits a scrollable viewport."
type: "composable"
lastmod: "2026-09-24"
---
## API Reference

### carouselParallaxScrollEffect

> Source set: Common

```kotlin
@Composable
public fun Modifier.carouselParallaxScrollEffect(
    index: Int,
    state: CarouselParallaxScrollEffectState,
    shape: Shape,
    border: BorderStroke? = null,
): Modifier
```

Add a parallax effect to an item by clipping and translating the item as it enters and exits a
scrollable viewport.

Use [carouselParallaxScrollEffect](/jetpack-compose/androidx.compose.material3/material3/modifiers/carouselParallaxScrollEffect/api) to give any scrollable container the look and feel of a
Material uncontained multi-aspect carousel. Unlike dedicated Carousel composables (i.e.
[HorizontalMultiBrowseCarousel](/jetpack-compose/androidx.compose.material3/material3/components/HorizontalMultiBrowseCarousel/api), [HorizontalCenteredHeroCarousel](/jetpack-compose/androidx.compose.material3/material3/components/HorizontalCenteredHeroCarousel/api)) which are based on Pager and
require all items to be the same size, this modifier can be used with
`androidx.compose.foundation.lazy.LazyRow`, `androidx.compose.foundation.lazy.LazyColumn`,
`androidx.compose.foundation.lazy.grid.LazyHorizontalGrid`,
`androidx.compose.foundation.lazy.grid.LazyVerticalGrid`, or any custom scrollable where items
are able to vary in size.

#### Parameters

| | |
| --- | --- |
| index | the index of the item this modifier is applied to |
| state | the object holding the scrollable container's effect state |
| shape | the shape to clip the item and optional border to |
| border | an optional border to draw around the clipped [shape](/jetpack-compose/androidx.compose.ui/ui-graphics/interfaces/Shape) |

## Code Examples

### MultiAspectCarouselRowSample

```kotlin
@OptIn(ExperimentalMaterial3Api::class)
@Preview
@Sampled
@Composable
fun MultiAspectCarouselRowSample() {
    data class CarouselItem(
        val id: Int,
```
