Socket
Book a DemoInstallSign in
Socket

ink-gradient

Package Overview
Dependencies
Maintainers
1
Versions
5
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
3.0.0
Version published
Weekly downloads
502K
146.9%
Maintainers
1
Weekly downloads
 
Created

What is ink-gradient?

The ink-gradient package is used to apply gradient colors to text in Ink applications, which are React-based CLI applications. It allows developers to enhance the visual appeal of their command-line interfaces by adding colorful gradients to text output.

What are ink-gradient's main functionalities?

Basic Gradient Application

This feature allows you to apply a basic gradient to text. In this example, the 'rainbow' gradient is applied to the text 'Hello, world!' using the Ink framework.

const Gradient = require('ink-gradient');
const { h, render } = require('ink');

const App = () => (
  <Gradient name="rainbow">
    Hello, world!
  </Gradient>
);

render(<App />);

Custom Gradient Colors

This feature allows you to define custom colors for the gradient. In this example, a gradient is created using red, green, and blue colors for the text 'Custom Gradient!'.

const Gradient = require('ink-gradient');
const { h, render } = require('ink');

const App = () => (
  <Gradient colors={['#FF0000', '#00FF00', '#0000FF']}>
    Custom Gradient!
  </Gradient>
);

render(<App />);

Other packages similar to ink-gradient

Keywords

ink-component

FAQs

Package last updated on 10 Jun 2023

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