Using the RTL Version on Your Site
- Upload the contents of the faizi-rtl folder to your server instead of
faizi-main.
- On every page, change the
lang attribute to your language and keep
dir="rtl" — for example <html lang="ar" dir="rtl">
(ar Arabic, he Hebrew, fa Persian, ur
Urdu).
- Replace the demo text with your own content.
- Add a font that supports your alphabet (see the next step) — the default fonts only
contain Latin letters.
- If you edit SCSS, run the Sass command from inside the faizi-rtl folder so
the RTL CSS is rebuilt (see CSS Files and Structure).
Adding an Arabic / Hebrew font
Poppins, Inter, Sequel Sans, Neue Montreal and Nohemi have no Arabic or Hebrew letters, so the
browser would fall back to a system font. Pick a font that supports your script on Google
Fonts (for example Cairo, Tajawal or Noto Kufi Arabic for Arabic,
Vazirmatn for Persian, Heebo or Rubik for Hebrew) and set it in
the font variables, exactly as described in Changing Fonts:
/* faizi-rtl/assets/scss/theme/_common.scss — top of the file */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap');
/* faizi-rtl/assets/scss/utils/_root.scss */
--font-family: "Cairo", sans-serif; /* body text */
--second-family: "Cairo", sans-serif; /* headings */
--fourth-family: "Cairo", sans-serif; /* big display headings */
i
Why does English text show a dot at the start of the line?
In the RTL demo the placeholder text is still English, so a sentence can look like
".watch your ideas". This is normal browser behaviour for Latin text inside
a right-to-left page and goes away as soon as you add your real Arabic or Hebrew
text. If you need to keep an English sentence, wrap it in
<span dir="ltr">...</span>.
Adding Your Own Content in RTL
When you add new sections, icons or animations to the RTL version, follow these four rules
and they will face the right way.
1. Arrow icons — add .pt-rtl-flip
Any SVG that points in a direction (arrows, chevrons) needs the pt-rtl-flip
class, otherwise it keeps pointing to the right. Icons that have no direction (search, close,
social icons) do not need it.
<svg class="pt-rtl-flip" width="24" height="18" viewBox="0 0 24 18" fill="none">
<path d="M0 9h22M14 1l8 8-8 8" stroke="currentColor"/>
</svg>
2. Your own CSS — use logical properties
Instead of left / right, use the "start" and "end" properties. They
follow the page direction automatically, so the same CSS works in both versions.
| Instead of |
Use |
margin-left / margin-right |
margin-inline-start / margin-inline-end |
padding-left / padding-right |
padding-inline-start / padding-inline-end |
left: 0 / right: 0 |
inset-inline-start: 0 / inset-inline-end: 0 |
text-align: left / right |
text-align: start / end |
Bootstrap ml-*, pl-*, float-left |
Bootstrap 5 ms-*, ps-*, float-start |
3. Your own GSAP animation — multiply x by dirX
dirX is 1 on LTR pages and -1 on RTL pages. Multiply any
horizontal value by it inside main.js and the animation mirrors itself.
// slides in from the right on LTR, from the left on RTL
gsap.from(".my-card", {
x: 80 * dirX,
opacity: 0,
duration: 1
});
4. Sliders
Swiper reads the page direction by itself, so the sliders in slider-active.js
already run right to left. For a new slider placed inside an element with a different
direction, add dir="rtl" to its .swiper container.