An empty blox-button will render with a 1:1 aspect ratio
<blox-button></blox-button>
The button will get the name parameter set on it.
<blox-button name="test-button"></blox-button>
The button will get the value parameter set on it.
<blox-button value="three"></blox-button>
A button with the href property will be rendered as a link element.
<blox-button href="../"></blox-button>
Elements that are a tags under the hood have additional properties exclusive to a tags.
<blox-button href="../" rel="prev"><blox-button>
<blox-button href="../" target="_self"><blox-button>
A button with the download property will also be rendered as a link element even if the href property is not set.
<blox-button download="index.html"><blox-button>
For a button with special styling needs, two named slots are provided.
prefix and postfix
<blox-button>
<span slot="prefix">prefix</span>
<span>default</span>
<span slot="postfix">postfix</span>
</blox-button>
Items placed within the prefix slot will normally sort before any items placed in the default slot.
Similarly, items placed within the postfix slot will normally sort after any items placed in the default slot.
<blox-button>
<span slot="postfix">1</span><span slot="postfix">2</span><span slot="postfix">3</span>
<span>1</span><span>2</span><span>3</span>
<span slot="prefix">1</span><span slot="prefix">2</span><span slot="prefix">3</span>
</blox-button>
The order of these elements within the button can be affected using the reverse property.
This sets flex-direction: row reverse on the base part.
<blox-button reverse>
<span slot="prefix">1</span><span slot="prefix">2</span><span slot="prefix">3</span>
<span slot="postfix">1</span><span slot="postfix">2</span><span slot="postfix">3</span>
<span>1</span><span>2</span><span>3</span>
</blox-button>
The blox button component supports a number of modes and variants. By default the button displays a grey filled in area around the text.
<blox-button variant="primary">primary</blox-button>
All variants of modes of the button besides the link will react to the 'outline' parameter.
<blox-button outline></blox-button>
Padded display mode removes the filled in area, but keeps the padding
<blox-button padded>link</blox-button>
Most display modes support the outline property, with the exception of the padded mode.
<blox-button variant="attract" icon="square" outline></blox-button> <blox-button variant="attract" icon="circle" circle outline></blox-button> <blox-button variant="attract" outline><blox-icon slot="prefix" icon="cow"></blox-icon></blox-button> <blox-button variant="attract" padded outline>no effect on link</blox-button>
The button supports three sizes, small, medium (default), and large.
<blox-button size="small">small</blox-button> <blox-button>default</blox-button> <blox-button size="medium">medium</blox-button> <blox-button size="large">large</blox-button>