Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 370 Bytes

index.md

File metadata and controls

23 lines (16 loc) · 370 Bytes
category
Browser

useCssVar

Manipulate CSS variables

Usage

import { useCssVar } from '@vueuse/core'

const el = ref(null)
const color = useCssVar('--color', el)

const elv = ref(null)
const key = ref('--color')
const colorVal = useCssVar(key, elv)

const someEl = ref(null)
const color = useCssVar('--color', someEl, { initialValue: '#eee' })