Attribute | Type | Value | Description |
---|---|---|---|
autofocus |
boolean |
false |
default - basic button |
true |
sets focus on button | ||
design |
string |
info-bar |
custom button styling for the info-bar context. Requires icon to be specified. Should not be used with priority and size . |
disabled |
boolean |
false |
default - basic button |
true |
disabled button | ||
hook |
string |
<unique-name> |
name used for testing with ember-hook |
icon |
string |
<icon-name> |
name of a frost-icon |
onClick |
closure-action |
<closure-action> |
triggers associated action when the button is clicked |
onFocus |
closure-action |
<closure-action> |
triggers associated action when the button receives focusin event |
options |
object |
{<attributes>} |
property object used to spread the attributes to the top level of the component with ember-spread. |
pack |
string |
frost |
default - name of the icon pack |
priority |
string |
primary |
primary action button |
secondary |
secondary action button | ||
tertiary |
tertiary action button | ||
size |
string |
small |
small size button |
medium |
medium size button | ||
large |
large size button | ||
text |
string |
<button-text> |
text to display on the button |
title |
string |
<tooltip-text> |
tooltip text to display on hover |
vertical |
boolean |
false |
default - set button text below the icon on an icon and text button |
true |
sets the button text below the icon |
The button component is accessible using ember-hook:
- Top level hook -
$hook('<hook-name>')
The button component use ember-spread to spread
a property object against the top level of the component.
actions: {
onClickHandler () {
console.log('button clicked')
}
}
actions: {
onFocusHandler () {
console.log('button focused')
}
}