Skip to content
synccn

Gradient Text

New

Text filled with a slowly moving gradient.

Build something beautiful

Installation

$ pnpm dlx shadcn@latest add @synccn/gradient-text

First time in this project? Connect synccn with one command.

Usage

import { GradientText } from "@/components/ui/aurora";<GradientText>beautiful</GradientText>

API reference

Generated from the component's TypeScript types, so it always matches the code.

GradientText

Text filled with a slowly moving gradient.

  • colors
    string[]

    Default ["oklch(0.75 0.15 250)", "oklch(0.75 0.18 320)", "oklch(0.82 0.14 60)", "oklch(0.75 0.15 250)"]

    Gradient stops. Repeat the first colour at the end for a seamless loop.

  • duration
    number

    Default 6

    Seconds for one full cycle.

  • children
    React.ReactNode

    Content to render.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA attributes: aria-label, aria-pressed
  • Respects the reduced motion setting
  • Shows a visible focus ring for keyboard users