Class IgcSnackbarComponent

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

Element

igc-snackbar

Slot

  • Renders the snackbar content.

Fires

igcAction - Emitted when the snackbar action button is clicked.

Csspart

base - The base wrapper of the snackbar component.

Csspart

message - The snackbar message.

Csspart

action - The snackbar action button.

Hierarchy

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

Constructors

Properties

actionText: string

The snackbar action button.

Attr

action-text

displayTime: number = 4000

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

Attr

display-time

keepOpen: boolean = false

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

Attr

keep-open

open: boolean = false

Determines whether the snackbar is opened.

Attr

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

Sets the position of the snackbar.

Attr

position

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

Methods

  • Type Parameters

    • K extends "igcAction"

    • D extends void

    Parameters

    • type: K
    • Optional eventInitDict: CustomEventInit<D>

    Returns boolean