3.0.0 • Published 11 months ago

ink-gradient v3.0.0

Weekly downloads
1,927
License
MIT
Repository
github
Last release
11 months ago

ink-gradient

Gradient color component for Ink

npm.io

Install

npm install ink-gradient

Usage

import React from 'react';
import {render} from 'ink';
import Gradient from 'ink-gradient';
import BigText from 'ink-big-text';

render(
	<Gradient name="rainbow">
		<BigText text="unicorns"/>
	</Gradient>
);

API

<Gradient>

It accepts a string or Ink component as children. For example, <Box/>.

Props

name

Type: string

The name of a built-in gradient.

Mutually exclusive with colors.

colors

Type: string[] | object[]

Colors to use to make the gradient.

Mutually exclusive with name.

Related

3.0.0

11 months ago

2.0.0

4 years ago

1.0.0

5 years ago

0.1.1

6 years ago

0.1.0

6 years ago