HTML element to use for button
Optional
config: ButtonConfig = {}Button config
Protected
_$rootPrivate
debounceStatic
Constant
defaultsButton default config
Static
elementStatic
moduleName for the component used when initialising using data-module attributes.
Static
Constant
schemaButton config schema
Protected
$rootProtected
Returns the root element of the component
Protected
configProtected
Returns the root element of the component
Private
debouncePrivate
Debounce double-clicks
If the click quickly succeeds a previous click then nothing will happen. This stops people accidentally causing multiple form submissions by double clicking buttons.
Mouse click event
Returns undefined, or false when debounced
Private
handlePrivate
Trigger a click event when the space key is pressed
Some screen readers tell users they can use the space bar to activate things with the 'button' role, so we need to match the functionality of native HTML buttons.
See https://github.com/alphagov/govuk_elements/pull/272#issuecomment-233028270
Keydown event
Static
check
JavaScript enhancements for the Button component