Skip to content

MessageBlock

Props

API reference for MessageBlock. For usage examples, see the React tab.

MessageBlock.Root

NameTypeDefault
childrenReactNode

The content or child elements nested within this component.

iconOverrideReactNode

Override the default icon with a custom one.

severity"error" | "info" | "success" | "warning"info

The severity of the Banner Message indicates which background color and icon is used.

MessageBlock.Action

NameTypeDefault
onPress (required)() => void

The action to be taken when the button is pressed.

childrenChildrenOrFunction<ButtonRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

isDisabledboolean

Whether the button is disabled.

isPendingboolean

Whether the button is in a pending state. This disables press and hover events while retaining focusability, and announces the pending state to screen readers.

MessageBlock.Title

NameTypeDefault
aboutstring
accessKeystring
autoSavestring
childrenReactNode
colorstring
contentstring
contextMenustring
dangerouslySetInnerHTML{ __html: string | TrustedHTML; }
datatypestring
defaultCheckedboolean
exportpartsstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts (opens in new tab)

inlistany
inputMode"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url"

Hints at the type of data that might be entered by the user while editing the element or its contents

See: https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute (opens in new tab)

itemIDstring
itemPropstring
itemRefstring
itemScopeboolean
itemTypestring
levelnumber3

The heading level.

partstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part (opens in new tab)

prefixstring
propertystring
radioGroupstring
relstring
resourcestring
resultsnumber
revstring
securitystring
titlestring
typeofstring
unselectable"off" | "on"
variant"headline1" | "headline2" | "headline3" | "headline4" | "overline1" | "overline2" | "overline3" | "subtitle1" | "subtitle2" | "subtitle3" | null
vocabstring