<div class='type'>Compose Modifier</div>

<a id='references'></a>


<h2 id="horizontalscroll-state-enabled-flingbehavior-reversescrolling">horizontalScroll</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun Modifier.horizontalScroll(
    state: ScrollState,
    enabled: Boolean = true,
    flingBehavior: FlingBehavior? = null,
    reverseScrolling: Boolean = false,
) =
    scroll(
        state = state,
        isScrollable = enabled,
        reverseScrolling = reverseScrolling,
        flingBehavior = flingBehavior,
        isVertical = false,
        useLocalOverscrollFactory = true,
    )
```


Modify element to allow to scroll horizontally when width of the content is bigger than max
constraints allow.


In order to use this modifier, you need to create and own `ScrollState`

See the other overload in order to provide a custom `OverscrollEffect`

#### Parameters

| | |
| --- | --- |
| state | state of the scroll |
| enabled | whether or not scrolling via touch input is enabled |
| flingBehavior | logic describing fling behavior when drag has finished with velocity. If `null`, default from `ScrollableDefaults.flingBehavior` will be used. |
| reverseScrolling | reverse the direction of scrolling, when `true`, 0 `ScrollState.value` will mean right, when `false`, 0 `ScrollState.value` will mean left |






<hr class="docs-overload-divider">


<h2 id="horizontalscroll-state-overscrolleffect-enabled-flingbehavior-reversescrolling">horizontalScroll</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun Modifier.horizontalScroll(
    state: ScrollState,
    overscrollEffect: OverscrollEffect?,
    enabled: Boolean = true,
    flingBehavior: FlingBehavior? = null,
    reverseScrolling: Boolean = false,
) =
    scroll(
        state = state,
        isScrollable = enabled,
        reverseScrolling = reverseScrolling,
        flingBehavior = flingBehavior,
        isVertical = false,
        useLocalOverscrollFactory = false,
        overscrollEffect = overscrollEffect,
    )
```


Modify element to allow to scroll horizontally when width of the content is bigger than max
constraints allow.


In order to use this modifier, you need to create and own `ScrollState`

#### Parameters

| | |
| --- | --- |
| state | state of the scroll |
| overscrollEffect | the `OverscrollEffect` that will be used to render overscroll for this modifier. Note that the `OverscrollEffect.node` will be applied internally as well - you do not need to use Modifier.overscroll separately. |
| enabled | whether or not scrolling via touch input is enabled |
| flingBehavior | logic describing fling behavior when drag has finished with velocity. If `null`, default from `ScrollableDefaults.flingBehavior` will be used. |
| reverseScrolling | reverse the direction of scrolling, when `true`, 0 `ScrollState.value` will mean right, when `false`, 0 `ScrollState.value` will mean left |