PHP code example of smnandre / symfony-tui-transitions

1. Go to this page and download the library: Download smnandre/symfony-tui-transitions library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

smnandre / symfony-tui-transitions example snippets


use SimonAndre\Tui\Transitions\Direction\HorizontalDirection;
use SimonAndre\Tui\Transitions\SlideTransition;
use SimonAndre\Tui\Transitions\TransitionWidget;
use Symfony\Component\Tui\Widget\TextWidget;

$stage = new TransitionWidget();
$stage->expandVertically(true);

$tui->add($stage);

$stage->start(
    new TextWidget('Current screen'),
    new TextWidget('Next screen'),
    new SlideTransition(HorizontalDirection::Left),
    duration: 0.5,
);