Button
Notes
This component renders button
tags by default or a
if href
is
provided. It also supports an arbitrary tagName
prop for advanced usage, which can
support HTML tag names or React components like Link
.
Props
- className
string
- children
node
- color
oneOf('gold', 'black', 'white', 'houseGreen')
- href
string
The href of the link
- loading
bool
If true, it shows a loading animation inside the button. Not shown if it's a text-only or text link button or if the button is disabled.
- visualStyle
oneOf('default', 'positive', 'textLink', 'textOnly')
The visual style of the button.
- tagName
any
An optional HTML tagname or React component for the rendered element. This should generally be
button
ora
, unless there's a good reason to make it a non-interactive element. Defaults tobutton
, ora
if anhref
is present. - type
oneOf('button', 'reset', 'submit')
An HTML button
type
attribute. Only applied if thetagName
isbutton
orinput
. - interactive
bool