lenards/elm-ui-patternfly/2.1.0

NOTE: the latest version is 4.0.2

PF6.Checkbox

PF6 Checkbox component

Checkboxes allow users to select one or more items from a list.

See: https://www.patternfly.org/components/checkbox

Definition

type Checkbox msg

Opaque Checkbox type

Constructor

{ id : String
, onChange : Bool -> msg
}
-> Checkbox msg

Construct a Checkbox

checkbox
    { id = "my-check"
    , onChange = CheckboxToggled
    }

Content modifiers

withLabel : String -> Checkbox msg -> Checkbox msg

Set the checkbox label

withDescription : String -> Checkbox msg -> Checkbox msg

Set a description below the label

withBody : Element msg -> Checkbox msg -> Checkbox msg

Set body content (arbitrary element) below the checkbox

State modifiers

withChecked : Bool -> Checkbox msg -> Checkbox msg

Set the checked state

Set indeterminate state (partially checked)

Disable the checkbox

Rendering

toMarkup : Checkbox msg -> Element msg

Render the Checkbox as an Element msg