React component that renders an ANSI animation into a <canvas>
. It's useful in situations where
arbituary scaling is desired.
return (
<div>
<AnsiCanvas src="./ansi/hello-world.ans" modemSpeed={2400} />
</div>
);
<AnsiCanvas>
has the same props as <AnsiText>
, except the default value for className
is "AnsiCanvas"
.
You can change the appearance of text in the canvas by defining a CSS rule for the class "AnsiCanvas". The component will update itself to reflect subsequent style change when there is a change in its size.