Socket
Socket
Sign inDemoInstall

@brighthr/component-toast

Package Overview
Dependencies
4
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @brighthr/component-toast

## Installation


Version published
Weekly downloads
927
increased by19.92%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

ComponentName

Installation

To install, type the following into the command line at the root of your project:

npm i @brighthr/component-toast

placeholder for where toasts will appear

Where you add the Toaster component to the app will be the container that the toast messages will appear in. Recommended that this should be at the root of your app so they appear in the bottom left corner.

import { Toaster } from '@brighthr/component-toast';

<div>
	<Toaster />
</div>;

create a new toast

Import into your file:

import { useToast } from '@brighthr/component-toast';

const { createToast } = useToast();

<Button onClick={() => createToast({
    text: 'message for toast',
    type: 'information'
})}>

FAQs

Last updated on 22 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc