Stepper

Introduction

Stepper widget in Supervisely is a graphical user interface tool that allows users to navigate through a sequence of widgets step by step. It is particularly useful for inspecting large size content in apps. The widget offers navigation option to set active step from code. Overall, Stepper widget is a helpful tool for navigating through complex interfaces and exploring large sets of data.

Function signature

Stepper(
    titles=[],
    widgets=[],
    active_step=1,
    widget_id=None,
)

Parameters

Parameters
Type
Description

titles

list

Widgets titles

widgets

list

List of widgets provided in Stepper

active_step

int

Set active step

widget_id

str

ID of the widget

titles

Determine widgets titles.

type: list

default value: []

widgets

Determine widgets provided in Stepper.

type: list

default value: []

active_step

Set active step.

type: int

default value: 1

widget_id

ID of the widget.

type: str

default value: None

Methods and attributes

Attributes and Methods
Description

set_active_step(value: int)

Set active step value.

get_active_step()

Returns active step value.

Mini App Example

You can find this example in our Github repository:

ui-widgets-demos/layouts and containers/010_stepper/src/main.py

Import libraries

Init API client

First, we load environment variables with credentials and init API for communicating with Supervisely Instance:

Initialize Card widgets we will use

Initialize Stepper widget

Initialize Button widgets we will use to increase and decrease Stepper steps

Create app layout

Prepare a layout for app using Card widget with the content parameter and place widget that we've just created in the Container widget.

Create app using layout

Create an app object with layout parameter.

Add functions to control widgets from python code

Last updated

Was this helpful?