Layout containers
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.
flexPanel
The flexPanel
composable function allows you to display children components with all the power of CSS Flexible Box Layout Module 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.
hPanel, vPanel
BothhPanel
and vPanel
functions are convenient shortcuts for frequently used horizontal (left to right) and vertical (top to bottom) flexbox layouts.
gridPanel
The gridPanel
composable function allows you to display children components with the use of CSS Grid Layout Module 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.
splitPanel
The splitPanel
function is defined in the kilua-splitjs
module.
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.
lazyRow, lazyColumn
The lazyRow
and lazyColumn
functions are defined in the kilua-lazy-layouts
module.
The lazyRow
and lazyColumn
composable functions are ported from the Lazy layouts for Compose HTML project. The functions allow displaying large amounts of information by only loading the items that are necessary.
Bootstrap containers
Additional, Bootstrap based composables, including accordeon
, carousel
, offcanvas
and tabPanel
are available in the kilua-bootstrap
module.
Jetpack containers
Additional Jetpack-like composables, including Box
, Row
and Column
are available in the kilua-jetpack
module.
Last updated