Phototab

Animated React tabbed photo gallery component with smooth swipe transitions, lazy loading support, and accessible keyboard navigation.

Open in v0
~1.1 kB

Last updated: June 1, 2026

one

Installation

npx smoothui-cli add phototab

Features

  • Tab and swipe transitions
  • Lazy image loading friendly
  • Keyboard and ARIA tabs
  • Responsive grid

Accessibility

ARIA Attributes

AttributeElementPurpose
aria-labelTab listProvides an accessible name "Phototab Tabs"
aria-labelEach tab triggerDescribes the tab name

Screen Reader

  • Built on Radix UI's Tabs primitives, which provide built-in role="tablist", role="tab", and role="tabpanel" semantics with automatic aria-selected state management.
  • Each tab trigger includes a visually hidden <span className="sr-only"> with the tab name.
  • Tab images have alt attributes matching the tab name.

Reduced Motion

This component respects the prefers-reduced-motion media query via useReducedMotion from Motion. When reduced motion is preferred, the hover background pill animation uses instant transitions instead of spring physics.

Props

On this page

Created by

Improved by

Eduardo Calvo's avatar

Powered by

motion.dev
radix-ui.com