
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
cf-component-modal
Advanced tools
Cloudflare Modal Component
Installation with yarn is recommended
$ yarn add cf-component-modal
import React from 'react';
import {
Modal,
ModalHeader,
ModalTitle,
ModalClose,
ModalBody,
ModalFooter,
ModalActions,
ModalInfo
} from 'cf-component-modal';
import { Button } from 'cf-component-button';
import { Box } from 'cf-component-box';
class ModalComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
isModalOpen: false,
width: null,
showInfo: false
};
this.handleRequestOpen = this.handleRequestOpen.bind(this);
this.handleRequestClose = this.handleRequestClose.bind(this);
}
handleRequestOpen() {
this.setState({ isModalOpen: true });
}
handleRequestClose() {
this.setState({ isModalOpen: false });
}
handleWidthToggle() {
this.setState(oldState => ({
width: oldState.width === 'wide' ? null : 'wide'
}));
}
handleInfoToggle() {
this.setState(() => ({
showInfo: !this.state.showInfo
}));
}
render() {
return (
<div>
<Button type="default" onClick={this.handleRequestOpen}>
Open Modal
</Button>
<Modal
isOpen={this.state.isModalOpen}
onRequestClose={this.handleRequestClose}
width={this.state.width}
>
<ModalHeader>
<ModalTitle>Hello from Modal</ModalTitle>
<ModalClose onClick={this.handleRequestClose} />
</ModalHeader>
{this.state.showInfo && (
<ModalInfo>This is some modal Info</ModalInfo>
)}
<ModalBody>
<p>Look at this awesome modal!</p>
</ModalBody>
<ModalFooter>
<ModalActions>
<Box marginRight="10px" display="inline-block">
<Button
type="default"
onClick={this.handleWidthToggle.bind(this)}
>
Toggle width
</Button>
</Box>
<Box marginRight="10px" display="inline-block">
<Button
type="default"
onClick={this.handleInfoToggle.bind(this)}
>
Toggle info
</Button>
</Box>
<Button
type="default"
onClick={this.handleRequestClose.bind(this)}
>
Close Modal
</Button>
</ModalActions>
</ModalFooter>
</Modal>
</div>
);
}
}
export default ModalComponent;
FAQs
Cloudflare Modal Component
The npm package cf-component-modal receives a total of 76 weekly downloads. As such, cf-component-modal popularity was classified as not popular.
We found that cf-component-modal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 23 open source maintainers 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.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.