Overview
Toast Tabs combines an avatar row with a floating toast card. The active avatar grows and gains a colored SVG progress ring that fills as the autoplay timer advances. Hovering pauses the timer; clicking an avatar resets and activates it. All transitions use Framer Motion’spopLayout mode for seamless enter/exit sequencing.
Installation
components/rareui/ToastTabs.tsx into your project.
Usage
Props
Array of tab data objects. Each entry requires
id: string | number, image: string (avatar URL), title: string, and description: string (quote or summary shown in the toast card).When
true, the component automatically advances to the next tab after each autoplayDelay interval. Pauses on mouse enter and resumes on mouse leave.Duration in milliseconds between automatic tab advances. The progress ring fills over this duration to indicate remaining time.
CSS color value for the SVG progress ring around the active avatar. In dark mode, the ring always renders as white regardless of this value.
Additional Tailwind or CSS classes applied to the outermost container
<div>.Examples
Default testimonials carousel
Custom tabs with a blue ring
Static display without autoplay
Features
Animated Progress Ring
An SVG
stroke-dashoffset driven by a Framer Motion value fills around the active avatar as the autoplay timer counts down.Toast Content Card
Active tab content animates in and out using
AnimatePresence with popLayout mode for smooth positional sequencing.Autoplay with Pause
The timer advances using
useAnimationFrame for frame-accurate progress tracking and pauses automatically on hover.Keyboard Navigation
Arrow Left / Arrow Right keys move between avatars, reset the progress ring, and shift focus — fully accessible.
Customizable Ring Color
Pass any valid CSS color to
ringColor to match your brand. Overridden to white automatically in dark mode.Grayscale Inactive Avatars
Inactive avatars are desaturated and dimmed, creating clear visual hierarchy that lifts on hover.