Skip to content

Commit 3f9b3d1

Browse files
authored
[docs] Provide an alternative to right-to-left (mui#25584)
1 parent e157cb4 commit 3f9b3d1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/src/pages/guides/right-to-left/right-to-left.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ Make sure the `dir` attribute is set on the body, otherwise native components wi
1212
<body dir="rtl"></body>
1313
```
1414

15+
As an alternative to the above, you can also wrap your application in an element with the `dir` attribute:
16+
17+
```jsx
18+
function App() {
19+
return (
20+
<div dir="rtl">
21+
<MyComponent />
22+
</div>
23+
);
24+
}
25+
```
26+
27+
This can be helpful for creating components to toggle language settings in the live application.
28+
1529
### 2. Theme
1630

1731
Set the direction in your custom theme:

0 commit comments

Comments
 (0)