Right-to-left direction support of PrimeReact.
The PrimeReact components natively support Right-to-Left (RTL) text direction through a modern CSS implementation utilizing FlexBox and classes like *-inline-start
and *-block-end
. Consequently, no JavaScript configuration is necessary; setting the document's text direction to RTL is sufficient to enable this feature.
The RTL setting can either be set using the dir
attribute or with the direction
style property.
<html dir="rtl"></html>
html {
direction: rtl;
}
RTL is widely supported by the UI suite except the Galleria and Carousel components. These components will be enhanced with a modern implementation in upcoming versions with built-in support for RTL.