smnandre/symfony-tui-transitions

Cinematic transitions between screens or individual widgets for Symfony TUI

Maintainers

Package info

github.com/smnandre/symfony-tui-transitions

pkg:composer/smnandre/symfony-tui-transitions

Transparency log

Fund package maintenance!

smnandre

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.9.0 2026-08-20 20:58 UTC

This package is auto-updated.

Last update: 2026-08-20 21:04:23 UTC


README

Cinematic transitions between screens and individual widgets for Symfony TUI.

Six Symfony TUI transitions

The package provides a TransitionWidget and six transition strategies. It animates a full screen or one panel without changing Symfony TUI internals.

Installation

composer require smnandre/symfony-tui-transitions

Requirements:

  • PHP 8.4.1 or later
  • Symfony TUI 8.2 or later

Usage

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

Once attached to a running TUI, the widget schedules its own ticks. Calling start() again begins another transition. Use $stage->getTo() as the next source widget when you want to preserve its state.

Included transitions

Preview Transition Description Directions
Slide transition Slide Pushes one screen into the next. Left, right, top, bottom
Wipe transition Wipe Reveals the next screen from one edge. Left, right, top, bottom
Slice transition Slice Alternates the reveal across strips. Left, right, top, bottom
Shutters transition Shutters Opens the next screen through slats. Left, right, top, bottom
Diamond transition Diamond Reveals the next screen as a diamond. Inward, outward
Spiral transition Spiral Reveals blocks along a spiral path. Inward, outward

See the transition reference for animated examples, directions, sizing and easing.

Documentation

Development

composer install
composer qa

composer qa runs PHP CS Fixer in check mode, PHPStan and PHPUnit.

License

Symfony TUI Transitions is released by Simon André under the MIT License.