
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
cov-message-box
Advanced tools
COV Message Box component using Kendo React Dialog. Modelled after C# Message Box
A React message-box dialog component built on Kendo React Dialog, modelled after the familiar C#
MessageBoxpattern. Render customizable confirmation dialogs with configurable buttons, HTML content, and styling.
npm install --save cov-message-box
This component requires the following peer dependencies to be installed in your project:
npm install --save react @progress/kendo-react-dialogs @progress/kendo-react-buttons @progress/kendo-react-editor lodash
| Package | Version |
|---|---|
react | ^18 || ^19 |
@progress/kendo-react-dialogs | ^14.0.0 |
@progress/kendo-react-buttons | ^14.0.0 |
@progress/kendo-react-editor | ^14.0.0 |
lodash | ^4.17.21 |
import React, { useState } from "react";
import { MessageBox } from "cov-message-box";
import { Button } from "@progress/kendo-react-buttons";
function App() {
const [displayMessageBox, setDisplayMessageBox] = useState(false);
function onMessageBoxClose(messageBoxResult) {
setDisplayMessageBox(false);
switch (messageBoxResult.toUpperCase()) {
case "YES":
// handle yes
break;
case "NO":
// handle no
break;
default:
break;
}
}
return (
<>
<Button onClick={() => setDisplayMessageBox(true)}>Show Message Box</Button>
{displayMessageBox && (
<MessageBox
message="Are you sure?"
title="Confirm Your Action"
buttonsArray={["Yes", "No", "Cancel"]}
onClose={onMessageBoxClose}
defaultButton="Yes"
/>
)}
</>
);
}
The message prop accepts HTML strings, allowing rich formatting:
<MessageBox
message="<h2>Warning</h2><p>This action <strong>cannot</strong> be undone.</p>"
title="Delete Record"
buttonsArray={["Delete", "Cancel"]}
onClose={handleClose}
defaultButton="Cancel"
/>
<MessageBox
message="Are you sure?"
title="Confirm"
buttonsArray={["Yes", "No"]}
onClose={handleClose}
defaultButton="Yes"
width={500}
height={300}
editorContentStyle={{ height: "100px" }}
editorStyle={{ textAlign: "center" }}
dialogActionsBarStyle={{ display: "flex", justifyContent: "center" }}
/>
| Prop | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The message to display. Supports plain text or HTML (e.g. <h1>Are you sure?</h1>). |
title | string | Yes | The title displayed in the dialog header. |
buttonsArray | string[] | Yes | Array of button labels to render (e.g. ["Yes", "No", "Cancel"]). |
onClose | (result: string) => void | Yes | Callback invoked when a button is clicked. Receives the button label as the argument. |
defaultButton | string | No | Button label that should be rendered as the primary (solid) button. Must match a value in buttonsArray. |
width | number | string | No | Width of the dialog. |
height | number | string | No | Height of the dialog. |
editorContentStyle | object | No | CSS styles applied to the content wrapper of the internal Kendo Editor. |
editorStyle | object | No | CSS styles applied to the Kendo Editor container. Merged with sensible defaults (read-only appearance, centered text, no border). |
dialogActionsBarStyle | object | No | CSS styles applied to the wrapper <div> around the DialogActionsBar. Useful for centering buttons. |
Dialog with a read-only Editor for the message content and a DialogActionsBar for the buttons.defaultButton is rendered with a solid fill; all other buttons use an outline style.onClose is called with that button's label string, letting you branch your logic via a switch or if statement.npm run build
Output is written to dist/ in both ES module and CommonJS formats.
MIT © covnpmjs
FAQs
COV Message Box component using Kendo React Dialog. Modelled after C# Message Box
We found that cov-message-box demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.