Skip to main content
Version: 1.9.0

MobileButton

Overview

The MobileButton component allows the user to create and displays buttons.


Specification

Property

Here is a list of properties that can be used for modifying the component:

NameTypeDefaultDescriptionRemark
classNamestring""Component class name
idstring""Component id name
textstring""Text to be displayed in buttons
typestring"normal"Button design typeAvailable options:
"normal" : White (#ffffff)
"submit" : Blue (#206694)
disabledbooleanfalseEnable/Disable the component
visiblebooleantrueShow/Hide the component

Event

Here is a list of events that can be specified:

NameTypeDescriptionRemark
clickfunctionEvent handler when ClickedIt will pass the event object as the argument

Constructor

MobileButton(options)
Here is a list of available constructors:

Parameter

NameTypeDefaultDescriptionRemark
optionsobject{}Object that includes component properties

Sample Code

tip

Please check the package installation method first.

Here is a sample code when all parameters are specified:

const Kuc = Kucs['1.x.x'];

const header = kintone.mobile.app.getHeaderMenuSpaceElement();

const mobileButton = new Kuc.MobileButton({
text: 'Submit',
type: 'submit',
className: 'options-class',
id: 'options-id',
visible: true,
disabled: false
});
header.appendChild(mobileButton);

mobileButton.addEventListener('click', event => {
console.log(event);
});