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||union: func |
|A ref for imperative actions. It currently only supports
|buttonRef||union: func |
|Use that prop 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 prop 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 prop 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 prop 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 is fully StrictMode compatible.