NssButton
Last updated
Was this helpful?
Last updated
Was this helpful?
This component provide a simple button component with callback functionality and styles.
For NssUiApi
usage, please see the of the nss_libs/ui
folder.
Alternative example of direct ES6 module import:
NssButton
methodsenableGlowing()
disableGlowing()
setGlowGreen()
setGlowDanger()
setGlowGold()
setGold()
setDanger()
setSuccess()
setWhite()
setGrey()
setSizeVerySmall()
setSizeSmall()
setSizeNormal()
setSizeLarge()
setDisabled()
setEnabled()
setBorderless()
Removes inner button padding.
unsetBorderless()
setIcon()
Change styles of button to support icon.
unsetIcon()
setLabel(new_label)
Change label of button. Supports HTML.
getEl()
Returns the button element.
getWrapperEl()
Returns the button wrapper element. Use this to add as child of other elements.
onClick(callback)
Register a callback function which is called when the button is clicked.
appendTo(target_el)
Append the button to the end of the element. (New since version 0.31.0)