Top

RTL layout


For the RTL page, just you have to add rtl class to body tag and also add dir="rtl" attribute in your html tag

<html dir="rtl">

  <body class="rtl">

  </body>

</html> 

Rtl Button Html

<li data-attr="rtl">
  <div class="header bg-light"></div> 
  <div class="body"> 
    <ul>
      <li class="bg-light body">
        <span class="badge badge-primary"> RTL</span>
      </li>
      <li class="bg-light sidebar"></li>
    </ul>
  </div>
</li>

Javascript To Toggle rtl mode

$(".main-layout li").on("click", function () {
$(".main-layout li").removeClass("active");
$(this).addClass("active");
var layout = $(this).attr("data-attr");
if (layout != "dark-only") {
  var classToAdd = "";
  if ($("body").hasClass("dark-only")) classToAdd = "dark-only";
}
$("body").attr("class", layout);
$("html").attr("dir", layout);
$("body").addClass(classToAdd);
});

RTL layout page