julianoczkowski/create-trimble-app/implement-modus-modal-with-refs
Claude Code and agent skill by julianoczkowski/create-trimble-app
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Create Modus modals using the callback ref pattern for programmatic control
Install
npx vskill@latest install julianoczkowski/create-trimble-app/implement-modus-modal-with-refsSKILL.md
Implement Modus Modal with Refs
Create Modus modal components using the callback ref pattern for programmatic control in SolidJS.
When to Use
Use this skill when:
- Creating modal dialogs that need to be opened/closed programmatically
- You need to control modal state from parent components
- Building modals with custom triggers (not just button clicks)
Pattern Overview
Modus modals in SolidJS require:
- Callback ref prop (
ref) to expose methods to parent components - `onMount` to call the ref callback with
{ openModal, closeModal } - `querySelector("dialog")` to access the native dialog element
- Event listeners for dialog close events with
onCleanup
Reference Implementation
See src/components/ModusModal.tsx for the complete implementation.
Complete Template
Usage Pattern
Key Patterns
1. Callback Ref Pattern (SolidJS)
2. Expose Methods via Ref Callback
3. Dialog Access
Critical: Always use querySelector("dialog") - don't try to access dialog methods directly on the web component.
4. Slot Structure
Modus modals use slots for content:
5. Event Handling with onCleanup
Common Mistakes
- Wrong dialog access: Use
querySelector("dialog"), not direct property access - Missing null checks: Always check
modalElbefore use - Wrong event: Listen to
closeevent on dialog element, not web component - Forgetting cleanup: Always use
onCleanupto remove event listeners
Related Files
src/components/ModusModal.tsx- Complete implementationsrc/demos/modal-demo/page.tsx- Usage examples
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtemplates/solidjs/.cursor/skills/implement-modus-modal-with-refs/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/julianoczkowski/create-trimble-app/implement-modus-modal-with-refs)