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.
<NaviusDirectionProvider Dir="rtl">
<NaviusToolbar>...</NaviusToolbar>
</NaviusDirectionProvider>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
navius add direction-providerAnatomy
@using Navius.Primitives.Components.DirectionProvider
<NaviusDirectionProvider Dir="ltr">
@* direction-aware primitives *@
</NaviusDirectionProvider>API Reference
Root
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.