snackbar
v4.9.10arrow_drop_downThe action to display. It renders after the message, at the end of the snackbar.
The anchor of the Snackbar
.
The number of milliseconds to wait before automatically calling the
onClose
function. onClose
should then set the state of the open
prop to hide the Snackbar. This behavior is disabled by default with
the null
value.
Replace the SnackbarContent
component.
Props applied to the ClickAwayListener
element.
Props applied to the SnackbarContent
element.
If true
, the autoHideDuration
timer will expire even if the window is not focused.
When displaying multiple consecutive Snackbars from a parent rendering a single
The message to display.
Callback fired when the component requests to be closed.
Typically onClose
is used to set state in the parent component,
which is used to control the Snackbar
open
prop.
The reason
parameter can optionally be used to control the response to onClose
,
for example ignoring clickaway
.
Callback fired before the transition is entering.
Callback fired when the transition has entered.
Callback fired when the transition is entering.
Callback fired before the transition is exiting.
Callback fired when the transition has exited.
Callback fired when the transition is exiting.
If true
, Snackbar
is open.
The number of milliseconds to wait before dismissing after user interaction.
If autoHideDuration
prop isn’t specified, it does nothing.
If autoHideDuration
prop is specified but resumeHideDuration
isn’t,
we default to autoHideDuration / 2
ms.
The component used for the transition. Follow this guide to learn more about the requirements for this component.
The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object.
Props applied to the Transition
element.
Name | Type | Description |
---|---|---|
action | node | The action to display. It renders after the message, at the end of the snackbar. |
anchorOrigin | {"horizontal":"'center' | 'left' | 'right'","vertical":"'bottom' | 'top'"} | The anchor of the |
autoHideDuration | number | The number of milliseconds to wait before automatically calling the
|
children | element | Replace the |
classes | object | Override or extend the styles applied to the component. See CSS API below for more details. |
className | string | |
ClickAwayListenerProps | object | Props applied to the |
ContentProps | object | Props applied to the |
disableWindowBlurListener | bool | If |
key | any | When displaying multiple consecutive Snackbars from a parent rendering a single
|
message | node | The message to display. |
onClose | function | The event source of the callback. |
onEnter | function | Callback fired before the transition is entering. |
onEntered | function | Callback fired when the transition has entered. |
onEntering | function | Callback fired when the transition is entering. |
onExit | function | Callback fired before the transition is exiting. |
onExited | function | Callback fired when the transition has exited. |
onExiting | function | Callback fired when the transition is exiting. |
onMouseEnter | function | |
onMouseLeave | function | |
open | bool | If |
resumeHideDuration | number | The number of milliseconds to wait before dismissing after user interaction.
If |
TransitionComponent | elementType | The component used for the transition. Follow this guide to learn more about the requirements for this component. |
transitionDuration | number | {"appear":"number","enter":"number","exit":"number"} | The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object. |
TransitionProps | object | Props applied to the |