Direction
Runtime LTR / RTL — document dir and persisted preference.
@xngui/cdk/direction@xngui/cdk/directionPreview
Document dir: ltr
Start aligns to the reading edge — layout mirrors with direction.
Items: 1 · 2 · 3
import { XDirectionService } from '@xngui/cdk/direction';
const direction = inject(XDirectionService);
direction.setDirection('rtl');
direction.toggle();
// document.documentElement dir stays in sync and preference is persisted
Events
Interact with the preview — events will appear here.