Runtime configuration
Locale, reading direction, color mode, and motion preference belong to the application root. A3S UI does not require a framework provider or duplicate these values in component state; native HTML, React, and Vue all observe the same DOM contract.
Locale and direction
lang selects the document language and dir controls bidirectional layout. Translation resources, number and date formatting, and route selection remain host-owned. Components use logical CSS properties and do not infer translated copy.
Set both values when switching locale. Arabic, Persian, Hebrew, Pashto, and Urdu default to RTL when the direction argument is omitted; an explicit direction always wins.
Theme
data-theme stores the preference: light, dark, or system. The resolved dark appearance is represented by the dark class, which keeps CSS usable without a framework runtime. The host may persist the preference, but it should apply the class before first paint to avoid a flash.
Motion
Motion remains a user preference, not an application toggle. Components respond to prefers-reduced-motion: reduce; loading, streaming, and progress keep readable static state when travel or looping animation is removed.
React hooks
The hooks observe external changes on document.documentElement, emit a3s:locale-change or a3s:theme-change after their own setters run, and clean up media-query and mutation listeners on unmount.
Vue composables
Vue exposes readonly refs and the same setters and DOM events as React. Neither adapter owns translations, persistence, authorization, or server negotiation.
Server rendering
Render the correct lang and dir on the server. Apply the stored or system color preference in a small pre-paint script, then let either framework observe that root. Do not render one locale and repair it after hydration; that changes reading order, accessible names, and layout after users begin interacting.
