Button component
Represents a button component
button : String -> Button msg
Create a Button component.
button "Click Me!"
|> toHtml
onClick : msg -> Button msg -> Button msg
Make your button emit messages. By default, clicking a button does nothing.
button "submit"
|> onClick FinalCheckoutFormSubmitted
|> toHtml
The type of the button
withType : ButtonType -> Button msg -> Button msg
Change the default type of the Button
button "submit"
|> withType Dashed
|> toHtml
withIcon : Ant.Icons.Icon msg -> Button msg -> Button msg
Add an icon to the button
button "Search"
|> withIcon searchOutlined
|> toHtml
Determines the size of the button
disabled : Basics.Bool -> Button msg -> Button msg
Make the button disabled. If you have a onClick
event registered, it will not be fired.
button "You can't click this"
|> onClick Logout
|> disabled True
|> toHtml
withHtmlType : HtmlButtonType -> Button msg -> Button msg
Specify the "type" attribute of the button.
The "type" attribute of a HTML button as defined in the button spec:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
toHtml : Button msg -> Html msg
Turn your Button into Html msg