Skip to content
OTF Kit logoOTF Kit

Gradient Heading

Display

Gradient-fill heading text with multiple presets — for hero sections.

View in Storybook
Gradient Heading
Loading Storybook preview…

Installation

bun add @otfdashkit/ui

Usage

Import GradientHeading from @otfdashkit/ui.

Code
// Gradient Heading — Gradient-fill heading text with multiple presets — for hero sections.
//
// Install:
//   bun add @otfdashkit/ui

import { GradientHeading } from '@otfdashkit/ui'

export function Example() {
  return (
    <GradientHeading>
      {/* your content */}
    </GradientHeading>
  )
}

Props

Props declared in the GradientHeading source. Inherited HTML attributes are not listed.

PropTypeDefaultDescription
animatebooleanfalseWhether to animate the gradient position
as'h2' | 'h3' | 'h1' | 'h4' | 'h5' | 'h6''h2'
direction'r' | 'br' | 'b' | 'bl' | 'l''br'Direction — default 'br' (bottom-right)
fromstringTailwind gradient `from-` color class e.g. "from-indigo-400"
preset'primary' | 'slate' | 'warm' | 'cosmic' | 'terminal' | 'aurora' | 'sunset' | 'custom''primary'
tostringTailwind gradient `to-` color class e.g. "to-violet-400"
viastringTailwind gradient `via-` color class (optional)

Related