All Projects → sadiqevani → React Modal Box

sadiqevani / React Modal Box

React Modal Box, is a simple dependency free and customizable React Component to display Modals on your application. Its simple event system allows you to place the modal in the root component of your application, and calling it with the simple mixins, allows you to be flexible. It also includes event handling mixins, so you can detect when the modal is being called or being hidden.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Modal Box

Switzerland
🇨🇭Switzerland takes a functional approach to Web Components by applying middleware to your components. Supports Redux, attribute mutations, CSS variables, React-esque setState/state, etc… out-of-the-box, along with Shadow DOM for style encapsulation and Custom Elements for interoperability.
Stars: ✭ 261 (+107.14%)
Mutual labels:  component, components
Thorui Uniapp
ThorUI组件库,轻量、简洁的移动端组件库。组件文档地址:https://thorui.cn/doc/ 。 最近更新时间:2021-10-01
Stars: ✭ 1,842 (+1361.9%)
Mutual labels:  component, components
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+100.79%)
Mutual labels:  component, components
Yoshino
A themable React component library!Flexible Lightweight PC UI Components built on React! Anyone can generate easily all kinds of themes by it!
Stars: ✭ 216 (+71.43%)
Mutual labels:  component, components
Gu
A web ui library for Go. [DEPRECATED]
Stars: ✭ 102 (-19.05%)
Mutual labels:  component, components
React Components
React components
Stars: ✭ 47 (-62.7%)
Mutual labels:  component, components
React Fontawesome
A React Font Awesome component.
Stars: ✭ 662 (+425.4%)
Mutual labels:  component, components
Vcomponents
VComponents is a SwiftUI framework that contains 40+ customizable UI components
Stars: ✭ 117 (-7.14%)
Mutual labels:  component, components
Made With Love
🚀 An experimental project which demonstrates an Angular Package which contains Angular Elements and Schematics
Stars: ✭ 67 (-46.83%)
Mutual labels:  component, components
Stf Vue Select
stf vue select - most flexible and customized select
Stars: ✭ 61 (-51.59%)
Mutual labels:  flexible, component
React Multi Select
A Multi Select component built with and for React
Stars: ✭ 111 (-11.9%)
Mutual labels:  component, components
Viewcontroller
📌 A view controller manages a set of views that make up a portion of your app’s user interface,it aims to make ui develop change more clear and flexible.(ViewControler 是一种界面开发组件化实现方式,利用它可以将一些复杂的 UI 界面开发组件化.)
Stars: ✭ 117 (-7.14%)
Mutual labels:  flexible, components
Polyfill Iconv
This component provides a native PHP implementation of the php.net/iconv functions.
Stars: ✭ 1,621 (+1186.51%)
Mutual labels:  component
Mq Scss
Extremely powerful Sass media query mixin. Allows you to create almost any media query you can imagine.
Stars: ✭ 122 (-3.17%)
Mutual labels:  mixins
React4s
Production ready React wrapper for Scala.js - composable lifecycle - no memoization, no macros, no implicits.
Stars: ✭ 119 (-5.56%)
Mutual labels:  components
Vue Cion Design System
CION - Design system boilerplate for Vue.js
Stars: ✭ 119 (-5.56%)
Mutual labels:  components
Wxa Plugin Calendar
小程序插件-预约日历插件-微信小程序日历插件
Stars: ✭ 124 (-1.59%)
Mutual labels:  components
React Rainbow
🌈 React Rainbow Components. Build your web application in a snap.
Stars: ✭ 1,662 (+1219.05%)
Mutual labels:  components
Vue Datatables Net
Vue jQuery DataTables.net wrapper component
Stars: ✭ 119 (-5.56%)
Mutual labels:  component
Calendar
📆 calendar 日历
Stars: ✭ 119 (-5.56%)
Mutual labels:  component

React Modal Box

React Modal Box


React Modal Box, is a simple dependency free and customizable React Component to display Modals on your application. Its simple event system allows you to place the modal in the root component of your application, and calling it with the simple mixins, allows you to be flexible. It also includes event handling mixins, so you can detect when the modal is being called or being hidden.

API

Demo

Demo: React Component Box

Installing

npm install react-modal-box --save

Importing

import { Modal, ModalMixin, ModalEventsMixin } from 'react-modal-box';

Invoking

<Modal />

Tip: Include this component on the root folder of your React Application, you don't have to specifically include this modal on every view. By using the mixins and passing the content you want through the function calls, it gives you flexibility and reduces the amount of logic required to display modals, it also allows you to display different modal states in a single view, without cluttering the view/page component.

Custom Styles

// Place here React Styles (camel Case)

<Modal customStyles={{
    modalBackdrop: {
      // Backdrop styles
    },
    modalContainer: {
      // Modal container styles
    },
    modalDismiss: {
      // Dismiss Button Styles
    },
    modalIcon: {
      // Default Icon styles, element inside the modal Dismiss
    }, 
    modalHeader: {
      // Header Styles
    },
    modalContent: {
      // Content Styles
    },
    modalFooter: {
      // Footer Styles
    }
/>

Custom Properties

<Modal className="your-modal-class" data-attributes="true" />

You can pass any property into the root modal element, which by default is the backdrop element.

Custom Icon Style

<Modal customIcon={<i className="your-icon-class" />} />

Invoking Mixins

this.modalShow(
    <h1>Title</h1>,
    <p>Content</p>,
    <button onClick={this.hide}>Close Button</button>
);

Pass any JSX elements here, and style them however you want. You can build multiple functions with different contents, and simply have a modal in the root component.

this.modalHide();

Events Mixins

this.onModalShow(function (header, content, footer) {
   // The arguments passed into the function are the JSX
   // you sent to the modal when you invoked it.
   console.log("Modal Shown!");
});

this.onModalHide(function (header, content, footer) {
   // These arguments return nothing other than null's
   console.log("Modal Hidden!");
});

LICENCE

The MIT License (MIT) Copyright (c)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].