Function: useValaxyDark()
useValaxyDark(
options
):object
Parameters
• options = {}
• options.circleTransition?: boolean
Enable circle transition when toggling dark mode Then use toggleDarkWithTransition
instead of toggleDark
• options.themeColor?
• options.themeColor.dark?: string
• options.themeColor.light?: string
• options.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 = {}
• options.duration?: number
• options.easing?: string
Returns
void