rakutentech/r10/2.3.1

NOTE: the latest version is 7.0.0

R10.Button

Buttons!

Buttons

List (Attribute msg)
-> { label : Element msg
, libu : Type msg
, theme : Theme
}
-> Element msg

Primary Button for Call to Actions

R10.Button.primary []
    { label = text "Text"
    , libu = R10.Libu.Bu <| Just doSomething
    , theme =
        { mode = R10.Mode.Light
        , primaryColor = R10.Color.Primary.CrimsonRed
        }
    }
List (Attribute msg)
-> { label : Element msg
, libu : Type msg
, theme : Theme
}
-> Element msg

Secondary Button

List (Attribute msg)
-> { label : Element msg
, libu : Type msg
, theme : Theme
}
-> Element msg

Tertiary Button

List (Attribute msg)
-> { label : Element msg
, libu : Type msg
, theme : Theme
}
-> Element msg

Quaternary Button

Others

type alias Data msg =
{ label : Element msg
, libu : Type msg
, theme : Theme
}

Type of data required by buttons

cssButtonStyle : Theme -> String

Special case for CSS buttons, useful if a button must be built using the standard Html library instead of elm-ui.

Default padding value for buttons

withLimitedWidth : List (Attribute msg)

Attributes for buttons with limited width. By default buttons are width fill.