Message
An inline notice, with notice / error / warning / success types.
Basic usage
The type picks the default icon and color scheme; override it with icon.
Inline form
inline renders a borderless inline notice for embedding in running text; the block form (default) has a border and padding. Inline messages never render a close button.
Close button
Differences from OOUI
In the original, clicking the close button hides the message itself; here onClose only reports the click and the component holds no visibility state — you must unmount or hide the message in the callback, otherwise the message cannot be dismissed.
API
Accessibility: type="error" renders as role="alert" (assertive announcement); the other types use aria-live="polite".
See also
- Errors rendered inside the error panel: ProcessDialog
- The value-channel contract (
onCloseonly reports intent; visibility belongs to the caller): Controlled and uncontrolled