Toast Service
The Toast component is a React functional component responsible for displaying notifications to users in a non-intrusive and visually appealing manner.
Last updated
The Toast component is a React functional component responsible for displaying notifications to users in a non-intrusive and visually appealing manner.
Last updated
To install the Quest react-sdk
into your project, follow these steps:
Open your terminal/command prompt.
Navigate to your project's root directory using the cd
command if you're not already there.
Run the following command to install the quest-sdk
package using npm:
This command will download and install the package and its dependencies into your project.
Automatic Dismissal: The Toast
component automatically disappears after a specified duration, ensuring that it does not clutter the user interface.
Customization: You can customize the appearance and content of the toast message to suit your application's design and notification needs.
User Interaction: Users can click on the toast to dismiss it manually, providing them with control over notifications.
The Toast
component accepts the following props:
message
(string, optional): The message to be displayed in the toast notification.
duration
(number, optional): The duration (in milliseconds) for which the toast remains visible before automatically disappearing. Defaults to 3000 milliseconds (3 seconds).
To use the Toast
component in your React application:
Import the component:
Trigger a toast notification by calling the showToast
function:
The Toast service can be used any where in your react app (also out side of react component function)