PHPackages                             aslani/yii2-bootstrap5-rtl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. aslani/yii2-bootstrap5-rtl

ActiveYii2-extension

aslani/yii2-bootstrap5-rtl
==========================

Twitter Bootstrap 5 RTL extension for the Yii 2.0 framework

v1.0.2(1y ago)018BSD-3-ClausePHP

Since May 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mehdi-aslani/yii2-bootstrap5-rtl)[ Packagist](https://packagist.org/packages/aslani/yii2-bootstrap5-rtl)[ RSS](/packages/aslani-yii2-bootstrap5-rtl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Yii2 Bootstrap 5 RTL Extension
==============================

[](#yii2-bootstrap-5-rtl-extension)

This is a Yii2 AssetBundle that replaces the default Bootstrap 5 CSS file with its **Right-to-Left (RTL)** version.

It is useful for web applications that use **RTL languages** such as Persian, Arabic, Hebrew, etc.

📦 Installation
--------------

[](#-installation)

The preferred way to install this extension is through [Composer](https://getcomposer.org/).

Run the following command:

```
composer require aslani/yii2-bootstrap5-rtl
```

Or add this line to the `require` section of your `composer.json` file:

```
"aslani/yii2-bootstrap5-rtl": "*"
```

Then run:

```
composer update
```

> ⚠️ Make sure you have installed `bower-asset/bootstrap` via Composer. This package relies on that to load the RTL CSS file.

---

⚙️ Usage
--------

[](#️-usage)

In order to use the RTL version of Bootstrap in your Yii2 application, you just need to replace the default `BootstrapAsset` with `BootstrapRtlAsset` in your `AppAsset` (or any other AssetBundle).

### Example:

[](#example)

```
namespace app\assets;

use yii\web\AssetBundle;

class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';

    public $css = [
        'css/site.css',
    ];

    public $js = [];

    public $depends = [
        'yii\web\YiiAsset',
        //'yii\bootstrap\BootstrapAsset', // Remove or comment this line
        'aslani\bootstrap5\BootstrapRtlAsset', // Use this instead
    ];
}
```

This will make sure the following file is loaded instead of the default Bootstrap CSS:

```
vendor/bower-asset/bootstrap/dist/css/bootstrap.rtl.min.css

```

---

🛠️ AssetBundle Details
----------------------

[](#️-assetbundle-details)

The class provided by this package:

```
aslani\bootstrap5\BootstrapRtlAsset
```

Loads the following CSS file:

```
@bower/bootstrap/dist/css/bootstrap.rtl.min.css

```

If you are using an alternative path or a custom version of Bootstrap RTL, you can override the `$sourcePath` or `$css` property accordingly.

---

💡 Tips
------

[](#-tips)

- You may need to manually include an RTL-compatible version of Bootstrap 5 if it’s not available by default in your `bower-asset/bootstrap` package.
- If you see an error related to `@bower` alias, add this in your Yii2 config or bootstrap file:

```
Yii::setAlias('@bower', dirname(__DIR__) . '/vendor/bower-asset');
```

---

🪪 License
---------

[](#-license)

This project is released under the BSD-3-Clause License.
See the [LICENSE](LICENSE) file for details.

---

🙋 Support
---------

[](#-support)

- GitHub:
- Issues: [Submit Bug Reports](https://github.com/mehdi-aslani/yii2-bootstrap5-rtl/issues)

---

🧑 Author
--------

[](#-author)

**Mehdi Aslani**
📧 Email:
📦 Packagist: [aslani/yii2-bootstrap5-rtl](https://packagist.org/packages/aslani/yii2-bootstrap5-rtl)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance50

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

365d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d90a4d6148df931fd6d2701b4c17dfb1540db9f8fbabadf7ff3bb9a4e9017246?d=identicon)[Mehdi Aslani](/maintainers/Mehdi%20Aslani)

---

Top Contributors

[![mehdi-aslani](https://avatars.githubusercontent.com/u/27947702?v=4)](https://github.com/mehdi-aslani "mehdi-aslani (21 commits)")

---

Tags

yii2bootstrapbootstrap5rtlasset bundle

### Embed Badge

![Health badge](/badges/aslani-yii2-bootstrap5-rtl/health.svg)

```
[![Health](https://phpackages.com/badges/aslani-yii2-bootstrap5-rtl/health.svg)](https://phpackages.com/packages/aslani-yii2-bootstrap5-rtl)
```

###  Alternatives

[yiisoft/yii2-bootstrap

The Twitter Bootstrap extension for the Yii framework

19819.6M1.0k](/packages/yiisoft-yii2-bootstrap)[yiisoft/yii2-bootstrap5

The Twitter Bootstrap v5 extension for the Yii framework

661.4M121](/packages/yiisoft-yii2-bootstrap5)[deyraka/yii2-material-dashboard

Material Dashboard Theme for Yii 2.0

121.9k](/packages/deyraka-yii2-material-dashboard)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
