ons-alert-dialog-button

Usage


<ons-alert-dialog>
  <div class="alert-dialog-title">Warning!</div>
  <div class="alert-dialog-content">
    An error has occurred!
  </div>
  <div class="alert-dialog-footer">
    <alert-dialog-button onclick="app.close()">Cancel</alert-dialog-button>
    <alert-dialog-button class="alert-dialog-button" onclick="app.close()">OK</alert-dialog-button>
  </div>
</ons-alert-dialog>

See also

Attributes

Attributes are added directly to the element. You can do this in HTML or JS.

HTML: <ons-alert-dialog-button someAttribute="true" anotherAttribute><ons-alert-dialog-button>
JS: document.querySelector('ons-alert-dialog-button').setAttribute('someAttribute', 'true')

Name Type Description
modifier String The appearance of the button. Optional.
disabled Specify if button should be disabled. Optional.

Properties

Properties are accessed on the element through JS, and should be get and set directly. For example: document.querySelector('ons-alert-dialog-button').disabled.

Name Description
disabled Whether the element is disabled or not.

Preset Modifiers

Modifiers are set in the modifier attribute. To use more than one, separate them by spaces. For example:
<ons-alert-dialog-button modifier="material modifier2"><ons-alert-dialog-button>.

Name Description
material Material Design alert-dialog button.

Need Help?

If you have any questions, use our Community Forum or talk to us on Discord chat. The Onsen UI team and your peers in the community will work together to help solve your issues.

For bug reports and feature requests use our GitHub Issues page.