Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-notification

Package Overview
Dependencies
Maintainers
8
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-notification

notification ui component for react

  • 5.6.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4M
increased by5.99%
Maintainers
8
Weekly downloads
 
Created

What is rc-notification?

The rc-notification package is a React component library for generating and managing notifications in a web application. It allows developers to easily display notifications or alerts to users, with customizable content, styles, and behaviors.

What are rc-notification's main functionalities?

Creating and displaying a notification

This feature allows developers to create and display a notification with a title, description, and an onClick event handler. The notification appears on the screen and can be interacted with by the user.

notification.open({
  message: 'Notification Title',
  description: 'This is the content of the notification.',
  onClick: () => {
    console.log('Notification Clicked!');
  }
});

Customizing notification duration

This code sample demonstrates how to set a custom duration for a notification, in seconds. After the specified time, the notification will automatically close.

notification.open({
  message: 'Notification Title',
  description: 'This notification will close after 10 seconds.',
  duration: 10
});

Specifying the position of the notification

This feature allows setting the position of notifications globally. You can specify the placement (e.g., topRight, topLeft, bottomRight, bottomLeft) and the distance from the top or bottom of the viewport.

notification.config({
  placement: 'topRight',
  top: 50,
  bottom: 50
});

Other packages similar to rc-notification

Keywords

FAQs

Package last updated on 27 Sep 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc