Native Solid 2 fork. Original documentation and designs © WorkOS; historical posts retain their original context.

Direction Provider

Wraps your app to provide global reading direction.

Features

  • Enables all primitives to inherit global reading direction.

Anatomy

Import the component.

import { Direction } from "@radix-solid/primitives";
export default () => <Direction.Provider dir="rtl" />;

API Reference

Provider

When creating localized apps that require right-to-left (RTL) reading direction, you need to wrap your application with the Direction.Provider component to ensure all of the primitives adjust their behavior based on the dir prop.

PropTypeDefault
direnum—

Example

Use the direction provider.

import { Direction } from "@radix-solid/primitives";
export default () => <Direction.Provider dir="rtl">{/* your app */}</Direction.Provider>;