UI Components
GradientText
Render text with a customizable CSS gradient fill using background-clip.
Quick Preview
Build beautiful interfaces
Installation
// Copy fromsrc/components/ui/GradientText.tsx
Examples
Different gradients
Orange to Red
Purple to Pink
Teal to Blue
As heading element
Hero Heading
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children* | React.ReactNode | - | Text content |
from | string | '#F45A5A' | Gradient start color |
to | string | '#3b82f6' | Gradient end color |
via | string | - | Optional mid-stop color |
direction | GradientDirection | 'to-r' | Gradient direction (e.g. to-r, to-br) |
as | React.ElementType | 'span' | HTML element to render as |
className | string | - | Additional CSS classes |