Button

Button component with configurable theme, redirecting to a URL address or running a callback.

Props

name String

Text displayed on the button body.

default: ''

icon String

Icon name to be entered on the button. If not specified, no icon will be inserted. Provides support to all Google Material Icons. URL: https://design.google.com/icons/

default: null

style String

Style used in the button. Could be assigned the following values: 'danger', 'primary', 'warning', 'cancel'.

default: null

element String

DOM element name to be rendered. May be of the "button" or "a".

default: "button"

href String

URL redirect address, used if element is "a".

default: null

actionUrl String

URL address for ajax request. Use actionData to define the data sent.

default: null

actionData String

Object containing the data sent in the ajax request.

default: {}

method String

Http method used in ajax request.

default: "GET"

isLoading Boolean

If true, it reports that the component is being loaded.

default: false

disabled Boolean

If true, disables the events button.

default: false

disableWith String

Text to be displayed when button is disabled.

default: "loading"

confirmsWith Function

Warning text displayed to confirm the action.

default: null

onClick Function

Function callback executed when receiving the click event.

default: function(event) {}

target String

Used to render the target or formtarget property of link or button, respectively.

default: null

Mixins

Button component has, also, the following mixins: CSSClassMixin and RequestHandlerMixin.