
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
react-bootstrap-confirmation
Advanced tools
A library to easily display alerts and confirmations using React and Bootstrap
A library to easily display alerts and confirmations using React and Bootstrap. With react-bootstrap-confirmation displaying an alert or a confirmation dialog is just as easy as calling a function:
import {alert} from 'react-bootstrap-confirmation';
alert('Something very wrong happened!');
npm install --save react-bootstrap-confirmation
alert(message[, options])An asynchronous function that will return once the alert has been dismissed.
import React, {useState} from 'react';
import {alert} from 'react-bootstrap-confirmation';
const AlertButton = () => {
const display = async () => {
await alert('Something very wrong is happening!');
console.log('The alert has finished displaying');
};
return (
<button type="button" className="btn btn-primary" onClick={display}>
Display alert
</button>
);
};
| Parameter name | Type | Description | Default |
|---|---|---|---|
title | string | A facultative title to use for the modal. | undefined |
okText | string | The text of the "OK" button | "OK" |
okButtonStyle | string | The style of the "OK" button. Must correspond to one of the 6 button styles of Bootstrap. | "primary" |
confirm(message[, options])An asynchronous function that will return true if the user clicks the "OK" button and false in the other cases.
import React, {useState} from 'react';
import {confirm} from 'react-bootstrap-confirmation';
const ConfirmButton = () => {
const display = async () => {
const result = await alert('Are you really sure?');
console.log('True if confirmed, false otherwise:', result);
};
return (
<button type="button" className="btn btn-primary" onClick={display}>
Display alert
</button>
);
};
| Parameter name | Type | Description | Default |
|---|---|---|---|
title | string | A facultative title to use for the modal. | undefined |
okText | string | The text of the "OK" button | "OK" |
okButtonStyle | string | The style of the "OK" button. Must correspond to one of the 6 button styles of Bootstrap. | "primary" |
cancelText | string | The text of the "Cancel" button | "Cancel" |
cancelButtonStyle | string | The style of the "Cancel" button. Must correspond to one of the 6 button styles of Bootstrap. | "secondary" |
FAQs
A library to easily display alerts and confirmations using React and Bootstrap
We found that react-bootstrap-confirmation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.