Skip to content

Direction Provider

Direction Provider cascades a reading direction ("ltr" or "rtl") to descendant primitives via a named cascading parameter (NaviusDirection). Direction-aware parts (roving focus, Slider, Scroll Area, menus) read the cascaded value and flip arrow-key semantics and layout for RTL. It renders no element of its own.

@using Navius.Primitives.Components.DirectionProvider
<NaviusDirectionProvider Dir="ltr">
@* direction-aware primitives *@
</NaviusDirectionProvider>

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

Prop Type Default Description
Dir string "ltr" Reading direction cascaded to descendants ("ltr" or "rtl").
ChildContent RenderFragment? - Descendants that read the cascaded direction.

Direction Provider wires no ARIA attributes itself; it only cascades a direction value that descendant primitives use to present the correct experience to users reading right-to-left, including which arrow key moves focus forward. There are no keyboard interactions of its own. This mechanism is covered by the Playwright browser test suite.