Skip to content

Text Sparkles

Free

Small stars twinkle around a word or a phrase, above and below it, to draw the eye to it.

  • React 19
  • Tailwind CSS 4

Added Nov 14, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Wrap one key word or a plan name. Keep the rest of the text plain.

The sample also uses Badge and Button. One command adds them with this item:

pro-plan-card.tsx

TextSparkles

<span>
PropTypeDefaultDescription
childrenRequiredReactNode—The word or phrase to light up.
pausedboolean—The pause of the user or the page (controlled).
defaultPausedboolean—The first pause when paused is not given (uncontrolled). Default false.
onPausedChange—Called when the pause changes.
pauseOnHoverboolean—Hold the motion while a mouse is over the item, or keyboard focus is on the link or button around it (or in it). Default true.
countnumberSPARKLES_COUNT.defaultHow many sparkles. Default 6, at most 12.
colorstring—One color for every star (a data color, such as a brand color). Default: the two item colors, every other star.
seednumber—The seed of the spots, sizes, and pace. Default: from the text, so each text has its own.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.
  • Wrap one key word in a heading, and keep the rest of the heading plain.
  • Use count (default 6, at most 12) for fewer or more stars; use fewer on small text.
  • Use color for one data color on every star, such as a brand color. The default uses two item colors.
  • Use paused to hold the stars from a control of the page.
  • For a sparkle icon on a Generate or an AI button, use Animated Sparkles Icon.
  • For a light that sweeps across a status line, use Text Shimmer Wave.
  • For a long paragraph, or many words on one page, use plain text: many stars read as noise.
TabKeyboard focus on the link or button around the text holds the stars while pauseOnHover is true.
Twinkle
sine · 1.2s to 2s loop · ease (0.45, 0, 0.55, 1) · a star grows from 0, turns a quarter, and shrinks back to 0
Hop
instant · at the end of each twinkle, while the star is at size 0, it moves to its next of three seeded spots
  1. AddedText Sparkles.
Open the release