Get Started
UI Examples/Tutorials
- What is zero-true?
- State in zero-true
- User State in zero-true
- Buttons in Zero-True
- Sliders in zero-true
- Range Sliders in zero-true
- Text Inputs in zero-true
- Text Areas in zero-true
- Displaying a Pandas DataFrame in zero-true
- Displaying a Matplotlib Plot in zero-true
- Displaying a Plotly Plot in zero-true
- CLI
- App Bar
- Toolbar
- Cell Types
- Cells
- Layout
- Publishing
API reference
NumberInput
Below are the various attributes you can assign to the component. Utilizing them can allow for modifications to the pre-created object.
id (string): Unique id for a component
hint (string): Hint text for the number input
value (integer | float): The input number value
label (string): Label for the number input
readonly (boolean): If true, the input is read-only
disabled (boolean): If true, the input is disabled
type (string): Ensures that only numbers are accepted on the frontend
step (integer | float): The number to increment or decrement by
Example Usage
import zero_true as zt
sample_numberinput = zt.NumberInput(
id = 'sample_numberinput', # Unique id for a component
hint = 'Press Enter to Submit', # Hint text for the number input
value = 0, # The input number value
label = '', # Label for the number input
readonly = False, # If true, the input is read-only
disabled = False, # If true, the input is disabled
type = 'number', # Ensures that only numbers are accepted on the frontend
step = 1, # The number to increment or decrement by
)