carboncloud/ui-library/9.0.0

NOTE: the latest version is 9.1.0

Ui.Button

Defines a Button component

Types

= Primary
| Secondary
| Warn
| Neutral

Defines the available button colors

  • Primary: used to get users main focus
  • Secondary: used as an accent to Primary
  • Warn: used to indicate a destructive and/or dangerous action
  • Neutral: used when little focus should be put on the button
  • Custom: when custom styling is needed
= High
| Mid
| Low

Defines the emphasis of the button

= Text String
| TextWithLeftIcon String Icon
| TextWithRightIcon String Icon

Defines the content of the button

Views

{ onClick : Maybe msg
, color : ButtonColor
, emphasis : ButtonEmphasis
}
-> Html msg

Returns a view of a button This should be used whenever possible. You can use customView if you need to customize the button.

List Style
-> List (Attribute msg)
-> { onClick : Maybe msg
, color : ButtonColor
, emphasis : ButtonEmphasis
}
-> Html msg

Returns a custom view of a button.

List (Attribute msg)
-> { onClick : Maybe msg
, icon : Icon
, tooltip : String
}
-> Html msg

A view of an icon button which can be useful when we have little space