Shimmer
Text with light sweeping across it while the agent works.
Partly measured from the Stripe Dashboard assistant's progress rows. The gradient, 200% background, 4s linear sweep and 14px text were compared against "Searching documentation...". No fidelity reference has been saved yet.
Thinking
import { Shimmer } from "@replicas/ui";
export default function ShimmerDemo() {
return <Shimmer>Thinking</Shimmer>;
}Prompt
Copy Prompt hands your agent everything it needs to build the Shimmer in the Stripe style: the measured tokens, the CSS and the structure.
Show Prompt
# Stripe Shimmer
Text with light sweeping across it while the agent works.
Build a Shimmer in this project that looks and behaves like Stripe's. Measured from the running Stripe app (dashboard.stripe.com). Keep every value exact. Map the tokens onto the project's own theme variables instead of hard-coding them. Use the project's own component library for behaviour, or Base UI primitives if it has none.
Fidelity: Partly measured from the Stripe Dashboard assistant's progress rows. The gradient, 200% background, 4s linear sweep and 14px text were compared against "Searching documentation...". No fidelity reference has been saved yet.
## Tokens
| Token | Light | Dark |
| --- | --- | --- |
| `--color-text-subdued` | `#3c4f69` | `#a9b2c2` |
| `--font-label-medium` | `14px` | `14px` |
| `--line-height-medium` | `20px` | `20px` |
| `--gradient-assistant-shimmer` | `linear-gradient(90deg, var(--color-neutral-200), var(--color-neutral-400), var(--color-text-subdued), var(--color-text), var(--color-neutral-200))` | `linear-gradient(90deg, var(--color-neutral-200), var(--color-neutral-400), var(--color-text-subdued), var(--color-text), var(--color-neutral-200))` |
| `--duration-assistant-shimmer` | `4s` | `4s` |
## CSS
Scoped under `[data-style="stripe"]`; dark rules sit under `[data-theme="dark"]`. The `ui-*` classes and data attributes match the structure below.
```css
@keyframes stripe-shimmer-sweep {
from {
background-position: 200% 0;
}
to {
background-position: -200% 0;
}
}
[data-style="stripe"] {
.ui-shimmer {
display: inline-block;
background-image: var(--gradient-assistant-shimmer);
background-size: 200% auto;
background-clip: text;
color: transparent;
font-size: var(--font-label-medium);
line-height: var(--line-height-medium);
-webkit-text-fill-color: transparent;
animation: stripe-shimmer-sweep var(--duration-assistant-shimmer) linear infinite;
}
@media (prefers-reduced-motion: reduce) {
.ui-shimmer {
background-image: none;
color: var(--color-text-subdued);
-webkit-text-fill-color: currentColor;
animation: none;
}
}
}
```
## Structure
How Replicas assembles it on Base UI.
```tsx
import type { ComponentProps, ElementType } from "react";
import { join } from "./utils";
export type ShimmerProps = ComponentProps<"span"> & {
as?: ElementType;
};
export function Shimmer({ as: Component = "span", className, ...props }: ShimmerProps) {
return <Component className={join("ui-shimmer", className)} {...props} />;
}
```
## Example
```tsx
import { Shimmer } from "@replicas/ui";
export default function ShimmerDemo() {
return <Shimmer>Thinking</Shimmer>;
}
```
## Foundations
The rest of the Stripe style, as a skill: https://replicas.raphaelsalaja.com/skills/stripe/SKILL.md