Skip to content

Function: useValaxyDark()

useValaxyDark(options): object

Defined in: packages/valaxy/client/composables/dark.ts:5

Parameters

options

circleTransition

boolean

Enable circle transition when toggling dark mode Then use toggleDarkWithTransition instead of toggleDark

themeColor

{ dark: string; light: string; }

themeColor.dark

string

themeColor.light

string

useDarkOptions

UseDarkOptions

Options for useDark disableTransition default is true

See

https://vueuse.org/core/useDark

Url

https://paco.me/writing/disable-theme-transitions

Returns

object

isDark

isDark: WritableComputedRef<boolean, boolean>

Dark mode state, sync with app store

You can also use const appStore = useAppStore(); appStore.isDark to get the value

themeColor

themeColor: ComputedRef<string>

toggleDark()

toggleDark: (value?) => boolean

Parameters

value?

boolean

Returns

boolean

toggleDarkWithTransition()

toggleDarkWithTransition: (event, options) => void

Parameters

event

MouseEvent

options
duration

number

easing

string

Returns

void