Skip to content

yardnsm/ink-text-animation

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ink-text-animation

Build Status

A text animation component for Ink

Install

$ npm install --save ink-text-animation

Usage

import { h, render, Text } from 'ink';
import TextAnimation from 'ink-text-animation';

render(
  <div>
    <TextAnimation>
      <Text>{`Look at me, I'm moving!`}</Text>
    </TextAnimation>
  </div>
);

API

<TextAnimation />

Accepts a string or an Ink component as children.

Props

name

Type: string
Default: rainbow
Values: rainbow pulse glitch radar neon

The name of the animation. You can find all the available animations in the chalk-animations README.

speed

Type: number
Default: 1

The speed of the animation.


License

MIT © Yarden Sod-Moriah