Button
A button component that extends the HTML button
element.
#
ImportButton
: The base button component.
#
UsageSyntaxError: Unexpected token (1:8) 1 : return () ^
#
PropscolorScheme
#
Use the colorScheme
prop to change the colors of the button. You can use one of the built-in schemes, or pass a list of class names to create your own.
SyntaxError: Unexpected token (1:8) 1 : return () ^
size
#
Use the size
prop to change the size of the button. You can use one of the built-in size, or pass a list of class names to create your own.
SyntaxError: Unexpected token (1:8) 1 : return () ^
isLoading
#
Use the isLoading
prop to show a spinner and disable to button.
SyntaxError: Unexpected token (1:8) 1 : return () ^
isRaised
#
Use the isRaised
prop to add a shadow to the button.
SyntaxError: Unexpected token (1:8) 1 : return () ^
#
Adding iconsJust add an SVG or a custom icon component as children to the button.
SyntaxError: Unexpected token (1:8) 1 : return () ^
#
Using the button as a linkSometimes you might want to use the button a link (the HTML a
tag). This can be achieved by passing the as
prop to the button. When doing so, all props for an anchor will be available to use.
SyntaxError: Unexpected token (1:8) 1 : return () ^
#
AccessabilityButton
follows the practices for buttons found at WAI-ARIA Authoring Practices.
Button
has the role ofbutton
.- When
Button
has focus,Space
orEnter
activates it. - When
Button
is disabled,aria-disabled
is set to true.