Snackbar API
View componentThe full prop reference for the Snackbar component. A brief status message.
Import
tsx
import { Snackbar } from '@structyl/styled';Props
Snackbar
Floating status message.
| Prop | Type | Default |
|---|---|---|
| open | defaultOpen# | booleanControlled or uncontrolled open state. | — |
| onOpenChange# | (open: boolean) => voidOpen state callback. | — |
| anchorOrigin# | { vertical: 'top' | 'bottom'; horizontal: 'left' | 'center' | 'right' }Screen placement. | { vertical: 'bottom', horizontal: 'left' } |
| message | action# | React.ReactNodeMessage and action slots. | — |
| autoHideDuration# | numberAuto-dismiss delay. | — |
| onClose# | (event, reason: 'timeout' | 'clickaway' | 'escapeKeyDown') => voidClose request callback. | — |
| className# | stringAdditional Tailwind classes merged with the component defaults. | — |
Source code
If you didn't find what you need here, read the component implementation .