lucamug/style-framework/1.1.0

Framework.Button

Demo

Buttons

Buttons

button : List Modifier -> Maybe msg -> String -> Element msg

Generate an Input.button element. Example:

button [ Medium, Success, Outlined ] Nothing "Button"
buttonWidth : List Modifier -> Maybe msg -> String -> Int -> Element msg

Buttons as Link

buttonLinkWidth : List Modifier -> String -> String -> Int -> Element msg

Customizable Buttons

{ width : Int
, label : String
, onPress : Maybe msg
, modifiers : List Modifier
, extraAttrs : List (Attribute msg)
}
-> Element msg

Button Attributes

buttonAttr : List Modifier -> List (Attribute msg)

Generate a list of attributes that can be attached to any element

row (buttonAttr [ Info ] ++ [ spacing 10 ]) [ text "Col 1", text "Col 2" ]

Introspection

Used internally to generate the Style Guide

{ name : String
, description : String
, signature : String
, variations : List ( String, List ( Element a1, String ) )
}