Flutter docs
Default skin

Message

Display global messages as feedback in response to user operations.

When to use

  • To provide feedback such as success, warning, error etc.
  • A message is displayed at top and center and will be dismissed automatically, as a non-interrupting light-weighted prompt.

Examples

API

message and message.useMessage are exported from @ceebee/ui/client.

Message

PropertyDescriptionTypeDefaultVersion
contentThe content of the messageReactNode | config-—
durationTime(seconds) before auto-dismiss, don't dismiss if set to 0number3—
onCloseSpecify a function that will be called when the message is closedfunction-—
classNameCustomized CSS classstring--
classNamesCustomize class for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, string> | (info: { props })=> Record<SemanticDOM, string>-6.0.0
contentThe content of the messageReactNode--
durationTime(seconds) before auto-dismiss, don't dismiss if set to 0number3-
iconCustomized IconReactNode--
pauseOnHoverkeep the timer running or not on hoverbooleantrue-
keyThe unique identifier of the Messagestring | number--
styleCustomized inline styleCSSProperties--
stylesCustomize inline style for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, CSSProperties> | (info: { props })=> Record<SemanticDOM, CSSProperties>-6.0.0
onClickSpecify a function that will be called when the message is clickedfunction--
onCloseSpecify a function that will be called when the message is closedfunction--