Build something beautiful
Installation
$ pnpm dlx shadcn@latest add @synccn/gradient-textFirst 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.
PropTypeDescription
- 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
numberDefault
6Seconds for one full cycle.
- children
React.ReactNodeContent to render.
- className
stringExtra 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
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
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
More motion
MarqueeEndless scrolling row or column that pauses on hover.Number TickerCounts up to a number when it scrolls into view.TypewriterTypes and deletes a list of phrases.Shimmer TextA light sweep across text for loading moments.Word RotateCycles words with a vertical slide.Text ScrambleCharacters scramble and resolve left to right.