lenards/elm-ui-patternfly/4.0.1

NOTE: the latest version is 4.0.2

PF6.Button

PF6 Button component

Supports all PF6 button variants, sizes, and icon positions.

See: https://www.patternfly.org/components/button

Definition

type Button msg

Opaque Button type

type Variant

Button visual variants

type Size

Button size

Icon position relative to label text

Constructor functions

{ label : String
, onPress : Maybe msg
}
-> Button msg

Plain button (no styling)

{ label : String
, onPress : Maybe msg
}
-> Button msg

Primary filled button — main call to action

{ label : String
, onPress : Maybe msg
}
-> Button msg

Secondary outlined button

{ label : String
, onPress : Maybe msg
}
-> Button msg

Tertiary outlined button with dark border

{ label : String
, onPress : Maybe msg
}
-> Button msg

Danger filled button — destructive action

{ label : String
, onPress : Maybe msg
}
-> Button msg

Warning filled button — potentially risky action

{ label : String
, onPress : Maybe msg
}
-> Button msg

Plain button with no background or border

{ label : String
, onPress : Maybe msg
}
-> Button msg

Control button — used in toolbars and input groups

Size modifiers

Set button size to small

Set button size to large

Set button size to default

Icon modifiers

withIcon : Element msg -> Button msg -> Button msg

Add an icon; defaults to left position

Position icon to the left of the label

Position icon to the right of the label

State modifiers

Mark the button as disabled

Rendering

toMarkup : Theme -> Button msg -> Element msg

Render the Button as an Element msg