Message component is used to display inline messages.
Message component requires a content to display.
The severity option specifies the type of the message.
Multiple messages can be displayed using the standard v-for directive.
Messages are closable by default, disable closable option to remove the close button.
Messages can disappear automatically by turning the sticky option off. The timeout duration is defined using the life property in milliseconds.
Icon property and the messageicon slots are available to customize the icon of the message
Message component uses alert role that implicitly defines aria-live as "assertive" and aria-atomic as "true". Since any attribute is passed to the root element, attributes like aria-labelledby and aria-label can optionally be used as well.
Close element is a button with an aria-label that refers to the aria.close property of the locale API by default, you may use closeButtonProps to customize the element and override the default aria-label.
Key | Function |
---|---|
enter | Closes the message. |
space | Closes the message. |