Reference Source
import {Alert} from '@adobe/coral-spectrum'
public class | source

Alert

Expression Extends:

class Alert extends BaseComponent(HTMLElement)

Mixin Extends:

HTMLElement, BaseComponent

An Alert component used as static indicators of an operation's result, or as messages to highlight information to the user. It does not include a close button by default, but you can add it manually by adding the coral-close attribute on an element contained by the Alert.

See:

Example:

Markup
<coral-alert></coral-alert>
JS constructor
new Coral.Alert();

Static Member Summary

Static Public Members
public static

Returns Alert sizes.

public static

Returns Alert variants.

Member Summary

Public Members
public

The alert content element.

public

The alert footer element.

public

The alert header element.

public
public

The size of the alert.

public

The alert variant style to use.

Static Public Members

public static size: AlertSizeEnum: * source

Returns Alert sizes.

Return:

AlertSizeEnum

public static variant: AlertVariantEnum: * source

Returns Alert variants.

Public Members

public content: AlertContent source

The alert content element.

  • content-zone

The alert footer element.

  • content-zone

public header: AlertHeader source

The alert header element.

  • content-zone

public hidden: boolean source

public size: String source

The size of the alert. It accepts both lower and upper case sizes. See AlertVariantEnum.

  • AlertSizeEnum.SMALL by default.
  • reflected

public variant: String source

The alert variant style to use. See AlertVariantEnum.

  • AlertVariantEnum.INFO by default.
  • reflected