Skip to content

compas_threejs.ui.number_field.NumberField ¤

NumberField(
    min: float = 0,
    max: float = 100,
    step: float = 1,
    value: float = 10,
    action=None,
    label: str | None = None,
    **kwargs,
)

A number field is a text field that only accepts numbers.

Parameters:

  • value (float, default: 10 ) –

    The initial value of the number field.

  • min (float, default: 0 ) –

    The minimum value of the number field.

  • max (float, default: 100 ) –

    The maximum value of the number field.

  • step (float, default: 1 ) –

    The step size of the number field.

  • action (callable, default: None ) –

    The callback invoked when the value changes.

  • label (str, default: None ) –

    The label displayed with the number field.