Button API
This is an example of API documentation for the Button Component - This will be done using Storybook and half automated. Doing this manually here looks not reasonable for now.
Component name
The name Button can be used when providing default props or style overrides in the theme.
Default props
You can change the default of every prop of a component. A defaultProps
key is exposed in the theme's components
key for this use case.
Global style overrides
You can use the theme's styleOverrides
key to potentially change every single style.
Props
Props of the Button base component are also available.
Name | Type | Default | Description |
---|---|---|---|
|
|
| The content of the component. |
|
|
| Override or extend the styles applied to the component. See CSS API below for more details. |
|
|
| The color of the component. It supports those theme colors that make sense for this component. |
|
|
| The component used for the root node. Either a string to use a HTML element or a component. |
|
|
| If |
|
|
| If |
|
|
| If |
|
|
| If |
|
|
| Element placed after the children. |
|
|
| If |
|
|
| The URL to link to when the button is clicked. If defined, an |
|
|
| The size of the component. |
|
|
| Element placed before the children. |
|
|
| The system prop that allows defining system overrides as well as additional CSS styles. |
|
|
| The variant to use. |
Theref
is forwarded to the root element.
You can override the style of the component using one of these customization options:
With a global class name.
With a rule name as part of the component's styleOverrides property in a custom theme.