API Docs for: 0.0.1
Show:

Button Class

React-Component: refined Button.

Copyright (c) 2016 ItsAsbreuk - http://itsasbreuk.nl
New BSD License - http://choosealicense.com/licenses/bsd-3-clause/

Methods

_getDataAttrs

() private

Defined in lib/component.jsx:406

Available since 0.0.3

Extracts the data-* attributes from props.

Returns:

object all the data-* attributes

_processKeyUp

(
  • Boolean
  • Boolean
  • Boolean
)
private

Defined in lib/component.jsx:425

Available since 0.0.1

React render-method --> renderes the Component.

Parameters:

  • Boolean Object

    manual whether this routine gets called manually (keypress), or from a click-event

  • Boolean Object

    directResponse Whether to direct response or wait for the button to raise up

  • Boolean Object

    force whether to force (initiated by the method press)

_saveHTML

(
  • String
)
private

Defined in lib/component.jsx:461

Available since 0.0.1

Returns a save string

Parameters:

  • String Object

    html the text that should be removed from any html-entities

Returns:

String

blur

() chainable

Defined in lib/component.jsx:58

Available since 0.0.1

Blurs the Component.

componentDidMount

()

Defined in lib/component.jsx:71

Available since 0.0.1

componentDidMount does some initialization.

componentWillUnmount

()

Defined in lib/component.jsx:86

Available since 0.0.1

componentWilUnmount does some cleanup.

focus

(
  • [transitionTime]
)
chainable

Defined in lib/component.jsx:104

Available since 0.0.1

Sets the focus on the Component.

Parameters:

  • [transitionTime] Number optional

    transition-time to focus the element into the view

handleClick

()

Defined in lib/component.jsx:122

Available since 0.0.1

Callback-fn for the onClick-event. Will invoke this.props.onChange

handleKeyDown

()

Defined in lib/component.jsx:160

Available since 0.0.1

Callback-fn for the onKeyDown-event.

handleKeyUp

()

Defined in lib/component.jsx:213

Available since 0.0.1

Callback-fn for the onKeyUp-event.

handleMouseDown

()

Defined in lib/component.jsx:234

Available since 0.0.1

Callback-fn for the onMouseDown-event.

handleMouseUp

()

Defined in lib/component.jsx:289

Available since 0.0.1

Callback-fn for the onMouseUp-event.

press

(
  • boolean
)

Defined in lib/component.jsx:308

Available since 0.0.1

Callback-fn for the onClick-event. Will invoke this.props.onChange

Parameters:

  • boolean Object

    [directResponse] whether directly call onClick, or wait until the button raises up.

render

()

Defined in lib/component.jsx:320

Available since 0.0.1

React render-method --> renderes the Component.

Returns:

ReactComponent

Properties

activatedBy

Array

Defined in lib/component.jsx:476

Available since 0.0.1

Array with the keys that can press the button when focussed. Default: [13, 32]

aria-label

String

Defined in lib/component.jsx:486

Available since 0.0.1

The aria-label. When not set, it will equal the buttonText

autoFocus

Boolean

Defined in lib/component.jsx:495

Available since 0.0.1

Whether to autofocus the Component.

buttonHTML

String

Defined in lib/component.jsx:513

Available since 0.0.1

The Button-text, retaining html-code. If you don't need HTML, then buttonText is preferred.

buttonPressTime

Number

Defined in lib/component.jsx:523

Available since 0.0.1

The time that the button retains in its pressed-state when activated by a key-press.

Default: 300ms

buttonText

String

Defined in lib/component.jsx:504

Available since 0.0.1

The Button-text. Will be escaped. If you need HTML, then use buttonHTML instead.

children

String

Defined in lib/component.jsx:656

Available since 0.0.1

The type of the button Default: "button"

className

String

Defined in lib/component.jsx:534

Available since 0.0.1

The class that should be set on the element

directResponse

Boolean

Defined in lib/component.jsx:543

Available since 0.0.1

Whether the button resonses rapidly (keydown and mousedown). Note: native HTMLButtonElements don't resonse rapidly --> the onClick event happens on mouseUp.

Default: true

disabled

Boolean

Defined in lib/component.jsx:555

Available since 0.0.1

Whether the button is disabled

name

String

Defined in lib/component.jsx:564

Available since 0.0.1

The name-attribute of the button

onClick

Function

Defined in lib/component.jsx:573

Available since 0.0.1

Callback whenever the button gets clicked by the left mousebutton.

onMiddleClick

Function

Defined in lib/component.jsx:582

Available since 0.0.1

Callback wheneveer the button gets clicked by the middle mousebuttin.

onRightClick

Function

Defined in lib/component.jsx:599

Available since 0.0.1

Callback wheneveer the button gets clicked by the right mouse-button.

readOnly

Boolean

Defined in lib/component.jsx:608

Available since 15.2.0

Whether the checkbox is readonly

Default: false

showActivated

Boolean

Defined in lib/component.jsx:618

Available since 0.0.5

Whether keypress should show active status. (should be set false for file-uploadbuttons) Default: true

style

Object

Defined in lib/component.jsx:628

Available since 0.0.1

Inline style

tabIndex

Number

Defined in lib/component.jsx:637

Available since 0.0.1

The tabIndex

toggled

Boolean

Defined in lib/component.jsx:646

Available since 0.0.1

Whether the button is in a toggle-state. You don;t need to use this directly: use the module ToggleButton instead.