Tailwind Asset For Yii3.

dev-master / 1.0.x-dev 2021-11-09 10:15 UTC



Tailwind Asset For Yii3.

Total Downloads Build Status codecov static analysis


composer require yii-extension/asset-tailwind

Using assets

Tailwind is a CSS framework that provides all the CSS to customize your application, the widgets by default do not register any Asset so you must register them in your application to be used, since you can simply use the default CSS file layout, or build your own custom CCS.

Three Assets are provided:

For more information Tailwind.

To use widgets only, register TailwindAsset::class, which we can do in several ways explained below.

Note: You need to have npm installed, this extension uses foxy to install assets.

Register asset in view layout or individual view:

By registering the Asset in the layout/main.php it will be available for all views.

If you need it registered for individual view (such as views/user/login.php) only, register it in that view.

use Yii\Extension\Asset\Tailwind\TailwindAsset;

 * @var Yiisoft\Assets\AssetManager $assetManager
 * @var Yiisoft\View\WebView $this


Unit testing

The package is tested with PHPUnit. To run tests:


Static analysis

The code is statically analyzed with Psalm. To run static analysis:



The yii-extension/asset-tailwind for Yii Packages is free software.

It is released under the terms of the BSD License. Please see LICENSE for more information.

Maintained by Yii Extension.

Support the project

Open Collective

Powered by Yii Framework

Official website