CardContainer
The CardContainer class is used to group single or multiple Card elements. Each container can either be of type columns or rows, which determines the layout of the cards.
class CardContainer
Do not create CardContainer instances directly. Instead, use the create_container()
method of the Tab class to genereate them.
At least one CardContainer
is required within a Tab
element.
A Tab
can hold multiple CardContainer
objects. Nesting CardContainer
objects inside each other is allowed, meaning you can create complex layouts with nested containers. However, we do not recommend nesting more than 3 CardContainer
objects, as it may result in a poorly structured UI that looks disorganized or cluttered.
Constructor
type
Allowed: "columns"
| "rows"
Default: "columns"
width
Allowed: "auto"
| "full"
Default: "full"
height
Allowed: "auto"
| "full"
Default: "full"
gap
Methods
create_container(type, **kwargs)
Creates a nested CardContainer.
create_card(**kwargs)
Examples
The following examples demonstrate how to create layouts using CardContainers and Cards.
Last updated