API Docs
Numeric

Numeric

Adds a Numeric widget in the sidebar.

import mercury as mr
 
# add numeric widget
my_number = mr.Numeric(value=0, min=0, max=10, label="Your favourite number", step=1)
  
# access widget value
print(f"Value is {my_number.value}")

Parameters

  • value (float) - initial value in the widget.
  • min (float) - minimum allowed value in the widget.
  • max (float) - maximum allowed value in the widget.
  • label (string) - description of the widget.
  • step (float) - value of change after click.
  • url_key (string) - set this value if you would like to set Numeric value with URL paramters.
  • disabled (boolean) - disable widget in the sidebar, default is set to False.
  • hidden (boolean) - hide widget in the sidebar, default is set to False.