Skip to content

Direction Provider

Direction Provider renders NaviusDirectionProvider, which owns the cascading direction value and renders no DOM element of its own. Wrapping a subtree flips every Zits/Navius primitive inside it (menus, popovers, sliders, scroll areas) to the given direction; descendant components read the cascaded value and apply their own dir attribute or directional offset.

Terminal window
navius add direction-provider --to ./src/MyApp --namespace MyApp.Ui
<ZitsDirectionProvider Dir="rtl">
<ZitsPopover>
<ZitsPopoverTrigger>افتح</ZitsPopoverTrigger>
<ZitsPopoverContent>المحتوى يتدفق من اليمين إلى اليسار.</ZitsPopoverContent>
</ZitsPopover>
</ZitsDirectionProvider>

ZitsDirectionProvider is a single control with no part tree. Dir passes straight through to NaviusDirectionProvider, unchanged.

Prop Type Default Description
Dir string "ltr" Reading direction cascaded to descendants: "ltr" or "rtl".

Not applicable: the provider renders no DOM element and takes no class/Attributes.

Not applicable: the provider renders no DOM element.