Class IgcSnackbarComponent

A snackbar component is used to provide feedback about an operation by showing a brief message at the bottom of the screen.

igc-snackbar

  • Default slot to render the snackbar content.

action - Renders the action part of the snackbar. Usually an interactive element (button)

igcAction - Emitted when the snackbar action button is clicked.

base - The base wrapper of the snackbar component.

message - The snackbar message.

action - The default snackbar action button.

action-container - The area holding the actions.

Hierarchy

Hierarchy

  • EventEmitterInterface<IgcSnackbarEventMap, this> & IgcBaseAlertLikeComponent<this>
    • IgcSnackbarComponent

Properties

actionText: string

The snackbar action button.

action-text

displayTime: number = 4000

Determines the duration in ms in which the component will be visible.

display-time

keepOpen: boolean = false

Determines whether the component should close after the displayTime is over.

keep-open

open: boolean = false

Whether the component is in shown state.

position: "top" | "bottom" | "middle" = 'bottom'

Sets the position of the component in the viewport.

tagName: "igc-snackbar" = 'igc-snackbar'

Returns the HTML-uppercased qualified name.

MDN Reference

Methods

  • Closes the component.

    Returns Promise<boolean>

  • Opens the component.

    Returns Promise<boolean>

  • Toggles the open state of the component.

    Returns Promise<boolean>