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

react-dialog-native

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dialog-native

A React Dialog based on HTML5 `<dialog>`

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Dialog Native

A React Dialog based on HTML5 <dialog>

Introduction

Motivation

Some of the latest browsers already support the dialog tag, and dialog-polyfill already exists, and native dialog lacks some features.

  • open attribute cannot open backdrop at the same time
  • cannot add a click event for backdrop
  • react support

Tutorial

Installation

For NPM users:

  • npm install --save react react-dom prop-types dialog-polyfill // see package.json:peerDependencies

  • npm install --save react-dialog-native

For UMD user:

  • ReactDialogNative
  • React
  • ReactDOM
  • PropTypes
  • dialogPolyfill

API Reference

static propTypes = {
  open: PropTypes.bool,
  className: PropTypes.string,
  closeBackdropOnClick: PropTypes.bool,
  onClose: PropTypes.func.isRequired,
};

Example

import React from 'react';
import Dialog from 'react-dialog-native';

import 'dialog-polyfill/dialog-polyfill.css';
import 'react-dialog-native/dist/react-dialog-native.css'

export default class Example extends Component {
  render() {
    return (
      <Dialog open={dialogOpen1} onClose={this.handleClose}>
        This is a Dialog
        <button type="button" onClick={this.handleClose}>close</button>
      </Dialog>
    );
  }
}

License

MIT

Copyright (c) 2017-present

FAQs

Package last updated on 21 Sep 2017

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