modal

Create imperative modal dialogs with createModal from @lobehub/ui.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/Nick777-Pixel/mychat7 --skill modal-nick777-pixel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modal
Source: https://github.com/Nick777-Pixel/mychat7/tree/main/.agents/skills/modal
Command: npx skills add https://github.com/Nick777-Pixel/mychat7 --skill modal-nick777-pixel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Imperative modal dialogs are often easier to manage when you need to control lifecycle, focus, and composition without relying on component state. This guide explains how to use createModal from @lobehub/ui to instantiate and display modal content programmatically.

Core Features & Use Cases

  • Imperative creation: use createModal to show dialogs on-demand without local state management.
  • Content flexibility: supply a custom content component that uses modal context and translations.
  • Configurability: tune fullscreen, width, destroy behavior, and footer to fit your UI needs.
  • Use cases: settings panels, confirmations, complex forms, and transient prompts in React apps.

Quick Start

Call createModal with your modal content to display an imperatively controlled dialog.

Frequently Asked Questions about modal

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

FAQPage Schema
How do I open a React modal imperatively without managing component state?

To open a React modal imperatively without managing component state, use the createModal helper from @lobehub/ui to instantiate and display modal content programmatically on demand.

What is imperative modal creation and when do I need it in React?

Imperative modal creation is a technique that displays dialogs on-demand via function calls, needed in React apps for settings panels, confirmations, or complex forms across components and routes.

Do I need the Lobehub UI library to use createModal for dialogs?

Yes, you need the Lobehub UI library to use createModal, as this helper is exposed directly from @lobehub/ui to facilitate imperative dialog creation in React projects.

Can I configure fullscreen, width, and footer options for an imperative modal?

Yes, you can configure fullscreen, width, footer, and destroyOnHidden options for an imperative modal by passing these settings when calling createModal with your custom content component.

What's the best way to supply content to an imperative modal in React?

The best way to supply content to an imperative modal in React is to provide a custom content component that utilizes modal context and translations when calling the createModal function.

When should I avoid imperative modals in frontend development?

You should avoid imperative modals in frontend development if your UI requires strict state management synchronization, as this approach focuses on on-demand programmatic lifecycle control without local state.