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

@mantine/notifications

Package Overview
Dependencies
Maintainers
1
Versions
375
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mantine/notifications

Mantine notifications system

  • 7.15.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @mantine/notifications?

@mantine/notifications is a package that provides a set of customizable notification components for React applications. It allows developers to easily display various types of notifications such as success, error, info, and warning messages.

What are @mantine/notifications's main functionalities?

Basic Notification

This feature allows you to display a basic notification with a title and message.

import { showNotification } from '@mantine/notifications';

showNotification({
  title: 'Default notification',
  message: 'Hey there, your code is awesome!'
});

Success Notification

This feature allows you to display a success notification with a custom color and icon.

import { showNotification } from '@mantine/notifications';
import { CheckIcon } from '@mantine/core';

showNotification({
  title: 'Success',
  message: 'Your operation was successful!',
  color: 'green',
  icon: <CheckIcon />
});

Error Notification

This feature allows you to display an error notification with a custom color and icon.

import { showNotification } from '@mantine/notifications';
import { XIcon } from '@mantine/core';

showNotification({
  title: 'Error',
  message: 'Something went wrong!',
  color: 'red',
  icon: <XIcon />
});

Custom Duration

This feature allows you to set a custom duration for how long the notification will be displayed.

import { showNotification } from '@mantine/notifications';

showNotification({
  title: 'Custom duration',
  message: 'This notification will close after 10 seconds',
  autoClose: 10000
});

Update Notification

This feature allows you to update an existing notification, which is useful for long-running tasks.

import { showNotification, updateNotification } from '@mantine/notifications';

showNotification({
  id: 'load-data',
  loading: true,
  title: 'Loading data',
  message: 'Please wait...',
  autoClose: false,
  disallowClose: true
});

setTimeout(() => {
  updateNotification({
    id: 'load-data',
    color: 'teal',
    title: 'Data loaded',
    message: 'Data was successfully loaded',
    icon: <CheckIcon />,
    autoClose: 2000
  });
}, 3000);

Other packages similar to @mantine/notifications

Keywords

FAQs

Package last updated on 12 Dec 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