--- /** * A horizontal carousel of slides, built the way Blume's own * content components are: static markup, a custom element for the behaviour, * no framework. The track is a CSS scroll-snap strip (so it also swipes on * touch and the browser does the animation); prev/next sit outside it and * the play toggle sits below with a "n / N" counter. * * `time` is seconds per slide while playing (default 1.25); `autoplay` starts * playing on load. Play wraps around, pauses whenever the tab is hidden, and * never starts on its own for a reader who prefers reduced motion — the * button still works for them. Manual navigation (buttons, arrow keys, swipe) * does not stop playback; it only restarts the interval so a step is never * doubled. */ import Icon from "blume/components/Icon.astro"; interface Props { /** Seconds each slide stays while playing. */ time?: number; autoplay?: boolean; } const { time = 1.25, autoplay = false } = Astro.props; const buttonClass = "inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full border border-border bg-background text-muted-foreground transition-colors hover:border-foreground hover:text-foreground disabled:cursor-default disabled:opacity-40"; ---