Layout containers
Last updated
Last updated
Layout containers allow you to position your components in a different ways to create both simple and complex views. Different container functions can be stacked together to achieve even the most sophisticated layouts. Built-in containers are available in the dev.kilua.panel
package.
The flexPanel
composable function allows you to display children components with all the power of W3C recommendation. In the flex layout model, the children components can be laid out horizontally or vertically, left to right, right to left, top to bottom or bottom to top. Children can change their sizes, either growing or shrinking. The specification is quite complex and most of the available CSS properties are supported with Kotlin enum values.
BothhPanel
and vPanel
functions are convenient shortcuts for frequently used horizontal (left to right) and vertical (top to bottom) flexbox layouts.
The splitPanel
composable function divides the available space into two areas and provides a possibility to resize the panes by the user. Both directions (vertical and horizontal) are supported.
The gridPanel
composable function allows you to display children components with the use of W3C recommendation - a two-dimensional layout system, which allows the children to be positioned into arbitrary slots in a predefined flexible or fixed-size grid. This specification is even more complex than Flexbox, but is still supported mostly with Kotlin enum values and type-safe parameters.
The lazyRow
and lazyColumn
composable functions are ported from the project. The functions allow displaying large amounts of information by only loading the items that are necessary.
Additional, Bootstrap based composables, including accordeon
, carousel
, offcanvas
and tabPanel
are available in the module.
Additional Jetpack-like composables, including Box
, Row
and Column
are available in the module.