rundis/elm-bootstrap/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Bootstrap.Form.Checkbox

This module allows you to create Bootstrap styled checkboxes.

Creating

checkbox : List (Option msg) -> String -> Html msg

Create a checkbox element

Checkbox.checkbox
    [ Checkbox.checked True
    , Checkbox.onCheck MyCheckMsg
    ]
custom : List (Option msg) -> String -> Html msg

Create a composable Bootstrap custom styled checkbox

Checkbox.custom
    [ Checkbox.checked True
    , Checkbox.onCheck MyCheckMsg
    ]

Options

checked : Bool -> Option msg

Option to toggle the checkbox checked property on off.

inline : Option msg

Use this option to display checkboxes inline.

indeterminate : Option msg

Option to set the indeterminate property of a checkbox

Note: A checkbox can't be both indeterminate and checked, so if you set both the last one provided in the list of options to the checkbox function "wins".

disabled : Bool -> Option msg

Option to disable the checkbox

onCheck : (Bool -> msg) -> Option msg

Shorthand for assigning an onCheck handler for a checkbox.

attrs : List (Attribute msg) -> Option msg

Use this function to handle any Html.Attribute option you wish for your select

success : Option msg

Option to color a checkbox with success.

warning : Option msg

Option to color a checkbox with warning.

danger : Option msg

Option to color a checkbox with danger.

type Option msg

Opaque type representing valid customization options for a checkbox