---
title: "Ribbons"
description: "Closed lines whose corners drift and bounce off the edges, each with a trail of fading echoes. On a canvas."
url: https://gelatinui.com/components/ribbons
markdown_url: https://gelatinui.com/components/ribbons.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/ribbons"
version: "2026-11-11"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Ribbons

> Closed lines whose corners drift and bounce off the edges, each with a trail of fading echoes. On a canvas.

Page: https://gelatinui.com/components/ribbons

## When to use it

Best for: Soft closed lines that drift and bounce, with echoes, behind text on a dark stage.

- Use `colors` for one color per ribbon, such as the status tokens of a state.
- Use `trails` for the length of the echo and `speed` for the pace.

## When not to use it

- For pipes on a grid, use [Pipes](https://gelatinui.com/components/pipes.md).
- For a light that runs around a border, use a [Border Beam](https://gelatinui.com/components/border-beam.md).

## Notes for agents

- It draws on a canvas that fills its box: give the box a size.
- `colors` takes any CSS color, tokens too; it reads them again on a theme switch.
- A new prop starts the scene again.

## Anatomy

```text
Ribbons
```

## API reference

### Ribbons

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `count` | `number` | 2 | How many ribbons. Default 2. |
| `points` | `number` | 4 | Corners per ribbon. Default 4. |
| `trails` | `number` | 10 | Echoes per ribbon: the trail that fades behind it. Default 10. |
| `speed` | `number` | 1 | How fast the corners move: 1 is calm. Default 1. |
| `colors` | `readonly string[]` | AURORA_COLORS | One color per ribbon, in order (any CSS color). Default: the aurora. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| Ribbons | `ribbons` |  |  |  |

## Usage

Put Ribbons behind your content in a box with a size.

```tsx title="ambient-tile.tsx"
import { Ribbons } from "@/components/pro/screensavers/ribbons";

export function AmbientTile() {
  return (
    <div className="relative isolate h-72 overflow-hidden rounded-2xl bg-neutral-950">
      <Ribbons className="absolute inset-0 -z-10" trails={12} speed={0.7} />
    </div>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/ribbons
```

It adds 28 registry items: 27 files, 2564 lines, and the npm packages `@mantine/hooks`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Screensaver](https://gelatinui.com/components/screensaver.md)
- [Starfield](https://gelatinui.com/components/starfield.md)
- [Pipes](https://gelatinui.com/components/pipes.md)
- [Border Beam](https://gelatinui.com/components/border-beam.md)
- [Marquee](https://gelatinui.com/components/marquee.md)
