Files
AndroidJetpack/Jetpack-Compose-Playground/docs/layout/box.md
T
2026-07-15 16:57:36 +08:00

24 lines
619 B
Markdown

<!---
This is the API of version 1.2.0
-->
# Box
The children of the Box layout will be stacked over each other. You can use the align modifier to specify where the composable should be drawn.
<p align="center">
<img src ="{{ site.images }}/layout/box/boxdemo.png" height=100 width=300 />
</p>
```kotlin
--8<-- "layout/BoxExample.kt:func"
```
## Content Alignment
You can use the **align** modifier to set the position of a Composable inside the Box
## See also:
* [Official Docs]({{ site.composedoc }}/foundation/layout/package-summary#Box)
* [Full Example Code]({{ site.samplefolder }}/layout/BoxExample.kt)