Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

NumberInput

A labelled numeric input (spinner).

Import

from manywidgets import NumberInput

Example

from manywidgets import NumberInput

NumberInput(label="Count", min=0, max=100, step=5, value=10)

API

TraitTypeDefaultDescription
valueFloat0.0Current value.
minFloatNoneOptional minimum.
maxFloatNoneOptional maximum.
stepFloat1.0Step size.
labelUnicode''Label shown above the input.
widget_idUnicode''Stable unique id used for cross-widget linking (auto-assigned).

Linking

Link like any widget (see the linking guide):

from ipywidgets import jsdlink
from manywidgets import Chart, NumberInput

chart = Chart()
w = NumberInput(label="Width", min=200, max=1200, value=800)
jsdlink((w, "value"), (chart, "width"))