app.use() Install a Plugin
Last updated: 2026-10-22
app.use() Install a Plugin
app.use() installs a plugin that may register globals, inject dependencies or extend config (routers, stores and more).
| Group | Global API |
|---|---|
| Kind | API |
| Scope | Global |
| Vue Version | 3.0+ |
| SSR Support | Yes |
📝 Syntax
app.use(router)
app.use(pinia)
app.use(MyPlugin, { option: 1 })
⚙️ Arguments
| plugin, ...options | A plugin (object with install or a function) plus optional options |
|---|
Returns:The app instance (chainable)
▶ Example
Edit the code below and see the live result:
Output:
Shows 'Hello, Vue developer'.
💡 Key Points
ℹ️ Note A plugin installs once per app.
💡 Tip Plugins attach capabilities via globalProperties or provide.
⚠️ Warning Install before mounting.
🏷️ Related Global API
💡 Related Cases
More case studies coming soon.
📚 Related Tutorials
❓ FAQ
Q How do plugins relate to UI libraries?
A Most UI libraries are plugins registering their components.
Q Can several plugins be installed?
A Yes — order can matter.
Q Does re-installing duplicate?
A No — installs are tracked.