AppBarColumn
Common
Component in Material 3 Compose
An [AppBarColumn] arranges its children in a vertical sequence, and if any children overflow the constraints, an overflow indicator is displayed.
This composable lays out its children from top to bottom. If the children's combined width exceeds the available height, [overflowIndicator] is displayed at the bottom of the column, replacing the content that otherwise cannot fit. The items are constructed through a DSL in [AppBarColumnScope]. Each item provides a way to render itself in the column layout, and an alternative way, to render inside of a dropdown menu, when there is overflow.
Last updated:
Installation
dependencies {
implementation("androidx.compose.material3:material3:1.4.0-alpha14")
}
Overloads
@Composable
@Suppress("ComposableLambdaParameterPosition", "KotlinDefaultParameterOrder")
fun AppBarColumn(
overflowIndicator: @Composable (AppBarMenuState) -> Unit,
modifier: Modifier = Modifier,
maxItemCount: Int = Int.MAX_VALUE,
content: AppBarColumnScope.() -> Unit,
)
Parameters
name | description |
---|---|
overflowIndicator | A composable that is displayed at the end of the column when the content overflows. It receives an [AppBarMenuState] instance. |
modifier | The modifier to be applied to the column. |
maxItemCount | the max amount of items that should render in the column, before starting to use the overflow menu. Consider that using large items or small constraints, will reduce the effective maximum. Note: If the number of items supplied is bigger than max, at most max - 1 items will render, since the last one will be dedicated to the overflow composable. |
content | The content to be arranged in the column, defined using a dsl with [AppBarColumnScope]. |