Termwind allows you to build unique and beautiful PHP command-line applications, using the Tailwind CSS API. In short, it's like Tailwind CSS, but for the PHP command-line applications.
Requires PHP 8.0+
Require Termwind using Composer:
composer require nunomaduro/termwinduse function Termwind\{render};
// single line html
render('<div class="p-2 text-color-white bg-blue">Hello World</div>');
// multi-line html
render(<<<'HTML'
<div class="p-2 text-color-white bg-blue">
<a class="ml-2">foo</a>
<a class="ml-2" href="https://nunomaduro.com">nunomaduro.com</a>
</div>
HTML);
// Symfony / Laravel console commands
use function Termwind\{render};
class UsersAllCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'users:all';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
render(
view('users.index', [
'users' => User::all()
])
);
}
}The style() function may be used to add own custom syles.
use function Termwind\{style, span};
style('btn')->apply('p-4 bg-blue text-color-white');
render('<div class="btn">Click me </div>');Termwind is an open-sourced software licensed under the MIT license.

