# Shiny progress bar

> A thin progress bar with a streak of light running over the filled part, so it looks alive even when paused.

- Category: [Loaders](https://library.aimran.es/components/loaders)
- Built with: React + Motion
- Live editor: https://library.aimran.es/blocks/shine-progress
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Real progress rarely moves at a steady pace, and this bar deals with that nicely: the shine keeps running while the fill waits. Use it for a file export in a design tool, the download page of a desktop app or the step indicator of a multi-step checkout. It’s a progress bar with animation that stays understated.

Set the shine slower than you think; a quick flash every second looks nervous. On strong colors the streak shows best with a mid-tone. If your progress jumps in big steps, the spring on the width softens each jump.

## Code

### React (Motion)

```tsx
import { motion } from "framer-motion";

interface ShineProgressProps {
  color?: string;
  /** Progreso de 0 a 100. */
  progress?: number;
  /** Segundos que tarda el reflejo en cruzar. */
  speed?: number;
}

export default function ShineProgress({
  color = "#0071e3",
  progress = 68,
  speed = 1.5,
}: ShineProgressProps) {
  return (
    <div
      role="progressbar"
      aria-valuenow={progress}
      aria-valuemin={0}
      aria-valuemax={100}
      className="h-1.5 w-64 overflow-hidden rounded-full bg-black/5 dark:bg-white/10"
    >
      <motion.div
        className="relative h-full rounded-full"
        style={{ width: `${progress}%`, backgroundColor: color }}
        animate={{ width: `${progress}%` }}
        transition={{ type: "spring", stiffness: 300, damping: 30 }}
      >
        <motion.span
          className="absolute inset-y-0 w-16 bg-gradient-to-r from-transparent via-white/50 to-transparent"
          animate={{ x: [-70, 260] }}
          transition={{ duration: speed, repeat: Infinity, ease: "linear" }}
        />
      </motion.div>
    </div>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “Shiny progress bar” block (Loaders) from AIMRAN Library to my project.

## What it is
A thin progress bar with a streak of light running over the filled part, so it looks alive even when paused.

## Chosen settings
- Color: #0071e3
- Progress: 68% (from 10 to 100%)
- Speed: 1.5s (from 0.6 to 3s)

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with React + TypeScript, with framer-motion for the animation and lucide-react for the icons. If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
import { motion } from "framer-motion";

interface ShineProgressProps {
  color?: string;
  /** Progreso de 0 a 100. */
  progress?: number;
  /** Segundos que tarda el reflejo en cruzar. */
  speed?: number;
}

export default function ShineProgress({
  color = "#0071e3",
  progress = 68,
  speed = 1.5,
}: ShineProgressProps) {
  return (
    <div
      role="progressbar"
      aria-valuenow={progress}
      aria-valuemin={0}
      aria-valuemax={100}
      className="h-1.5 w-64 overflow-hidden rounded-full bg-black/5 dark:bg-white/10"
    >
      <motion.div
        className="relative h-full rounded-full"
        style={{ width: `${progress}%`, backgroundColor: color }}
        animate={{ width: `${progress}%` }}
        transition={{ type: "spring", stiffness: 300, damping: 30 }}
      >
        <motion.span
          className="absolute inset-y-0 w-16 bg-gradient-to-r from-transparent via-white/50 to-transparent"
          animate={{ x: [-70, 260] }}
          transition={{ duration: speed, repeat: Infinity, ease: "linear" }}
        />
      </motion.div>
    </div>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
