Matchbox
Updated Jun 30, 2021

Button

COMPONENTS

A button is an interactive element that triggers an event or initiates an action.

Button API

color

Accepts: "gray", "blue", "red"

The color of the button

TYPE
String
children

The contents of the button

TYPE
React.ReactNode
as

Component to render the button as

TYPE
elementType
disabled

Whether the button is disabled or not

TYPE
Boolean
destructive
Deprecated

Use the color prop instead

TYPE
Boolean
external

Whether the button takes you to an external location or not

TYPE
Boolean
flat
Deprecated

Use the variant prop instead

TYPE
Boolean
fullWidth

Whether the button is the full width of its parent

TYPE
Boolean
outline
Deprecated

Use the variant prop instead

TYPE
Boolean
outlineBorder
Deprecated

Use the variant prop instead

TYPE
Boolean
size

Accepts: "small", "large", "default"

The size of the button

TYPE
String
DEFAULT
"default"
submit

Whether the button is a submit button or a regular button

TYPE
Boolean
to

The location the button will route to

TYPE
String | Object
title

The title of the button

TYPE
String
variant

Accepts: "filled", "outline", "mutedOutline", "text"

The button style variant

TYPE
String
DEFAULT
"filled"
loading

Replaces the button text with a loading spinner

TYPE
Boolean
loadingLabel

Label for the button when loading

TYPE
string

Button System Props

CATEGORY
AVAILABLE PROPS
margin
margin
marginTop
marginRight
marginBottom
marginLeft
marginX
marginY
m
mt
mr
mb
ml
mx
my
padding
padding
paddingTop
paddingRight
paddingBottom
paddingLeft
paddingX
paddingY
p
pt
pr
pb
pl
px
py
width
width

Button.Icon API

as

Pass an icon through this prop to render it

TYPE
elementType
size

Size of the icon

TYPE
Number | String
DEFAULT
18
label

Adds an aria-label attribute to the icon

TYPE
String

Button.Icon System Props

CATEGORY
AVAILABLE PROPS
margin
margin
marginTop
marginRight
marginBottom
marginLeft
marginX
marginY
m
mt
mr
mb
ml
mx
my