modal

Create and control modal dialogs imperatively via createModal from @lobehub/ui.

Updated Aug 30, 2025
One-click install
npx skills add https://github.com/cute-baobao/pm --skill modal-cute-baobao
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modal
Source: https://github.com/cute-baobao/pm/tree/main/.agents/skills/modal
Command: npx skills add https://github.com/cute-baobao/pm --skill modal-cute-baobao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The modal imperative API provides a concise approach to creating and controlling modal dialogs on demand using createModal from @lobehub/ui, eliminating the need to manage local open/close state for every dialog.

Core Features & Use Cases

  • Imperative modal creation via createModal with a content component
  • Configurable options such as fullscreen, width, footer, and destruction behavior
  • Practical usage patterns including i18n integration and modal context access with useModalContext

Quick Start

Call createMyFeatureModal() to render and display the modal.

Frequently Asked Questions about modal

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create imperative modal dialogs in React without managing local open/close state?▼

Imperative modal dialogs can be created on demand using the createModal API from @lobehub/ui, eliminating the need to manage local open/close state for every dialog in your React application.

What configuration options are available for React modal dialogs using createModal?▼

React modal dialogs created via createModal support configuration options including fullscreen mode, custom width, footer customization, and destroyOnHidden behavior to control component lifecycle.

Can I integrate i18n internationalization with imperative modal dialogs in a React application?▼

Yes, imperative modal dialogs support i18n integration and allow access to modal context using the useModalContext hook within your React application components.

What is the best way to trigger on-demand overlays and confirmations across a React application?▼

The best way to trigger on-demand overlays and confirmations is using the imperative createModal API, which renders contextual dialogs on demand without managing component-level visibility state.

How does the imperative modal approach compare to declarative React dialog components?▼

The imperative modal approach using createModal provides a concise API for on-demand dialogs, bypassing the need to manually manage open/close state required by declarative React dialog components.

When should I avoid using imperative modal dialogs in React?▼

You should avoid imperative modal dialogs when your React application requires persistent dialog state across component re-renders, as the imperative API focuses on on-demand contextual overlays and confirmations.