API reference
SnackbarProvider
useSnackbar
Calling useSnackbar outside a <SnackbarProvider> throws.
enqueueSnackbar options
Calling enqueueSnackbar with a key that is already in the queue returns the existing key without enqueuing a duplicate.
closeSnackbar
With key, dismisses that specific notification. Without key, dismisses every active notification across every anchor stack. Either path fires onClose with reason: 'instructed' for the affected items.
Types
CSS variables
All tokens are defined under :where(...) selectors (specificity 0) so any consumer override at :root or higher wins.
Data attributes
The DOM uses semantic data attributes for state. Consumers can write CSS rules against any of these: