Button

button

Documentation and examples of the button component. Can be used for both links and actual buttons.

Arguments

label
The button text
href
The link that will be applied
post
Will set label and href defaults to post title and url
variation
Button style. Supports primary (default), secondary, tertiary, plain.

Simple button

echo fuse( 'button', array(
    'href' => 'https://google.com',
    'label' => 'Simple button'
) );
echo fuse( 'button', array(
    'href' => 'https://google.com',
    'label' => 'Secondary',
    'variation' => 'secondary'
) );
echo fuse( 'button', array(
    'href' => 'https://google.com',
    'label' => 'Tertiary',
    'variation' => 'tertiary'
) );
echo fuse( 'button', array(
    'href' => 'https://google.com',
    'label' => 'Plain',
    'variation' => 'plain'
) );
echo fuse( 'button', array(
    'onclick' => 'alert("Hello")',
    'label' => 'Hi there!',
) );
Label is not needed in this case since it will retrieve it from the get_field. This is just for highlighting the button.
echo fuse( 'button', array(
    'label' => 'ACF Button',
    'acf_link' => get_field('acf_link')
) );