Props for the Snackbar component.

interface Props {
    duration: number;
    message: string;
    onClose: () => void;
    open: boolean;
    position: {
        horizontal: "left" | "right" | "center";
        vertical: "bottom" | "top";
    };
    severity?: AlertSeverity;
    width?: string
    | number;
}

Hierarchy

  • SnackbarProps
    • Props

Properties

duration: number

Duration in milliseconds before the Snackbar auto-hides.

message: string

The message to display in the Snackbar.

onClose: () => void

Function to execute when the Snackbar is closed.

open: boolean

Whether the Snackbar is open.

position: {
    horizontal: "left" | "right" | "center";
    vertical: "bottom" | "top";
}

Position of the Snackbar on the screen.

severity?: AlertSeverity

The severity level of the Alert inside the Snackbar.

width?: string | number

The width of the Snackbar.