express.ui.input_numeric

express.ui.input_numeric(
    id
    label
    value
    *
    min=None
    max=None
    step=None
    width=None
)

Create an input control for entry of numeric values.

Parameters

id : str

An input id.

label : TagChild

An input label.

value : float

Initial value.

min : Optional[float] = None

The minimum allowed value.

max : Optional[float] = None

The maximum allowed value.

step : Optional[float] = None

Interval to use when stepping between min and max.

width : Optional[str] = None

The CSS width, e.g. â€˜400px’, or ‘100%’

Returns

: Tag

A UI element.

Notes

Server value

A numeric value.

See Also

Examples

#| standalone: true
#| components: [editor, viewer]
#| layout: vertical
#| viewerHeight: 400

## file: app.py
from shiny.express import input, render, ui

ui.input_numeric("obs", "Observations:", 10, min=1, max=100)


@render.code
def value():
    return input.obs()