# Ribbon button component

<ribbon-button> has similar functions to XButton, but comparing to XButton, ribbon Button has a top-down structure of ICONS and text, and can be used as a Dropdown toggler.

# Code examples

  1. Simple ribbon-button example:

  2. Customize icon

  3. Disabled button

  4. Click event handler

  5. Use controller to handle click event

  6. Use controller directive

  7. Nested dropdown component

# API

# Ribbon button properties

Properties Description Type
disabled Button disabled status boolean
isVisible Button visibility status boolean

# Methods

Method Description Version
setText(text: String): void Set button text. It supports I18n entry. 8.2.0
setIconCls(cssClass: String): void Set icon's css-class of a button 8.2.0
disable(): void Disable button. The disabled button will not respond to the click event 8.2.0
enable(): void Enable button. The enabled button will respond to the click event 8.2.0
show(): void Show the hidden button 8.2.0
hide(): void Hide the button 8.2.0
destroy(): void Destroy the button component 8.2.0

# Events

Name Description Sample Version
click Click button to trigger rbutton.on('click', () => {}) 8.2.0