Ink Gradient Documentation
Installation#
npm install ink-gradientUsage#
To use Ink Gradient in your terminal application, you can import it and apply it to your text as follows:
import gradient from 'ink-gradient';
import { Text } from 'ink';
const MyComponent = () => (
<Text>
<gradient>Beautiful Gradient Text</gradient>
</Text>
);API#
Functions#
gradient(colors: string | string[], options?: object): ReactNode#
- colors: A string or an array of strings representing the colors for the gradient.
- options: An optional object to customize the gradient behavior.
Example:
<gradient colors={['#FF5733', '#33FF57', '#3357FF']}>
Custom Gradient Text
</gradient>Options#
- type: (string) The type of gradient. Options include
linearandradial. Default islinear. - angle: (number) The angle of the gradient in degrees. Default is
0.
Contributing#
To contribute to the Ink Gradient project, follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Make your changes and commit them (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/YourFeature). - Open a pull request.
License#
This project is licensed under the MIT License. See the LICENSE file for details.