majidalaeinia / termwind

πŸƒ In short, it's like Tailwind CSS, but for the PHP command-line applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Termwind logo

Termwind

TailCli example

GitHub Workflow Status (master) Total Downloads Latest Version License


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.

Installation & Usage

Requires PHP 8.0+

Require Termwind using Composer:

composer require nunomaduro/termwind --dev

Get Started

use function Termwind\{span};

span('Hello World', 'p-2 text-color-white bg-blue')->render();

span()

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'),
);

style()

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.

About

πŸƒ In short, it's like Tailwind CSS, but for the PHP command-line applications.

License:MIT License


Languages

Language:PHP 100.0%