The idea
Add rtl to any element and everything inside it flips: text direction, floats, spacing utilities, dropdown alignment, border radii and grid offsets. The two panes below share identical markup — only the wrapper differs.
Shipping address
- Standard 3d
- Express 1d
Shipping address
- Standard 3d
- Express 1d
Load the RTL build once, then flip whatever you need:
<link rel="stylesheet" href="dist/css/bootstrap-rtl.min.css">
<!-- whole page -->
<body class="rtl"> ... </body>
<!-- or a single region -->
<div class="rtl"> ... </div>
<!-- the dir attribute works too -->
<div dir="rtl"> ... </div>
Buttons
Button groups keep their rounded corners on the correct outer edges in both directions.
Typography
Headings, lists and blockquotes align to the reading side automatically.
Heading 1
Heading 3
Heading 5
A lead paragraph stands out from the rest of the copy.
Regular body text with a link, some bold text and inline code.
Muted small print.
- Unordered item
- Another item
- First step
- Second step
Design is not just what it looks like. Design is how it works.
Tables
Column order follows the direction — the first column starts on the reading side.
| # | Name | Role | Amount |
|---|---|---|---|
| 1 | Sara Ahmadi | Designer | 1,250 |
| 2 | Reza Karimi | Developer | 980 |
| 3 | Mina Rad | Product manager | 2,410 |
| Plan | Seats | Status |
|---|---|---|
| Starter | 3 | Active |
| Team | 12 | Trial |
Forms
Labels, checkboxes, switches, select arrows, input group add-ons and validation feedback all move to the correct side.
Alerts & badges
Dismiss buttons jump to the opposite corner, and toast headers reorder.
Heads up
Alerts can hold headings, paragraphs and dividers.
Primary Success Danger 42 New
Progress & spinners
Progress bars fill from the reading side.
Cards & lists
Card decks, list groups and media objects reverse their internal order.
Coloured card
Background utilities work in both directions.
- An item
- A second item
Dropdowns & overlays
Dropdown menus anchor to the correct edge, and modal footers reverse their button order.
Carousel & collapse
Carousel controls swap places; accordion headers align to the reading side.
Utilities that flip
Spacing, text alignment and grid offsets are rewritten inside rtl. Flip the direction switch and watch these boxes move.
ml-5 pushedmr-5text-righttext-lefttext-center- float-left and float-right are not mirrored — they stay physical. Use them when you truly mean a fixed side.
- Code samples should keep direction: ltr so snippets stay readable inside a flipped page.
- dir="rtl" is styled identically to the rtl class, so either hook works.