tween
ComponentsTemplatesShowcaseContact

Command Palette

Search for a command to run...

Getting Started
  • Introduction
  • Installation
  • StoryNew
Guides
  • Motion Principles
  • Scroll and Smooth Scroll
  • Performance and Accessibility
Scroll Animations
  • Sticky Cards Scroll
  • Rise Fan Cards Scroll
  • Rotate Stack Scroll
  • Doodle Lens ScrollNew
  • Slit Open Hero ScrollNew
  • Logo Mask Zoom ScrollNew
  • ASCII Dissolve ScrollNew
  • Lottie Flight ScrollNew
  • Inline Icon Text ScrollNew
  • Starfield ScrollNew
  • Name Swap ScrollNew
  • Spotlight Gallery HeroNew
  • Slit Rotate Hero ScrollNew
  • Stroke Cover ScrollNew
  • Stroke Rows ScrollNew
Text Animations
  • Text Skew Reveal
  • Block Text Reveal
Hover & Cursor
  • Image Trail Cursor
  • Cursor Depth Logo
  • Physics Tag Drop
  • Elastic Card ListNew
  • Magnetic Cards SpringNew
Sliders & Carousels
  • Wheel Fullscreen Carousel
  • Ripple Displacement Slider
  • Three.js Blend Slider
  • Stacked Deck Slider
  • Orbit Cylinder SliderNew
  • Fan Stack SliderNew
  • Exponential Strip SliderNew
  • Dual Column SliderNew
Galleries & Grids
  • Scroll Wave Gallery
Menus & Navigation
  • Shrink Page MenuNew
Preloaders & Intros
  • Floating Items RevealNew
  • Word Cycle RevealNew
  • Tile Grid LoaderNew
Page Transitions
  • Panel Assembly TransitionNew
3D & WebGL
  • Fractal Glass Hero
  • Fluid Cursor Canvas
  • Fluid Portrait Hero
  • Fluid Gradient Canvas
  • Inversion Lens HoverNew
UI Elements
  • Circular Widgets
  • Vinyl Cover
  • Image Explosion Footer
  • Accordion Image FramesNew

(Tween) — Motion registry

Animated components & full sites, one command away.

Product

  • Components
  • Templates
  • Installation
  • Guides
  • Blog
  • Contact

Categories

  • Scroll Animations
  • Text Animations
  • Hover & Cursor
  • Sliders & Carousels
  • Galleries & Grids
  • Menus & Navigation
  • Preloaders & Intros
  • Page Transitions
  • 3D & WebGL
  • UI Elements
TWEEN
ease: power2.inOut0.00s
© 2026 TweenBack to topBuilt by mohammad
  1. Docs/
  2. Components/
  3. Accordion Image Frames

Accordion Image Frames

PreviousNext

A horizontal track of thin image slivers where the hovered panel springs open to full width, the rest slide aside, and a focus frame with vertical guide lines glides to follow it.

Open in
accordion-image-frames-demo
components/ui/accordion-image-frames-demo.tsx
import { AccordionImageFrames } from "@/registry/tween/accordion-image-frames"

export function AccordionImageFramesDemo() {
  return (
    <div className="w-full">
      <AccordionImageFrames />
    </div>
  )
}

Installation

pnpm dlx shadcn@latest add https://tweenui.dev/r/accordion-image-frames.json

Usage

import { AccordionImageFrames } from "@/components/ui/accordion-image-frames"
<AccordionImageFrames
  images={[
    "https://images.unsplash.com/photo-1523516118247-bd68d99e83c2?q=80&w=800&h=800&fit=crop&crop=center&auto=format",
    "https://images.unsplash.com/photo-1643925690746-9eb744dae41b?q=80&w=800&h=800&fit=crop&crop=center&auto=format",
  ]}
  panelCount={16}
  expandedWidth={360}
/>

How it works

  • Every panel is absolutely positioned on the track. Its left and width are computed in render: the focused panel gets expandedWidth, every other panel collapsedWidth, with gap between them, and the whole row is centred in the track.
  • Hovering a panel focuses it. Both properties then change at once and a CSS transition (1s cubic-bezier(0.075, 0.82, 0.165, 1)) springs every panel to its new spot.
  • Each image is a fixed 400px wide and centred inside its panel, so a collapsed panel shows a thin slice of the middle of the photo rather than a squashed one.
  • The focus frame uses the same position as the focused panel and the same transition, with guide lines running up and down to the edges.
  • Images repeat when there are more panels than images. Below a 1000px container width the track switches to 10 smaller panels that focus on tap.
  • With prefers-reduced-motion: reduce the panels snap without transitioning.

Props

PropTypeDefaultDescription
imagesstring[]12 dune photosImages cycled across the panels.
panelCountnumber20Panels above the 1000px container breakpoint.
panelCountMobilenumber10Panels below the breakpoint.
collapsedWidthnumber20Collapsed panel width in px.
expandedWidthnumber400Focused panel width in px.
expandedWidthMobilenumber100Focused panel width in px below the breakpoint.
gapnumber5Gap between panels in px.
backgroundstring"#120e0a"Section background.
frameColorstring"#f3e4c8"Focus frame and guide-line color.
classNamestring—Extra classes on the section.
Image Explosion FooterAnimated Team Section

On This Page

InstallationUsageHow it worksProps

Contribute

  • Report an issue
  • Request a feature
  • Edit this page