NUI-Widgets documentation has moved to Storybook hosted on Github Pages.

Toast

Contents

There is a breaking change to this component in the next version of NUI Widgets.
  • showToastMessage will no longer be exported and will be replaced by Toast component in an effort to reach ux harmonization.
import { showToastMessage } from '@concur/nui-widgets/lib/Toast/Toast';

Toasts are a non-obtrusive way to signal success to a user. Toast messages should be very short. They will appear at the bottom of the browser window and disappear after a few seconds.

Example

<Button onClick={() => showToastMessage('Sample message')}>
    Show Toast Message
</Button>

Usage

Call the showToastMessage function with the message text as its first parameter. The second parameter is an options object, which currently supports className.