Jumbo React
Jumbo 6.x
Jumbo 6.x
  • Overview
  • Package Content
  • Installation and Setup
    • Environment Setup
    • Project Setup
  • Structure
    • Folder Structure
  • Layouts
    • Understanding Layouts
    • Pre-built Layouts
    • Create Custom Layout
  • Content Layout
    • Understanding Content Layout
  • Routes
    • Understanding Routes
    • Setup a New Route
    • Route Middleware
    • Create Route Middleware
  • Style Customization
    • Understanding Theme
    • Customize Theme
    • Dark Theme
    • Font Changes
  • How To
    • Apply RTL as default
    • Set RTL direction dynamically
    • Make sidebar menus dynamic
  • Auth Implementation
    • Auth Setting
    • Implement Login Form
Powered by GitBook
On this page
  1. How To

Set RTL direction dynamically

To switch the direction dynamically, you just need to apply the code as mentioned below:

const {setTheme} = useJumboTheme();
setTheme({direction: "rtl"});
document.querySelector("body")
        .setAttribute("dir", "rtl")
PreviousApply RTL as defaultNextMake sidebar menus dynamic

Last updated 2 years ago