Socket
Socket
Sign inDemoInstall

@reach/alert

Package Overview
Dependencies
5
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/alert


Version published
Maintainers
3
Created

Package description

What is @reach/alert?

@reach/alert is a React component library that provides accessible alert messages. It helps developers create alerts that are announced by screen readers, ensuring that users with disabilities are informed of important changes or messages on the page.

What are @reach/alert's main functionalities?

Basic Alert

This feature allows you to create a basic alert message that will be announced by screen readers. The alert is wrapped in the <Alert> component.

import { Alert } from '@reach/alert';

function App() {
  return (
    <div>
      <Alert>This is an important message!</Alert>
    </div>
  );
}

Alert with Type

This feature allows you to specify the type of alert. The 'type' prop can be set to 'assertive' or 'polite', which determines how the screen reader will announce the alert.

import { Alert } from '@reach/alert';

function App() {
  return (
    <div>
      <Alert type="assertive">This is an assertive alert!</Alert>
      <Alert type="polite">This is a polite alert!</Alert>
    </div>
  );
}

Other packages similar to @reach/alert

FAQs

Last updated on 22 Dec 2019

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc