---
title: "ScrollFieldDefaults"
description: "Object to hold defaults used by ScrollField."
type: "object"
lastmod: "2026-04-23T11:19:39.160162Z"
---
## API Reference

> Source set: Common

```kotlin
@ExperimentalMaterial3ExpressiveApi
object ScrollFieldDefaults
```

Object to hold defaults used by [ScrollField](/jetpack-compose/androidx.compose.material3/material3/components/ScrollField).

## Properties

### ScrollFieldHeight

> Source set: Common

```kotlin
val ScrollFieldHeight = 200.dp
```

The default height for a [ScrollField](/jetpack-compose/androidx.compose.material3/material3/components/ScrollField). This can be used as a reference when providing a
Modifier.height to the ScrollField to ensure enough vertical space is available to display
the typical three-item layout.

### shape

> Source set: Common

```kotlin
val shape: Shape
```

The default shape for the [ScrollField](/jetpack-compose/androidx.compose.material3/material3/components/ScrollField) container background.

## Functions

### colors

```kotlin
@Composable fun colors(): ScrollFieldColors
```

Default colors used by a [ScrollField](/jetpack-compose/androidx.compose.material3/material3/components/ScrollField).

### colors

```kotlin
@Composable
    fun colors(
        containerColor: Color = Color.Unspecified,
        unselectedContentColor: Color = Color.Unspecified,
        selectedContentColor: Color = Color.Unspecified,
    ) =
        MaterialTheme.colorScheme.defaultScrollFieldColors.copy(
            containerColor = containerColor,
            unselectedContentColor = unselectedContentColor,
            selectedContentColor = selectedContentColor,
        )
```

Creates a [ScrollFieldColors](/jetpack-compose/androidx.compose.material3/material3/classes/ScrollFieldColors) that represents the default container, unselected, and selected
colors used in a [ScrollField](/jetpack-compose/androidx.compose.material3/material3/components/ScrollField).

#### Parameters

| | |
| --- | --- |
| containerColor | The color of the [ScrollField](/jetpack-compose/androidx.compose.material3/material3/components/ScrollField) container. |
| unselectedContentColor | The color of the numerical value(s) visible on the screen that are not chosen. |
| selectedContentColor | The color of the numerical value that is centered and snapped into place. |

### Item

```kotlin
@Composable
    fun Item(index: Int, selected: Boolean, colors: ScrollFieldColors = colors())
```

The default item implementation for [ScrollField](/jetpack-compose/androidx.compose.material3/material3/components/ScrollField).

#### Parameters

| | |
| --- | --- |
| index | the current item index. |
| selected | whether this item is currently selected (centered). |
| colors | the colors to use for the text content. |
