lenards/elm-ui-patternfly/3.0.0

NOTE: the latest version is 4.0.2

PF6.NumberInput

PF6 NumberInput component

NumberInput allows users to enter a numeric value with stepper controls.

See: https://www.patternfly.org/components/number-input

Definition

type NumberInput msg

Opaque NumberInput type

Constructor

{ value : Float
, onChange : Float -> msg
}
-> NumberInput msg

Construct a NumberInput

numberInput { value = model.count, onChange = CountChanged }

Range modifiers

withMin : Float -> NumberInput msg -> NumberInput msg

Set minimum value

withMax : Float -> NumberInput msg -> NumberInput msg

Set maximum value

withStep : Float -> NumberInput msg -> NumberInput msg

Set step size (default 1)

Content modifiers

withLabel : String -> NumberInput msg -> NumberInput msg

Set visible label

withHelperText : String -> NumberInput msg -> NumberInput msg

Set helper text below the input

withUnit : String -> NumberInput msg -> NumberInput msg

Set unit text displayed after the input (e.g., "%", "GB")

State modifiers

Disable the input

Danger validation state

Warning validation state

Success validation state

Rendering

toMarkup : NumberInput msg -> Element msg

Render the NumberInput as an Element msg