Reka UI logoReka
backdrop
Utilities

useDirection

Access the current direction

Usage

ts
import { useDirection } from 'reka-ui'

// With ConfigProvider setup as follows
// <ConfigProvider dir="rtl">
const locale = useDirection() // rtl
ts
import { useDirection } from 'reka-ui'

// With ConfigProvider setup as follows
// <ConfigProvider dir="rtl">
const locale = useDirection('ltr') // ltr