nathanjohnson320/elm-ui-components/2.0.4

NOTE: the latest version is 2.3.0

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/nathanjohnson320/elm-ui-components is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 2.0.4 found (3 same-name repos checked); no cached copy. Use another version.

Details

ElmUIC.Selector

A styled selector

type alias Selector =
{ kind : ColorSetting
, size : Size
, placeholder : String
, open : Bool
, options : List Option
, selected : Option
}

Base model for a selector

type alias Option =
{ key : String
, value : String
}

Individual items that display in the selector

defaultSelector : Selector

Instantiates the default properties of a selector

{ defaultNavbar | kind = Danger }
Theme
-> Selector
-> (Option -> msg)
-> List (Attribute msg)
-> List (Html msg)
-> Html msg

A styled nav using items and separators

selector defaultTheme
    { defaultSelector
        | placeholder = "Select a choice"
        , open = model.selectedOpen
        , options = model.options
        , selected = model.selected
        , kind = Theme.Danger
    }
    Select
    [ css
        [ width (px 200) ]
    ]
    []