Introducing Grunfeld

Grunfeld is a simple and intuitive dialog manager for React apps. With a small amount of code, you can implement modals, alerts, and confirmation dialogs without complex state management.

It supports synchronous alerts and Promise-based dialogs for user input, flexible 9-grid positioning, and a predictable LIFO stack. You can choose inline rendering or top-layer rendering with the native <dialog> element, and customize behavior and styling per dialog or globally via the Provider.

Installation#

Grunfeld can be installed in various ways:

Quick Start#

Add GrunfeldProvider at the top level of your app:

Basic Usage#

You can create a simple confirmation dialog and receive the user's response. The grunfeld.add() method returns a Promise, so you can use async/await to wait for the user's choice.

Grunfeld - Promise-based Dialog Management | ilokesto - React Library Collection