base-ui-svelte

Direction Provider

Set text direction (LTR / RTL) for descendants.

View as Markdown

Import from base-ui-svelte/direction-provider to provide reading direction through Svelte context (same role as Base UI’s Direction Provider).

<script lang="ts">
	import { DirectionProvider } from 'base-ui-svelte/direction-provider';
</script>

<DirectionProvider direction="rtl">
	<!-- app -->
</DirectionProvider>

Upstream: Base UI Direction Provider.