rundis/elm-bootstrap/1.1.0

NOTE: this package is not compatible with Elm 0.19.1

Bootstrap.ButtonGroup

Group a series of buttons together on a single line with the button group.

Button group

group : List (Option msg) -> List (ButtonItem msg) -> Html msg

Create a group of related buttons

ButtonGroup.group
    [ ButtonGroup.small ]
    [ ButtonGroup.button [ Button.primary ] [ text "Primary" ]
    , ButtonGroup.button [ Button.secondary ] [ text "Secondary" ]
    ]

* options List of styling options * items List of button items (ref buttonItem and linkButtonItem)

button : List (Option msg) -> List (Html msg) -> ButtonItem msg

Create a button than can be composed in a button group

linkButton : List (Option msg) -> List (Html msg) -> ButtonItem msg

Create a linkButton that can be composed in a button group

type ButtonItem msg

Opaque type representing a button or link button, for composing button groups

Group options

small : Option msg

Option to make all buttons in the given group small

large : Option msg

Option to make all buttons in the given group large

vertical : Option msg

Option to make all buttons stack vertically for a button group

attrs : List (Attribute msg) -> Option msg

When you need to customize the group element with standard Html.Attribute use this function to create it as a group option

type Option msg

Opaque type representing the possible styling options for a button group

Button toolbar

toolbar : List (Attribute msg) -> List (GroupItem msg) -> Html msg

Create a toolbar of buttons by composing button groups. Separate groups by margins on the button groups.

ButtonGroup.toolbar []
    [ ButtonGroup.groupItem []
        [] -- should contain a list of button items


    , ButtonGroup.groupItem
        [ Button.attrs [ class "ml-2" ] ]
        [] -- should contain a list of button items


    ]
  • attributes List of attributes to customize the toolbar element
  • items List of button group (items)
groupItem : List (Option msg) -> List (ButtonItem msg) -> GroupItem msg

Create a button group that can be composed in a toolbar

The parameters are identical as for group

type GroupItem msg

Opaque type representing a button group. Used when composing a button toolbar