Direction

Switches a subtree between left-to-right and right-to-left flow.

Layout direction helper. RTL reverses visual horizontal flow while preserving logical/focus order. Text bidi is not changed.

Import

import { Direction } from "@tarve/core";

Usage

Direction.tsx
import { Button, Direction, Text } from "@tarve/core";

<Direction dir="rtl" gap={8}>
  <Text>مرحبا بالعالم</Text>
  <Button>إرسال</Button>
</Direction>

Props

PropTypeDefault
dir "ltr" | "rtl""ltr"
gap number0
orientation "horizontal" | "vertical""horizontal"

Common props

Shared by every component. See descriptions →

childrenhighlightidkeymotionFromonHighlightonPasteonTransitionEndrovingGroupstyle