Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

overlay-kit

> 前端框架
Open source

A library for handling overlays more easily in React.

726 stars0 likes2 views
WebsiteGitHub

About

A library for handling overlays more easily in React.

overlay-kit ·

English | 한국어 | 日本語

overlay-kit is a library for declaratively managing overlays like modals, popups, and dialogs in React.

You can efficiently implement overlays without complex state management or unnecessary event handling.

bash
npm install overlay-kit

Example

First, add provider:

typescript
import { OverlayProvider } from 'overlay-kit';

const app = createRoot(document.getElementById('root')!);
app.render(
  
    
  
);

Opening Simple Overlays

You can easily open and close overlays using overlay.open.

typescript
import { overlay } from 'overlay-kit';

 {
    overlay.open(({ isOpen, close, unmount }) => (
      
    ))
  }}
>
  Open

Opening Asynchronous Overlays

You can handle overlay results as a Promise using overlay.openAsync.

typescript
import { overlay } from 'overlay-kit';

 {
    const result = await overlay.openAsync(({ isOpen, close, unmount }) => (
       close(true)}
        onClose={() => close(false)}
        onExit={unmount}
      />
    ))
  }}
>
  Open

Why use overlay-kit?

Problems with Traditional Overlay Management**

  1. Complexity of State Management
    • Had to manage overlay state directly using useState or global state.
    • Code became complex and less readable as state management mixed with UI logic.
  2. Repetitive Event Handling
    • Had to repeatedly write event handling code for opening, closing, and returning results.
    • This led to code duplication and degraded development experience.
  3. Lack of Reusability
    • UI and logic were tightly coupled through callback functions to return values from overlays.
    • This made it difficult to reuse components.

Goals of overlay-kit

  1. Design Following React Philosophy
    • React favors declarative code.
    • overlay-kit helps manage overlays declaratively.
  2. Improve Development Productivity
    • By encapsulating state management and event handling, developers can focus solely on UI and business logic.
  3. Enhance Extensibility and Reusability
    • Increased overlay reusability by separating UI and behavior, and returning Promises.

License

MIT © Viva Republica, Inc. See LICENSE for details.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptoverlayreact

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架