Container
Last updated
Last updated
Container
widget in Supervisely is a flexible tool that allows for organizing other widgets within it. It can be used to group related widgets, change the layout of widgets, and adjust the sizing of widgets. Container
widget supports both horizontal and vertical layout options.
However, Container
widget does not have any specific functionality on its own but serves as a wrapper for other widgets.
Parameters | Type | Description |
---|---|---|
List of widgets
type: List[Widget]
default []
Container direction (vertical or horizontal)
type: Literal["vertical", "horizontal"]
default "vertical"
Gap between widgets in container
type: int
default 10
Fractions for container splitting. direction
parameter have to be horizontal
type: List[int]
default None
You can find this example in our Github repository:
ui-widgets-demos/layouts and containers/002_container/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Container
widgetContainer
widgetPrepare a layout for app using Card
widget with the content
parameter.
Create an app object with layout parameter.
widgets
List[Widget]
List of widgets
direction
Literal["vertical", "horizontal"]
Container direction (vertical or horizontal)
gap
int
Gap between widgets in container
fractions
List[int]
Fractions for container splitting
widget_id
str
Widget ID