modal

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

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/samiabid/lobehub-railway --skill modal-samiabid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modal
Source: https://github.com/samiabid/lobehub-railway/tree/main/.agents/skills/modal
Command: npx skills add https://github.com/samiabid/lobehub-railway --skill modal-samiabid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables developers to create and manage imperative modal dialogs in React applications using the createModal API from @lobehub/ui, reducing reliance on local UI state.

Core Features & Use Cases

  • Imperative modal creation: programmatically open and configure dialogs without managing open state.
  • Content integration: plug in a content component that renders inside the modal.
  • Reuse across features: export a modal creator function for consistent modals across screens.

Quick Start

Call the exported modal creator (for example, createMyFeatureModal) to display the dialog. Ensure the content component is provided and the @lobehub/ui library is available in your project.

Frequently Asked Questions about modal

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

FAQPage Schema
How do I create imperative modals in React without managing state?

Imperative modals let you programmatically open dialogs by calling a function instead of toggling state. Use the createModal API from @lobehub/ui to instantiate and display modals on demand, eliminating local UI state management for dialog flows.

Can I use imperative modals across multiple screens in a React app?

Yes. Export a modal creator function from a shared module, then call it from any component to display the same modal consistently. This approach reuses modal logic across features without duplicating dialog configuration.

What do I need to implement an imperative modal with createModal?

You need the @lobehub/ui library, a content component to render inside the modal, and access to the createModal function. Export a modal creator function that wraps createModal to make it available throughout your app.

How do imperative modals differ from managing dialogs with React state?

Imperative modals are triggered by function calls rather than state changes, reducing boilerplate for managing open/close states. This pattern simplifies dynamic dialog flows and keeps modal logic separate from component state.

Do I need a UI component library to use imperative modals?

Yes, this skill requires @lobehub/ui, which provides the createModal API. You also need a custom content component that defines what renders inside each modal dialog.