obap-button

June 12, 2020 ยท View on GitHub

A Material Design button that allows you to create regular, floating action and icon buttons.

Usage

import '@obap/obap-elements/obap-button/obap-button.js';

<!-- Regular Button -->
<obap-button label="normal"></obap-button>
<obap-button label="raised" raised></obap-button>
<obap-button label="toggle" toggle></obap-button>
<obap-button label="disabled" disabled></obap-button>

<!-- Regular Button with Icon -->
<obap-button label="raised" icon="android" raised></obap-button>

<!-- Icon Button -->
<obap-button round icon="android"></obap-button>

<!-- FAB -->
<obap-button round icon="android" raised></obap-button>

<!-- 'Pill' Button -->
<obap-button round label="normal" raised></obap-button>
<obap-button round label="normal" icon="android" raised></obap-button>
<obap-button round label="raised" raised></obap-button>
<obap-button round label="raised" icon="android" raised></obap-button>

Properties

PropertyAttributeTypeDefaultDescription
disableddisabledBoolean"false"If true, the button will be disabled.
hasFocushas-focusbooleanfalse
iconiconstring""The icon to display in the button (to the left of the label).
labellabelstring""The text to display in button.
namenamestring
noInkno-inkbooleanfalseWhether or not to show a ripple when clicked.
raisedraisedbooleanfalseWhether or not the button is raised (has a dropshadow).
roleroleString"button"The ARIA role of the element.
roundroundbooleanfalseWhether or not the button corners are rounded (50% of height).
selectedselectedbooleanfalseWhether or not the button is selected, if it's a toggle button.
tabIndexnumber0
toggletogglebooleanfalseWhether or not the button is a toggle button.