All Projects → ozanbolel → react-fusionui

ozanbolel / react-fusionui

Licence: MIT license
☢️ Nuclear power-up for your UI.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to react-fusionui

vue-modal
Reusable Modal component, supports own custom HTML, text and classes.
Stars: ✭ 29 (+123.08%)
Mutual labels:  modal, dialog
jquery.dialog.js
A lightweight replacement for the browser's default dialog boxes.
Stars: ✭ 17 (+30.77%)
Mutual labels:  modal, dialog
sweet-modal-vue
The sweetest library to happen to modals.
Stars: ✭ 762 (+5761.54%)
Mutual labels:  modal, dialog
MultiDialog
MultiDialog utilizes jQuery UI Dialog Widget for a full featured Modalbox / Lightbox application.
Stars: ✭ 23 (+76.92%)
Mutual labels:  modal, dialog
react-redux-modal-flex
[DEPRECATED] Make easy a modal/popup with Redux
Stars: ✭ 14 (+7.69%)
Mutual labels:  modal, dialog
react-layer-stack
Layering system for React. Useful for popover/modals/tooltip/dnd application
Stars: ✭ 158 (+1115.38%)
Mutual labels:  react-component, modal
react-spring-bottom-sheet
Accessible ♿️, Delightful ✨, & Fast 🚀
Stars: ✭ 604 (+4546.15%)
Mutual labels:  modal, dialog
react-daterange-picker
A react date range picker to using @material-ui. Live Demo: https://flippingbitss.github.io/react-daterange-picker/
Stars: ✭ 85 (+553.85%)
Mutual labels:  hooks, react-component
eins-modal
Simple to use modal / alert / dialog / popup. Created with pure JS. No javascript knowledge required! Works on every browser and device! IE9
Stars: ✭ 30 (+130.77%)
Mutual labels:  modal, dialog
ngx-simple-modal
A simple unopinionated framework to implement simple modal based behaviour in angular (v2+) projects.
Stars: ✭ 50 (+284.62%)
Mutual labels:  modal, dialog
svelte-accessible-dialog
An accessible dialog component for Svelte apps
Stars: ✭ 24 (+84.62%)
Mutual labels:  modal, dialog
react-accessible-modal
Accessible modal dialog component for React
Stars: ✭ 17 (+30.77%)
Mutual labels:  react-component, modal
react-st-modal
Simple and flexible modal dialog component for React JS
Stars: ✭ 41 (+215.38%)
Mutual labels:  modal, dialog
LSDialogViewController
Custom Dialog for iOS written in Swift
Stars: ✭ 74 (+469.23%)
Mutual labels:  modal, dialog
React Colorful
🎨 A tiny (2,5 KB) color picker component for React and Preact apps
Stars: ✭ 951 (+7215.38%)
Mutual labels:  hooks, react-component
react-redux-modals
This repo created for Medium.com: React/Redux: Modals and Dialogs
Stars: ✭ 30 (+130.77%)
Mutual labels:  modal, dialog
Reactjs Popup
React Popup Component - Modals,Tooltips and Menus —  All in one
Stars: ✭ 1,211 (+9215.38%)
Mutual labels:  react-component, modal
React Layer Stack
Layering system for React. Useful for popover/modals/tooltip/dnd application
Stars: ✭ 152 (+1069.23%)
Mutual labels:  react-component, modal
vue-modal
A customizable, stackable, and lightweight modal component for Vue.
Stars: ✭ 96 (+638.46%)
Mutual labels:  modal, dialog
angular-custom-modal
Angular2+ Modal / Dialog (with inner component support).
Stars: ✭ 30 (+130.77%)
Mutual labels:  modal, dialog

React FusionUI ☢️

npm npm downloads npm bundle size

Open modals and dialogs with ease! 🚀 FusionUI is an unopinionated and minimalist library to power-up your UI.

Demo with Examples

ozanbolel.github.io/react-fusionui

Installation

# npm
npm i react-fusionui

# yarn
yarn add react-fusionui

Basic Usage

import React from "react";
import { FusionContainer, useModal } from "react-fusionui";

const Modal = ({ isAnimationDone, isClosing, closeModal }) => {
  return <h2>Modal</h2>;
};

const Home = () => {
  const modal = useModal();

  return <button onClick={() => modal(Modal)}>Open Modal</button>;
};

const MyApp = () => {
  return (
    <FusionContainer>
      <Home />
    </FusionContainer>
  );
};

export default MyApp;

You need to wrap your app within FusionContainer.

FusionUI passes isAnimationDone, isClosing and closeModal props to your modal component.

Theming

import React from "react";
import { FusionContainer } from "react-fusionui";
import css from "./App.module.css";

const MyApp = () => {
  return (
    <FusionContainer
      modalClassNames={{
        container: css.container,
        modal: css.modal
      }}
      dialogClassNames={{
        container: css.container,
        dialog: css.dialog,
        content: css.content,
        actionContainer: css.actionContainer,
        action: css.action,
        actionLabel: css.actionLabel,
        highlight: css.highlight
      }}
    >
      ...
    </FusionContainer>
  );
};

export default MyApp;

API

useModal

Args
Arg Description Type Required
Component Component you want to render inside the modal. FunctionalComponent YES
config Modal configuration. Object
Config Object
Name Description Type Required
props Props you want to pass to the component you specified. Object
autoclose Should your component close when user clicks outside of your modal. Boolean

useDialog

Args
Arg Description Type Required
content Content of the dialog. ReactNode YES
actions Actions which will be rendered as buttons. Array YES
config Dialog configuration. Object
Action Object
Name Description Type Required
label Label of the button. String YES
callback Will run when the button is clicked. Function
highlight Apply highlight styles to the button. Boolean
Config Object
Name Description Type Required
autoclose Should the dialog close when user clicks outside of the dialog. Boolean

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