category |
---|
Browser |
Reactive dir of the element's text.
import { useDir } from '@vueuse/core'
const dir = useDir() // Ref<'ltr' | 'rtl' | 'auto'>
By default, which enables rlt
direction when dir rtl
is applied to the html
tag, for example:
<!--ltr-->
<html> ... </html>
<!--rtl-->
<html dir="rtl"> ... </html>
import { useDir } from '@vueuse/core'
const mode = useDir({
selector: 'body'
}) // Ref<'ltr' | 'rtl' | 'auto'>