nixCodeX/elm-bootstrap/2.0.0

NOTE: the latest version is 3.1.1

Renamed to aDifferentJT/elm-bootstrap. That is where the repository lives now. It has not been published as a package under the new name.

Versions published as nixCodeX/elm-bootstrap still install under that name. 13 versions of 13 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/aDifferentJT/elm-bootstrap.

What we checked: The repo moved to github.com/aDifferentJT/elm-bootstrap. Rebuilt with git archive from commit f885d7bc86cd of https://github.com/aDifferentJT/elm-bootstrap (zip prefix nixCodeX-elm-bootstrap-f885d7b/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 2e6a38f822336f5bf811c76b8746d02e73463968.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/nixCodeX/elm-bootstrap/zipball/2.0.0/

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.id "myChk"
    , Checkbox.checked True
    , Checkbox.onCheck MyCheckMsg
    ]
    "My checkbox"
custom : List (Option msg) -> String -> Html msg

Create a composable Bootstrap custom styled checkbox

Checkbox.custom
    [ Checkbox.id "myCustomChk"
    , Checkbox.checked True
    , Checkbox.onCheck MyCheckMsg
    ]
    "My Custom Checkbox"
label : List (Attribute msg) -> List (Html msg) -> Label msg

Create a label for a checkbox when using advancedCheckbox or advancedCustom

Checkbox.label [ style "font-size" "24px" ] [ div [ class "disclaimer" ] [ text "My disclaimer" ] ]
advancedCheckbox : List (Option msg) -> Label msg -> Html msg

Create a checkbox element with customized label

Checkbox.advancedCheckbox
    [ Checkbox.id "myChk"
    , Checkbox.checked True
    , Checkbox.onCheck MyCheckMsg
    ]
    (Checkbox.label [ class "mylabelclass" ] [ text "Hello" ])
advancedCustom : List (Option msg) -> Label msg -> Html msg

Create a custom bootstrap styled checkbox element with customized label

Checkbox.advancedCustom
    [ Checkbox.id "myChk"
    , Checkbox.checked True
    , Checkbox.onCheck MyCheckMsg
    ]
    (Checkbox.label [ class "mylabelclass" ] [ text "Hello" ])
type Label msg

Opaque type representing a Checkbox label.

Options

id : String -> Option msg

Set the id for the checkbox. Will automatically set the for attribute for the label

NOTE: You have to use this for custom checkboxes.

checked : Bool -> Option msg

Option to toggle the checkbox checked property on off.

Use this option to display checkboxes inline.

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

Option to color a checkbox with success.

Option to color a checkbox with danger.

type Option msg

Opaque type representing valid customization options for a checkbox