🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

ink-gradient

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ink-gradient

Gradient color component for Ink

latest
Source
npmnpm
Version
4.0.1
Version published
Weekly downloads
89K
-0.11%
Maintainers
1
Weekly downloads
 
Created
Source

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

children

The content to colorize.

Multiple <Text> children are treated as separate nodes, which preserves layout when <Gradient> is placed inside a <Box flexDirection="column">.

If you want a continuous gradient across multiple lines, pass a single string or a single <Text> with \n.

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.

  • ink-big-text - Awesome text component for Ink
  • ink-link - Link component for Ink

Keywords

ink-component

FAQs

Package last updated on 29 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts