Flexbox
Last updated
Was this helpful?
Last updated
Was this helpful?
Flexbox
widget in Supervisely is a widget that enables users to arrange other widgets in a flexible and responsive layout. Users can customize the layout by setting the gap between widgets and aligning them to the center. With the Flexbox
widget, users can easily create dynamic and adaptable layouts that can be optimized for different devices and screen sizes
widgets
List[Widget]
List if widgets to display in Flexbox
gap
int
Gap between widgets in Flexbox
center_content
bool
Determines whether to place widgets in the center of the window
widget_id
str
ID of the widget
Determine list of Widgets
to display in Flexbox
widget.
type: List[Widget]
Determine gap between Widgets
on Flexbox
.
type: int
default value: 10
Determines whether to place widgets in the center of the window.
type: bool
default value: False
ID of the widget.
type: str
default value: None
You can find this example in our Github repository:
ui-widgets-demos/layouts and containers/005_flexbox/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Flexbox
widgetPrepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create an app object with layout parameter.