<div class='type'>Composable Function</div>


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



<h2 id="box-modifier-contentalignment-content">Box</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
@Composable
public fun Box(
    modifier: GlanceModifier = GlanceModifier,
    contentAlignment: Alignment = Alignment.TopStart,
    content: @Composable () -> Unit,
)
```


A layout composable with `content`.

By default, the `Box` will size itself to fit the content, unless a `Dimension` constraint has
been provided. When the children are smaller than the `Box`, they will be placed within the box
subject to the `contentAlignment`. When the `content` has more than one layout child, all of the
children will be stacked on top of each other in the composition order.

Note for App Widgets: `Box` supports up to 10 child elements. Any additional elements will be
truncated from the output.

#### Parameters

| | |
| --- | --- |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The alignment of children within the `Box`. |
| content | The content inside the `Box`. |