julianoczkowski/create-trimble-app/create-modus-wrapper-component
Claude Code and agent skill by julianoczkowski/create-trimble-app
- community
Checking that the SKILL.md file is still in the repository.
Scaffold a new Modus wrapper component following established SolidJS patterns with proper TypeScript interfaces, event handling, and cleanup
Install
npx vskill@latest install julianoczkowski/create-trimble-app/create-modus-wrapper-componentSKILL.md
Create Modus Wrapper Component
Scaffold a new Modus wrapper component following established SolidJS patterns from the codebase.
When to Use
Use this skill when:
- Creating a new wrapper component for a Modus web component
- You need to integrate a Modus component that doesn't have a wrapper yet
- You want to ensure proper event handling and TypeScript types
Pattern Overview
All Modus wrapper components in SolidJS follow this structure:
- Use vanilla web component (
<modus-wc-[component]>) from@trimble-oss/moduswebcomponents - Define TypeScript props interface with JSDoc comments
- Use `let ref` for component reference (callback ref pattern)
- Use `createEffect` for event listeners with proper cleanup
- Forward props to the web component with conditional spreading
- Handle events via event listeners, not SolidJS props
Reference Examples
- Simple wrapper:
src/components/ModusButton.tsx- No event listeners needed - With event listeners:
src/components/ModusCheckbox.tsx- Shows event handling pattern - With dropdown:
src/components/ModusDropdownMenu.tsx- Shows menu event handling
Implementation Template
Key Patterns
1. Conditional Prop Spreading
For optional props that shouldn't be passed when undefined:
2. Event Listener Setup
Always use createEffect with cleanup:
3. TypeScript Types
Use proper types for web component elements:
4. Prop Naming
Web components use kebab-case for props:
5. Callback Ref Pattern
Common Event Names
Modus components use these common event names:
inputChange- For input value changesinputFocus- For focus eventsinputBlur- For blur eventsbuttonClick- For button clicksitemSelect- For menu/dropdown item selectionmenuVisibilityChange- For dropdown menu visibilityexpandedChange- For accordion/collapse state
Check the Modus documentation for component-specific events.
Accessibility
Always include:
aria-labelprop for icon-only or non-text components- Proper ARIA attributes passed to web component
- Keyboard navigation support (usually handled by web component)
Testing Checklist
- [ ] Component renders without errors
- [ ] Props are forwarded correctly to web component
- [ ] Event listeners are set up and cleaned up properly
- [ ] TypeScript types are correct
- [ ] Accessibility attributes are included
- [ ] Conditional props don't pass undefined values
Common Mistakes to Avoid
- Missing cleanup: Always return cleanup function from
createEffect - Wrong event names: Check Modus docs for exact event names
- Passing undefined: Use conditional spreading for optional props
- Wrong prop names: Web components use kebab-case, SolidJS uses camelCase
- Missing null checks: Always check
componentElbefore use
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/create-modus-wrapper-component/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/create-modus-wrapper-component)