Card
Last updated
Last updated
Card
widget in Supervisely is a simple widget that can be used to display information or content in a compact format. It can be controlled by setting loading
/lock
properties and can be collapsed to save space. It provides a straightforward and easy-to-use solution for displaying information clearly and concisely.
Card widget title
type: str
default None
Description text for card widget
type: str
default None
Enable collapsable
property to allow minimize card widget
type: bool
default False
Widget to place in Card widget
type: Widget
default None
Widget to place in top right corner of Card widget
type: Widget
default None
Message to display when card will be locked
type: str
default "Card content is locked"
Widget ID
type: str
default None
You can find this example in our Github repository:
ui-widgets-demos/layouts and containers/001_card/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Card
widgetButtons to enable loading property, lock and collapse Card
widget:
Buttons to unlock, uncollapse and disable loading property of Card
widget:
Use Container
widget to join Button
widgets in groups.
Prepare widgets to display some image.
Card
widgetsInitialize one Card
widget for buttons
Initialize second Card
widget for previewing images.
Prepare a layout for app using Card
widget with the content
parameter.
Create an app object with layout parameter.
Parameters | Type | Description |
---|---|---|
Attributes and Methods | Description |
---|---|
title
str
Card widget title
description
str
Description text for card widget
collapsable
bool
Enable collapsable
property to allow minimize card widget
content
Widget
Widget to place in Card widget
content_top_right
Widget
Widget to place in top right corner of Card widget
lock_message
str
Message to display when card will be locked
widget_id
str
Widget ID
loading
Get or set loading
property.
collapse()
Minimize card widget.
uncollapse()
Expand card widget.
lock()
Lock card widget and show message.
unlock()
Unlock card widget and hide lock message.
is_locked()
Check if card widget is locked.