Termwind allows you to build unique and beautiful PHP command-span applications, using the Tailwind CSS API. In short, it's like Tailwind CSS, but for the PHP command-span applications.
Requires PHP 8.0+
Require Termwind using Composer:
composer require nunomaduro/termwind --dev
use function Termwind\{span};
span('Hello World', 'p-2 text-color-white bg-blue')->render();
The span()
function may be used to render an inline container used to mark up a part of a text.
use function Termwind\{render, span};
span('Hello World', 'p-2 text-color-white bg-blue')->render();
render(
span('Hello', 'p-2 text-color-white bg-blue'),
span('World', 'p-2 text-color-white bg-blue'),
);
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');
span('Click me', 'btn')->render();
Termwind is an open-sourced software licensed under the MIT license.