Skip to content

Instantly share code, notes, and snippets.

@atakde
Created March 2, 2024 22:28
Show Gist options
  • Save atakde/86e5c41366cdc6e8283792fe0f77d3b9 to your computer and use it in GitHub Desktop.
Save atakde/86e5c41366cdc6e8283792fe0f77d3b9 to your computer and use it in GitHub Desktop.
Termwind php example
<?php
require 'vendor/autoload.php';
use function Termwind\{render};
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);
render(<<<HTML
<span class="mt-1 ml-2 mr-1 bg-green px-1 text-black">
Hello, $answer!
</span>
HTML);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment