vael-ui v0.3.10

Feedback

Message

An inline banner for status text: info, success, warning, or error.

Install

import { Message } from 'vael-ui'

Playground

import { Message } from 'vael-ui'

<Message title="" variant="info" appearance="default" :closable="false" :forceMount="false" showIcon role="status">Message</Message>

Props

NameTypeDefaultDescription
titlestring | undefined
variant"success" | "warning" | "info" | "error" | "default""default"Color variant — sets the icon and border.
appearance"default" | "bare""default"`bare` drops the border/background/padding — icon + colored text only, for inline use (e.g. form field validation) instead of a standalone banner.
closableboolean | undefinedfalseRenders the built-in dismiss button.
beforeClose((done: () => void) => void) | undefinedCalled before the model flips to false. Call `done()` to actually close.
forceMountboolean | undefinedfalseWhen true, presence is v-show-driven and owned by the consumer (e.g. AnimatePresence).
showIconboolean | undefinedtrue
role"status" | "alert"Defaults to `alert` for `error`/`warning`, `status` otherwise.
uiPartial<{ root: UiPartValue; icon: UiPartValue; content: UiPartValue; title: UiPartValue; description: UiPartValue; actions: UiPartValue; close: UiPartValue; }> | undefined
openboolean | undefinedtrue

Slots

NameTypeDescription
defaultanyDescription body, under the optional title.
iconanyReplaces the default StatusIcon.
actionsanyTrailing action row, before the close button.

Events

NameTypeDescription
open-change[value: boolean, details: MessageOpenChangeDetails]
update:open[value: boolean]

Exposed

NameTypeDescription
elHTMLElement | null
close() => void
isClosingboolean
cancelClose() => void