Skip to content
Gradient color component for Ink
Branch: master
Clone or download
Latest commit f982cd0 Mar 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes Meta tweaks May 16, 2018
.gitignore
.npmrc Init Apr 2, 2018
.travis.yml
index.js Require Node.js 8 Mar 7, 2019
license
package.json 1.0.0 Mar 7, 2019
readme.md Require Node.js 8 Mar 7, 2019
screenshot.png
test.js Migrate to Ink 2 (#2) Mar 7, 2019
test.js.md
test.js.snap Migrate to Ink 2 (#2) Mar 7, 2019

readme.md

ink-gradient Build Status

Gradient color component for Ink

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

License

MIT © Sindre Sorhus

You can’t perform that action at this time.