Button

Stable

Our call to actions and their various states.

Description

Probably one of our most (if not the most) commonly used elements in our whole universe of components. Buttons help you guide a user to a desired destination or highlight an important action they must take.

An important note about the button is that it can transpile into both an <a> tag or a <button> tag. This largely depends on passing a href prop.

Usage

Below is an example of how to use the Button and its mark up.

import { Button } from '@artilleryio/alpha-centauri-components'; 

...

<Button href="/about" variant="primary" size="base" {...props}> About </Button>

API Reference

PropTypeOptionsDefault value
hrefstring#
variantstringprimary, secondary, naked, importantprimary
sizestringbase, largebase
loadingbooleantrue, falsefalse
disabledbooleantrue, falsefalse
childrenany
labelstring
IconStartbooleantrue, falsefalse
IconEndbooleantrue, falsefalse
iconSizestringsm, lgsm
onClickfunction
ariaLabelstring

Settings