Direction
@xngui/core/direction@xngui/core/directionRuntime LTR / RTL with persisted preference.
Preview
Document direction
Active ltr · isRtl false
Sample paragraph
Logical start/end padding and text alignment follow the active direction. Icons and inline actions should mirror in RTL layouts.
import { XDirectionService } from '@xngui/core/direction';
const direction = inject(XDirectionService);
direction.setDirection('rtl');
direction.toggle(); // → ltr
Events
Interact with the preview — events will appear here.