navius

Direction Provider

Wraps part of your application to provide the reading direction (LTR or RTL) to direction-aware primitives.

Tab into the toolbar, then use the arrow keys; focus moves with the reading direction.

Features

  • DOM-transparent: renders no element of its own, only cascades the direction.
  • Direction-aware parts (roving focus, Slider, Scroll Area, menus) read it and flip arrow-key semantics and layout for RTL.

Installation

Anatomy

API Reference

Cascades the reading direction to descendants. Renders no DOM element.

Prop Type Default
Dir string "ltr"
ChildContent RenderFragment? -

Accessibility

Setting the direction lets primitives present a correct experience to users reading right-to-left, including which arrow key moves focus forward. There are no keyboard interactions of its own.