Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 20, 2024 via composer

nunomaduro/termwind v1.6.1

Its like Tailwind CSS, but for the console.
Package summary
Share
0
issues
1
license
10
MIT
Package created
30 Sep 2021
Version published
17 Mar 2022
Maintainers
1
Total deps
10
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
10 Packages, Including:
nunomaduro/termwind@v1.6.1
psr/container@2.0.2
symfony/console@v6.4.7
symfony/deprecation-contracts@v3.5.0
symfony/polyfill-ctype@v1.29.0
symfony/polyfill-intl-grapheme@v1.29.0
symfony/polyfill-intl-normalizer@v1.29.0
symfony/polyfill-mbstring@v1.29.0
symfony/service-contracts@v3.5.0
symfony/string@v7.0.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of nunomaduro/termwind 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
symfony/consolev6.4.7-MIT
prod

Visualizations

Frequently Asked Questions

What does nunomaduro/termwind do?

Termwind, created by nunomaduro, is a unique tool that helps developers build distinctive PHP command-line applications. It borrows from the Tailwind CSS API, bringing into play the aesthetics and usability known in website design to the console. In essence, Termwind is like having Tailwind CSS but in your PHP console applications - think of it as styling for your console commands.

How do you use nunomaduro/termwind?

Implementing Termwind in your project is easy and straightforward. First, you need to install the package using Composer with the following command:

composer require nunomaduro/termwind

Please note that Termwind requires PHP 8.0 or higher. Once installed, you can use Termwind by rendering HTML strings in your PHP files:

use function Termwind\{render};

// Rendering a simple single line
render('<div class="px-1 bg-green-300">Termwind</div>');

// Rendering multi-line HTML
render(<<<'HTML'
    <div>
        <div class="px-1 bg-green-600">Termwind</div>
        <em class="ml-1">
          Give your CLI apps a unique look
        </em>
    </div>
HTML);

One of the powerful features of Termwind is its compatibility with typical PHP frameworks like Laravel or Symfony:

class UsersCommand extends Command
{
    public function handle()
    {
        render(
            view('users.index', [
                'users' => User::all()
            ])
        );
    }
}

You're also allowed to prompt users with the help of the ask() function:

use function Termwind\{ask};

$answer = ask(<<<HTML
    <span class="mt-1 ml-2 mr-1 bg-green px-1 text-black">
        What is your name?
    </span>
HTML);

Where are the nunomaduro/termwind docs?

For more usage examples, functions, and supported HTML elements, please visit the official repository of nunomaduro/termwind on GitHub. All the classes supported follow the same logic that is available on the Tailwind CSS documentation. Furthermore, Termwind also supports Responsive Design just like Tailwind CSS. You can find all of this information and more in the comprehensive guide that has been made available in the repository's README file, accessible via the following URL: https://github.com/nunomaduro/termwind.