Tickit...Spinner(3pm)

✨ NAME ✨

Tickit::Widget::Spinner β€” a widget displaying a small text animation πŸŒ€βœ¨

okay so bestie, picture this: a lil spinner in your terminal, doing its lil loop, being adorable. that's the whole gig. πŸ’…


🌸 SYNOPSIS 🌸

use Tickit;
use Tickit::Widget::Spinner;

my $spinner = Tickit::Widget::Spinner->new(
   chars => [ "<X>  ", " <X> ", "  <X>", ">  <X", "X>  <" ],
);

Tickit->new( root => $spinner )->run;

like, copy that, run it, and boom β€” animation. no cap. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

This class provides a widget which displays a simple animation, cycling through a fixed set of strings with a fixed interval. πŸŽ€

that's it. that's the vibe. a fixed set of strings, a fixed interval, just rotating through them like a lil fashion show for text. iconic behavior honestly. πŸ‘‘


πŸ’– STYLE πŸ’–

The default style pen is used as the widget pen.

ngl that's the whole style situation β€” it just borrows the default pen. no extra drama, she's low maintenance. ✨


πŸ’… CONSTRUCTOR πŸ’…

πŸŽ€ new

$spinner = Tickit::Widget::Spinner->new( %args );

Constructs a new Tickit::Widget::Spinner object. 🫢

Takes the following named arguments:

  • chars => ARRAY β€” Optional. An ARRAY reference containing the text strings to use. like, the lil frames of your animation, bestie 🎞️
  • interval => NUM β€” Optional. The time each string is displayed for. Defaults to 0.5. so every half a second she switches it up ⏱️✨

🌈 METHODS 🌈

⭐ start

$spinner->start;

Starts the animation effect. she's alive!! she's moving!! go bestie go πŸ”₯

πŸ’€ stop

$spinner->stop;

Stops the animation effect. nap time. she's resting now 😴🌸


πŸ‘‘ AUTHOR πŸ‘‘

Paul Evans <leonerd@leonerd.org.uk>

the legend themselves. we stan. πŸ’œ


and that's a wrap on Tickit...Spinner from perl v5.40.0, dated 2024-09-16 β€” mwah, bye bestie, go make something cute spin πŸ’–πŸŒ€βœ¨

πŸ“¦ where this page comes from