Blocks
Arc Carousel
A showcase carousel whose cards hang on a downward arc and swing round it as you step.
A showcase for a handful of pieces, laid out on a curve. The cards hang on a downward arc, each one further from the centre sitting a little lower and turned a little more, three to a side. Step and the whole arc swings round: every card glides to its neighbour's slot on a slow, weighted curve, while the one arriving in the middle eases up in size and takes a lime outline. Cards fade out past the third slot and wrap round unseen, so the loop never snaps. Swipe, drag, use the arrow keys, or click a side card to bring it to the centre. GSAP with ScrollTrigger.
1 of 8: Nightfall
Installation
pnpm dlx shadcn@latest add @tween-ui/arc-carouselUsing an AI editor? Set up MCP once, then just ask for it in plain words.
Usage
import ArcCarousel from '@/components/tweenui/arc-carousel';
export default function Page() {
return <ArcCarousel />;
}It ships with eight sample projects. Pass your own as items, and put your
own heading above it:
import ArcCarousel from '@/components/tweenui/arc-carousel';
export default function Page() {
return (
<ArcCarousel
label="New this season"
items={[
{
title: 'Field Jacket',
tag: 'Outerwear',
meta: '$240',
image: '/shop/jacket.jpg',
href: '/shop/jacket',
},
{
title: 'Day Pack',
tag: 'Bags',
meta: '$120',
image: '/shop/pack.jpg',
href: '/shop/pack',
},
// …
]}
/>
);
}The colors are the Tween UI palette, written inline as Tailwind classes so
there is nothing to add to your theme: the deep ink stage (#03110f), card
surfaces in #071d1b, a teal glow (#045f64), soft teal text (#9fd4d6) and
the lime accent (#c6f56f) on the centre card and the controls. Restyle them
in the className strings.
Autoplay
Autoplay is on by default: a new card takes the centre every 5 seconds, and a
pause / play button sits beside the arrows with a lime ring filling up as the
current card's time runs out. Set the pace with interval, or turn it off with
autoplay={false}, which also drops the button:
<ArcCarousel interval={4000} /> // a new card every 4s
<ArcCarousel autoplay={false} /> // steps only when the viewer doesProps
| Prop | Type | Default | Description |
|---|---|---|---|
items | ArcCarouselItem[] | Eight sample projects | The cards on the arc. |
label | string | 'Featured projects' | Accessible name for the carousel. |
autoplay | boolean | true | Step to the next card on its own. |
interval | number | 5000 | Time each card holds the centre, in ms. |
Each item is { title, image, tag?, meta?, href? }. The tag is the chip on
the top left of the card and meta the line under the title. With an href
the centre card is a link and shows a round arrow. Extends native <section>
attributes (className, style, …).
Behavior
- One card size, one arc. Every card is 312 × 430px and the slots are fixed offsets from the centre, so the curve keeps its shape whatever the content. Below 1024px of container width the whole arc scales to 80%, and below 768px to 62%, so it fits a phone without relaying out.
- One number drives the arc. GSAP tweens the carousel's position, and every card is placed from it each frame, sliding smoothly between slots. Past the third slot a card fades out, so it crosses from one end of the loop to the other while invisible. With eight or more items that crossing is never seen.
- Side cards step, the centre card opens. A click on a side card moves the arc one step toward it instead of following its link, and a swipe or drag of more than 50px sideways steps it the other way and swallows the click that ends it. Vertical swipes still scroll the page.
- The centre card steps forward. Side cards sit under a light shade of the stage color; the centre card loses it, grows 5%, takes a lime outline and turns its arrow lime, so the eye lands on it first.
- The edges fade, the arc does not stop. The soft fades on both sides sit above the cards, so the outer ones run out into the background instead of being cut off by the edge of the section.
- Light on the browser. Cards move on
transformandopacityonly, with no blur. Photos come at 1x and 2x with fixed dimensions; the five nearest the centre load first and the rest lazily. - Autoplay waits for you. It holds while the mouse rests on the cards, while the cards have keyboard focus and while the block is off-screen, and picks up where it left off. The progress ring is the clock: one GSAP tween that pauses and resumes. Stepping by hand gives the new card a full interval.
- It is in place before it runs. The first layout is written into the markup, so the arc renders already curved and nothing flashes into place on load.
Accessibility
The carousel is a focusable group with aria-roledescription="carousel",
named by label, and the left and right arrow keys step it while it has
focus. Each card is a slide labelled n of total: title; cards off the
centre are hidden from screen readers and out of the tab order, so only the
card you are looking at can be reached. The current card is announced
politely after every step. The arrows are real buttons with labels and every
control has a visible lime focus ring. With autoplay on there is always a
labelled pause button, and the announcement goes quiet while the carousel plays
itself, so a screen reader is not interrupted every few seconds. Under
prefers-reduced-motion: reduce autoplay starts paused, the cards fade
between slots instead of travelling, and the centre card does not grow.