For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
13.5kProductPricingSign inStart free trialBook a demo
DocsAPIsSDKsEnterprise EdgeGuidesAcademyRelease notes
DocsAPIsSDKsEnterprise EdgeGuidesAcademyRelease notes
    • SDKs overview
  • Backend SDKs
    • Node.js
    • Java
    • Python
    • .NET
    • Go
    • PHP
    • Ruby
    • Rust
  • Frontend SDKs
    • React
    • React Native
    • JavaScript
    • Next.js
    • Android
    • Flutter
    • iOS
    • Svelte
    • Vue

Unleash reduces the risk of releasing new features, drives innovation by streamlining the software release process, and increases revenue by optimizing end-user experience. While we serve the needs of the world's largest, most security-conscious organizations, we are also rated the “Easiest Feature Management system to use” by G2.

GitHubGitHubLinkedInLinkedInX (Twitter)X (Twitter)SlackSlackStack OverflowStack OverflowYouTubeYouTube

Server SDKs

  • Node.js
  • Java
  • Go
  • Rust
  • Ruby
  • Python
  • .NET
  • PHP
  • All SDKs

Frontend SDKs

  • JavaScript
  • React
  • Next.js
  • Vue
  • iOS
  • Android
  • Flutter

Feature Flag use cases

  • Secure, scalable feature flags
  • Rollbacks
  • FedRAMP, SOC2, ISO2700 compliance
  • Progressive or gradual rollouts
  • Trunk-based development
  • Software kill switches
  • A/B testing
  • Feature management
  • Canary releases

Product

  • Quickstart
  • Unleash architecture
  • Pricing
  • Product vision
  • Open live demo
  • Open source
  • Enterprise feature management platform
  • Unleash vs LaunchDarkly

Support

  • Help center
  • Status
  • Changelog
Made in a cosy atmosphere in the Nordic countries.Copyright © 2026 Unleash
LogoLogo
13.5kProductPricingSign inStart free trialBook a demo
On this page
  • Installation
  • Initialization
  • Using config
  • Initializing your own client
  • Deferring client start
  • Check flags
  • Check variants
  • Defer rendering until flags fetched
  • Unleash context
  • Developer toolbar
Frontend SDKs

Vue SDK

||View as Markdown|
Was this page helpful?

Last updated May 11, 2026

Previous
Built with

The Unleash Vue SDK lets you evaluate feature flags in Vue applications. It connects to Unleash or Unleash Edge to fetch evaluated flags for a given Unleash context.

You can use this SDK with Unleash Enterprise or Unleash Open Source.

For an overview of how Unleash SDKs work, including offline behavior, feature compatibility across SDKs, and default refresh and metrics intervals, refer to the SDK overview.

Installation

npm
yarn
$npm install @unleash/proxy-client-vue

Initialization

Using config

1import { createApp } from 'vue'
2import { plugin as unleashPlugin } from '@unleash/proxy-client-vue'
3// import the root component App from a single-file component.
4import App from './App.vue'
5
6const config = {
7 url: 'https://HOSTNAME/api/frontend',
8 clientKey: 'FRONTEND_TOKEN',
9 refreshInterval: 15,
10 appName: 'your-app-name',
11}
12
13const app = createApp(App)
14app.use(unleashPlugin, { config })
15app.mount('#app')

Or use the FlagProvider component like this in your entrypoint file (typically App.vue):

1import { FlagProvider } from '@unleash/proxy-client-vue'
2
3const config = {
4 url: 'https://UNLEASH-INSTANCE/api/frontend',
5 clientKey: 'CLIENT-SIDE-API-TOKEN',
6 refreshInterval: 15,
7 appName: 'your-app-name',
8}
9
10<template>
11 <FlagProvider :config="config">
12 <App />
13 </FlagProvider>
14</template>

Initializing your own client

1import { createApp } from 'vue'
2import { plugin as unleashPlugin } from '@unleash/proxy-client-vue'
3// import the root component App from a single-file component.
4import App from './App.vue'
5
6const config = {
7 url: 'https://HOSTNAME/api/frontend',
8 clientKey: 'FRONTEND_TOKEN',
9 refreshInterval: 15,
10 appName: 'your-app-name',
11}
12
13const client = new UnleashClient(config)
14
15const app = createApp(App)
16app.use(unleashPlugin, { unleashClient: client })
17app.mount('#app')

Or, using FlagProvider:

1import { FlagProvider, UnleashClient } from '@unleash/proxy-client-vue'
2
3const config = {
4 url: 'https://UNLEASH-INSTANCE/api/frontend',
5 clientKey: 'FRONTEND_TOKEN',
6 refreshInterval: 15,
7 appName: 'your-app-name',
8}
9
10const client = new UnleashClient(config)
11
12<template>
13 <FlagProvider :unleash-client="client">
14 <App />
15 </FlagProvider>
16</template>

Deferring client start

By default, the Unleash client will start polling for toggles immediately when the FlagProvider component renders. You can delay the polling by:

  • setting the startClient prop to false
  • passing a client instance to the FlagProvider
1<template>
2 <FlagProvider :unleash-client="client" :start-client="false">
3 <App />
4 </FlagProvider>
5</template>

Deferring the client start gives you more fine-grained control over when to start fetching the feature toggle configuration. This could be handy in cases where you need to get some other context data from the server before fetching toggles, for instance.

To start the client, use the client’s start method. The below snippet of pseudocode will defer polling until the end of the asyncProcess function.

1const client = new UnleashClient({
2 /* ... */
3})
4
5onMounted(() => {
6 const asyncProcess = async () => {
7 // do async work ...
8 client.start()
9 }
10 asyncProcess()
11})
12
13<template>
14 <FlagProvider :unleash-client="client" :start-client="false">
15 <App />
16 </FlagProvider>
17</template>

Check flags

To check if a feature is enabled:

1<script setup>
2import { useFlag } from '@unleash/proxy-client-vue'
3
4const enabled = useFlag('travel.landing')
5</script>
6
7<template>
8 <SomeComponent v-if="enabled" />
9 <AnotherComponent v-else />
10</template>

Check variants

To check variants:

1<script setup>
2import { useVariant } from '@unleash/proxy-client-vue'
3
4const variant = useVariant('travel.landing')
5</script>
6
7<template>
8 <SomeComponent v-if="variant.enabled && variant.name === 'SomeComponent'" />
9 <AnotherComponent v-else-if="variant.enabled && variant.name === 'AnotherComponent'" />
10 <DefaultComponent v-else />
11</template>

Defer rendering until flags fetched

useFlagsStatus retrieves the ready state and error events. Follow the following steps in order to delay rendering until the flags have been fetched.

1import { useFlagsStatus } from '@unleash/proxy-client-vue'
2
3const { flagsReady, flagsError } = useFlagsStatus()
4
5<Loading v-if="!flagsReady" />
6<MyComponent v-else error={flagsError} />

Unleash context

Follow the following steps in order to update the unleash context:

1import { useUnleashContext, useFlag } from '@unleash/proxy-client-vue'
2
3const props = defineProps<{
4 userId: string
5}>()
6
7const { userId } = toRefs(props)
8
9const updateContext = useUnleashContext()
10
11onMounted(() => {
12 updateContext({ userId })
13})
14
15watch(userId, () => {
16 async function run() {
17 await updateContext({ userId: userId.value })
18 console.log('new flags loaded for', userId.value)
19 }
20 run()
21})

Developer toolbar

The Developer Toolbar provides runtime flag overrides during development.

1// composables/useUnleash.ts
2import { ref, onMounted } from 'vue'
3import { UnleashClient } from 'unleash-proxy-client'
4import { initUnleashToolbar } from '@unleash/toolbar'
5import '@unleash/toolbar/toolbar.css'
6
7export function useUnleash() {
8 const unleashClient = ref(null)
9 const isReady = ref(false)
10
11 onMounted(async () => {
12 const client = new UnleashClient({ /* your config */ })
13
14 if (import.meta.env.DEV) {
15 unleashClient.value = initUnleashToolbar(client, { themePreset: 'dark' })
16 } else {
17 unleashClient.value = client
18 }
19
20 await unleashClient.value.start()
21 isReady.value = true
22 })
23
24 return { unleashClient, isReady }
25}

Refer to the complete Vue example on GitHub for a full implementation.