Gradient
display
Gradient: text rendered with a smooth color gradient
Terminal
$termuijs render gradient
Installation
$ bunx termuijs add gradient
Copies the source into src/components/gradient/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { Gradient } from '@termuijs/widgets'ts
new Gradient(text: string, style: Partial<Style> = {}, opts: GradientOptions = {})API Reference
Gradient
| Prop | Type | Required | Description |
|---|---|---|---|
text | string | required | — |
startColor | string | optional | Start color (hex string like '#ff0000' or named color string) |
endColor | string | optional | End color (hex string like '#0000ff' or named color string) |
align | 'left' | 'center' | 'right' | optional | Text alignment |