lenards/elm-ui-patternfly/3.0.0

NOTE: the latest version is 4.0.2

PF6.Form

PF6 Form and FormGroup components

Forms are used to collect, validate, and submit user input.

See: https://www.patternfly.org/components/forms/form

Definition

type Form msg

Opaque Form type

type FormGroup msg

Opaque FormGroup type

Constructors

form : List (Element msg) -> Form msg

Construct a Form with a list of field elements

formGroup : Element msg -> FormGroup msg

Construct a FormGroup wrapping a single field element

Form modifiers

withHorizontal : Form msg -> Form msg

Horizontal form layout — labels beside fields

withLimitWidth : Form msg -> Form msg

Limit form width for readability (max ~500px)

FormGroup modifiers

withLabel : String -> FormGroup msg -> FormGroup msg

Set the FormGroup label

withHelperText : String -> FormGroup msg -> FormGroup msg

Set helper text below the field

Mark the field as required (adds asterisk to label)

withValidation : Validation -> FormGroup msg -> FormGroup msg

Set validation state

Rendering

toMarkup : Form msg -> Element msg

Render the Form as an Element msg

groupToMarkup : FormGroup msg -> Element msg

Render a FormGroup as an Element msg