Skip to main content
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

createPlugin API

Factory for creating Vue plugins with typed dependency injection and lifecycle hooks.

Explore these related pages for additional context and usage patterns.

PageCategory
createPluginFoundation
createContextFoundation
createTrinityFoundation
PluginsFundamentals

Functions

bindPluginContext

(app: App<any>, namespace: string, context: unknown) => void

Attach a plugin context to the DevTools inspector record for namespace. createPluginContext calls this after provide. Plugins that wrap createPlugin directly (stack, date) must call it from provide.

createPlugin

(options: PluginOptions) => Z

Creates a new Vue plugin.

createPluginContext

(defaultNamespace: string, factory: (options: Omit<O, PluginMeta>) => E, config?: PluginContextConfig<Omit<O, keyof PluginKeys>, E> | undefined) => readonly [<_E extends E = E>(_options?: O) => ContextTrinity<_E>, (_options?: O & Pick<PluginKeys, "devtools">) => Plugin, <_E extends E = E>(namespace?: string) => _E]

Options

provide required

(app: App) => void

setup

((app: App) => void) | undefined

devtools

boolean | undefined

When true, this plugin appears in the Vue DevTools v0 inspector.

Default: false

inspect

((context: unknown) => unknown) | undefined

Overlay keys onto the inspector snapshot (adapter names, method-backed state).

Was this page helpful?

© 2016-1970 Vuetify, LLC
Services
Ctrl+/