Skip to main content
Version: 2.1.4

MessageBar

3p-core v2.1.4


3p-core / MessageBar

Variable: MessageBar

const MessageBar: React.FC<MessageBarProps>

Renders a contextual message bar with an optional action button.

Remarks

The bar is left-border-accented and adapts its icon and color theme according to the supplied `type` value.
An ActionButton can be shown on the right for quick user interaction (e.g. “Undo”, “Retry”, “Learn more”…).

Param

Component props.

Returns

React element representing the message bar.

Examples

Basic usage

<MessageBar type="success">
Your profile has been saved.
</MessageBar>

With action button

<MessageBar
type="warning"
buttonProps={{
label: 'Undo',
icon: 'Undo',
onClick: () => console.log('Undo clicked'),
}}
>
File deleted.
</MessageBar>