ink-gradient
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/ink-gradient package

3.0.0 • Public • Published

ink-gradient

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, <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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    6,579
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.0
    6,579
  • 2.0.0
    5,370
  • 1.0.0
    1,848
  • 0.1.1
    3
  • 0.1.0
    0

Package Sidebar

Install

npm i ink-gradient

Weekly Downloads

12,062

Version

3.0.0

License

MIT

Unpacked Size

6.52 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus