Awesome Open Source
Awesome Open Source

ink-gradient

Gradient color component for Ink

Looking for a version compatible with Ink 2.x? Check out this release.

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, ink-box.

Props

name

Type: string

Name of a built-in gradient.

colors

Type: string[] | object[]

Colors to use to make the gradient.

Related


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (68,711
react (5,295
nodejs (3,696
cli (1,735
npm-package (257
jsx (154
colors (87
gradients (20

Find Open Source By Browsing 7,000 Topics Across 59 Categories