--- title: Alert desc: Message box that provides important information to the user, such as warnings, errors, or other notifications. ico: mdi:message-badge keywords: - message - notification - toast alert: ico: mdi:wheelchair-accessibility body: | **For best accessibility:** Please use **role**{ .kbd .kbd-sm } and **aria-live**{ .kbd .kbd-sm } attributes depending on your use case. controls: - name: variant type: select label: Variant desc: Color variants. default: default options: - default - info - success - warning - danger - neutral - name: withIcon type: toggle label: With icon desc: Optional preceding icon. default: false - name: withClose type: toggle label: With close desc: Optional close gadget icon. default: false - name: ghost type: toggle label: Ghost desc: Ghost-like styles. default: false preview: |
code: html: | logic: variant: "this.variant === 'default' ? '' : ' prs-alert-'+ this.variant" withIcon: "this.withIcon ? '' : ''" withClose: "this.withClose ? '' : ''" ghost: "this.ghost ? ' prs-alert-ghost' : ''" --- Make sure to use the appropriate `role` and `aria-live` attributes depending on your use case.