The API documentation of the ButtonBase React component. Learn more about the properties and the CSS customization points.
import ButtonBase from '@material-ui/core/ButtonBase';
ButtonBase contains as few styles as possible.
It aims to be a simple building block for creating a button.
It contains a load of style reset and some focus/ripple logic.
|action||func||Callback fired when the component mounts. This is useful when you want to trigger an action programmatically. It currently only supports
actions: This object contains all possible actions that can be triggered programmatically.
|buttonRef||union: func |
|Use that property to pass a ref callback to the native button component.|
|children||node||The content of the component.|
|classes||object||Override or extend the styles applied to the component. See CSS API below for more details.|
|component||element type||'button'||The component used for the root node. Either a string to use a DOM element or a component.
⚠️ Needs to be able to hold a ref.
⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure to highlight the element by applying separate styles with the
|focusVisibleClassName||string||This property can help a person know which element has the keyboard focus. The class name will be applied when the element gain the focus through a keyboard interaction. It's a polyfill for the CSS :focus-visible selector. The rationale for using this feature is explained here. A polyfill can be used to apply a
|onFocusVisible||func||Callback fired when the component is focused with a keyboard. We trigger a
|TouchRippleProps||object||Properties applied to the
|type||enum: 'submit' |
|'button'||Used to control the button's purpose. This property passes the value to the
ref is forwarded to the root element.
Any other properties supplied will be provided to the root element (native element).
You can override all the class names injected by Material-UI thanks to the
This property accepts the following keys:
|root||Styles applied to the root element.|
|disabled||Pseudo-class applied to the root element if
|focusVisible||Pseudo-class applied to the root element if keyboard focused.|
If using the
overrides key of the theme,
you need to use the following style sheet name:
The component can cause issues in StrictMode.