UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

30 lines (29 loc) 1.15 kB
'use client'; import '@ui5/webcomponents/dist/Toast.js'; import { withWebComponent } from '@ui5/webcomponents-react-base'; /** * The `Toast` is a small, non-disruptive popup for success or information messages that * disappears automatically after a few seconds. * * ### Usage * * #### When to use: * * - You want to display a short success or information message. * - You do not want to interrupt users while they are performing an action. * - You want to confirm a successful action. * * #### When not to use: * * - You want to display error or warning message. * - You want to interrupt users while they are performing an action. * - You want to make sure that users read the message before they leave the page. * - You want users to be able to copy some part of the message text. * * * * __Note:__ This is a UI5 Web Component! [Toast UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/Toast) | [Repository](https://github.com/UI5/webcomponents) */ const Toast = withWebComponent('ui5-toast', ['duration', 'placement'], ['open'], [], ['close']); Toast.displayName = 'Toast'; export { Toast };