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

Index

Constructors

Properties

actionText: string

The snackbar action button.

displayTime: number = 4000

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

keepOpen: boolean = false

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

open: boolean = false

Determines whether the snackbar is opened.

Methods

  • emitEvent<K, D>(type: K, eventInitDict?: CustomEventInit<D>): boolean
  • Type Parameters

    • K extends "igcAction"

    • D extends void

    Parameters

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

    Returns boolean

  • hide(): void
  • show(): void
  • toggle(): void