All Projects → yesmeck → Redux Modal

yesmeck / Redux Modal

Licence: mit
Redux based modal

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Redux Modal

Jalert
jQuery alert/modal/lightbox plugin
Stars: ✭ 73 (-31.78%)
Mutual labels:  modal
Popup Maker
Popup Maker plugin for WordPress
Stars: ✭ 87 (-18.69%)
Mutual labels:  modal
Fas
C Pixels-based graphical audio synthesizer implemented as a WebSocket server
Stars: ✭ 100 (-6.54%)
Mutual labels:  modal
Reactjs Popup
React Popup Component - Modals,Tooltips and Menus —  All in one
Stars: ✭ 1,211 (+1031.78%)
Mutual labels:  modal
Jbox
jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.
Stars: ✭ 1,251 (+1069.16%)
Mutual labels:  modal
Launchy
Launchy: An Accessible Modal Window
Stars: ✭ 89 (-16.82%)
Mutual labels:  modal
React Native Modal Dropdown
A react-native dropdown/picker/selector component for both Android & iOS.
Stars: ✭ 1,103 (+930.84%)
Mutual labels:  modal
Ant Design Draggable Modal
The Modal from Ant Design, draggable.
Stars: ✭ 105 (-1.87%)
Mutual labels:  modal
Autocomplete
🔮 Fast and full-featured autocomplete library
Stars: ✭ 1,268 (+1085.05%)
Mutual labels:  modal
Customalertviewdialogue
Custom AlertView Dialogue is the world's most advanced alert view library. Custom AlertView Dialogue includes simple message popups, confirmation alerts, selector popups, action sheet bottom menus, and input/feedback contact forms.
Stars: ✭ 100 (-6.54%)
Mutual labels:  modal
React Poppop
A mobile support and multi-directional modal for ReactJS
Stars: ✭ 78 (-27.1%)
Mutual labels:  modal
React Native Bottomsheet Reanimated
React Native bottom sheet with fully native 60 FPS animations and awesome user experience
Stars: ✭ 80 (-25.23%)
Mutual labels:  modal
Reoverlay
The missing solution for managing modals in React.
Stars: ✭ 91 (-14.95%)
Mutual labels:  modal
Smalltalk
Promise-based Alert, Confirm and Prompt replacement
Stars: ✭ 76 (-28.97%)
Mutual labels:  modal
React Native Loading Spinner Overlay
💈 React Native loading spinner overlay
Stars: ✭ 1,369 (+1179.44%)
Mutual labels:  modal
React Native Alert Pro
The Pro Version of React Native Alert (Android & iOS)
Stars: ✭ 69 (-35.51%)
Mutual labels:  modal
Tingle
⚡ 2kB vanilla modal plugin, no dependencies and easy-to-use
Stars: ✭ 1,287 (+1102.8%)
Mutual labels:  modal
React Modal Video
Accessible React Modal Video Component
Stars: ✭ 105 (-1.87%)
Mutual labels:  modal
Bootstrap4 Fs Modal
A simple way to improve UX of Bootstrap 4 modals on mobile phones.
Stars: ✭ 102 (-4.67%)
Mutual labels:  modal
React Modal Image
A tiny React component providing modal image Lightbox.
Stars: ✭ 97 (-9.35%)
Mutual labels:  modal

Redux Modal

Greenkeeper badge

Build Status

redux-modal connect your modal to the redux store, and let you control your modal by simply dispatching actions.

It works with any react based modal component.

Live demo

Installation

npm i --save redux-modal

API

connectModal(config)

Connect a modal component to redux store.

Arguments

  • config(Object)
    • name(String)(Require) The modal name.
    • resolve(Function) Things you want to resolve before show your modal, if return a promise, the modal will show after the promise resolved.
    • destroyOnHide(Bool) Whether destroy the modal state and umount the modal after hide, default is true.
    • getModalState(Function) A function that takes the entire Redux state and returns the state slice which corresponds to where the redux-modal reducer was mounted. Defaults to assuming that the reducer is mounted under the 'modal' key.

Returns

A React component class that injects modal state, handleHide and handleDestroy action creator into your modal component.

Examples

export default connectModal({ name: 'myModal' })(MyModal)

It will pass the modal state and a handleHide and handleDestroy action creator as props to your modal component.

If you mounted your modal reducer at some other location such as modals instead of modal use the getModalState config

export default connectModal({ name: 'myModal', getModalState: (state) => state.modals })(MyModal)

reducer

The modal reducer. Should be given to mounted to your Redux state at modal.

Example

import { combineReducers } from 'redux'
import { reducer as modal } from 'redux-modal'

export default combineReducers({
  ...yourOtherReducers,
  modal
})

show(name, props) | show(name, props: T)

The show modal action creator.

Arguments

  • name(String) The name of modal to show.
  • props(Object) Props pass to your modal.

Example

import { MyModalProps } from '...'

show<MyModalProps>('modalName', {prop1: 'example'})

hide(name)

The hide modal action creator.

Arguments

  • name(String) The name of modal to hide.

License

MIT

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].