rundis / elm-bootstrap / Bootstrap.Spinner

Indicate the loading state of a component or page with Bootstrap spinners

Creating

spinner : List (Option msg) -> List (Html msg) -> Html msg

Create a spinner element for fun and profit.

Spinner.spinner
    [ Spinner.grow
    , Spinner.large
    , Spinner.color Text.secondary
    , Spinner.attrs
    ]
    [ Spinner.srMessage "Loading..." ]

Options

grow : Option msg

Make the spinner grow/shrink (default border spinner).

small : Option msg

Make the spinner smaller.

large : Option msg

Make the spinner larger.

color : Bootstrap.Text.Color -> Option msg

Set the spinner color by using one of the available Bootstrap.Text colors.

attrs : List (Html.Attribute msg) -> Option msg

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


type Option msg

Opaque type for spinner options.

Helpers

srMessage : String -> Html msg

Helper function to create a screen reader message element.