Skip to main content
Docs

updateClerkOptions()

The updateClerkOptions() function is used to update Clerk's options at runtime. It can be called at any time after Clerk has been initializedVue.js Icon.

Usage

<script setup>
import { updateClerkOptions } from '@clerk/vue'
import { dark } from '@clerk/themes'

const isDark = ref(false)

function toggleTheme() {
  isDark.value = !isDark.value
  updateClerkOptions({
    appearance: {
      baseTheme: isDark.value ? dark : undefined,
    },
  })
}
</script>

<template>
  <button @click="toggleTheme">Toggle Theme</button>
</template>

Feedback

What did you think of this content?

Last updated on