---
title: "Scroll Trigger"
description: "Slides that wipe into view as they scroll in, using CSS animation-trigger."
canonical_url: "https://www.blossom-carousel.com/docs/examples/experimental/scroll-trigger"
---

> Index of every page on this site: [llms.txt](https://www.blossom-carousel.com/llms.txt)

<supports-scroll-trigger-support>
<caution>

Animation-trigger is not yet supported in this browser. Check browser compatibility at [caniuse.com](https://caniuse.com/?search=animation-trigger)

</caution>
</supports-scroll-trigger-support>

<example-scroll-trigger>



</example-scroll-trigger>

<tabs sync="example-code-style">
<tabs-item label="CSS">
<code-group>

```css [.css]
.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 200px;
  gap: 1rem;
  scroll-snap-type: x mandatory;
}

.slide {
  width: 100%;
  aspect-ratio: 3 / 4;
  scroll-snap-align: center;

  timeline-trigger-name: --t;
  timeline-trigger-source: view(inline);
  animation: unclip 0.35s ease-in-out both;
  animation-trigger: --t play-forwards play-backwards;
}

@keyframes unclip {
  from {
    clip-path: inset(100% 0 0 0 round 1rem);
  }
  to {
    clip-path: inset(0);
  }
}
```

```html [.html]
<BlossomCarousel class="carousel">
  <div class="slide"></div>
  <div class="slide"></div>
  <div class="slide"></div>
  ...
</BlossomCarousel>
```

</code-group>
</tabs-item>

<tabs-item label="Tailwind">
<code-group>

```css [.css]
.slide {
  timeline-trigger-name: --t;
  timeline-trigger-source: view(inline);
  animation: unclip 0.35s ease-in-out both;
  animation-trigger: --t play-forwards play-backwards;
}

@keyframes unclip {
  from {
    clip-path: inset(100% 0 0 0 round 1rem);
  }
  to {
    clip-path: inset(0);
  }
}
```

```html [.html]
<BlossomCarousel
  class="grid! auto-cols-[200px] snap-x snap-mandatory grid-flow-col gap-4"
>
  <div class="slide w-full snap-center aspect-3/4"></div>
  <div class="slide w-full snap-center aspect-3/4"></div>
  <div class="slide w-full snap-center aspect-3/4"></div>
  ...
</BlossomCarousel>
```

</code-group>
</tabs-item>
</tabs>

## Sitemap

See the full [sitemap](https://www.blossom-carousel.com/sitemap.md) for all pages.
