When to use this skill
ALWAYS use this skill when the user mentions:
- Creating or configuring Tauri windows
- Window lifecycle, behaviors, or multi-window patterns
- Custom titlebar or frameless window UI
Trigger phrases include:
- "window", "titlebar", "frameless", "multi-window", "window lifecycle"
- "window", "titlebar", "frameless", "multi-window", "lifecycle"
How to use this skill
- Identify the window requirements and platform targets
- Map requirements to windows config and runtime APIs
- Provide custom titlebar structure and event handling guidance
- Validate lifecycle events and window state transitions
Outputs
- Window configuration and lifecycle plan
- Custom titlebar guidance
Scope
- Boundary: Window creation, configuration, and lifecycle only
- v2 focus: Windows config and runtime window APIs
References
- https://v2.tauri.app/llms.txt
- https://v2.tauri.app/learn/window-customization/
- https://v2.tauri.app/zh-cn/learn/window-customization/
- https://v2.tauri.app/reference/config/#windows-config
Keywords
tauri v2, window, titlebar, lifecycle, windows config, frameless
Common Gotchas
- Version compatibility: Pay attention to compatibility between framework versions and dependency libraries; APIs may differ across versions
- Configuration file format: Configuration file format errors are the most common problem; it is recommended to use the editor's syntax checking
- Environment variables: Ensure all necessary environment variables are set correctly, and do not hardcode sensitive information
- Dependency conflicts: Be mindful of dependency conflicts when multiple versions coexist, and use a lock file to pin versions
- Performance pitfalls: Pay attention to performance optimization in large-data scenarios, and avoid common issues such as N+1 queries
Usage workflow
Step 1: Environment preparation
Ensure the development environment has the necessary dependencies and tools installed.
Step 2: Configuration initialization
Perform basic configuration according to project requirements.
Step 3: Using core features
Implement core features according to the sample code.
Step 4: Testing and verification
Run tests to ensure the functionality works properly.
Step 5: Deployment and release
After development is complete, proceed with deployment and monitoring.