implement-modus-modal-with-refs

Community

Programmatic control for Modus modals in React

Authorjulianoczkowski
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Enable React apps to control Modus modal dialogs from parent components using a stable API, avoiding brittle DOM manipulation and enabling coordinated UI flows.

Core Features & Use Cases

  • ForwardRef pattern to expose openModal and closeModal
  • useImperativeHandle for a consistent, typed API
  • Access to the native dialog via querySelector("dialog")
  • Slot-based content structure (header, content, footer) for flexible composition
  • Suitable for modals that require programmatic triggers, lifecycle control, and testability in React apps

Quick Start

Create a ModusModal with a component ref and call openModal() in response to a user action.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: implement-modus-modal-with-refs
Download link: https://github.com/julianoczkowski/create-trimble-app/archive/main.zip#implement-modus-modal-with-refs

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.