About this set
Comparisons that switch between whole images instead of splitting one. Tabs for original, edited and retouched show three stages of a portrait session beside a short description and a camera and edit summary. The three panels sit in one grid cell and cross-fade, so the photo never jumps, and the tabs follow the ARIA tabs pattern: the selected tab is in the tab order, the arrow keys move between tabs and Home and End jump to the first and last. Use it when there are more than two versions, such as a retoucher’s process, a colour grading preset or a photo restoration. Fade toggle with aria-pressed is one button under a food photo: pressing Show original fades the unedited shot in over the styled one, and pressing it again fades it out. The state lives in aria-pressed, the switch drawn inside the button follows it with CSS, and :has() on the figure fades the photo, so the script only flips one attribute. The three portrait stages and the food pair are each one Unsplash image with different CSS filters. The Bootstrap version uses .nav-pills with the bundle’s tab plugin and a .btn with data-bs-toggle set to button.
What’s included
- Three-way tabs: original, edited and retouched
- Panels cross-fade in one grid cell without layout shift
- Full keyboard support with arrow keys, Home and End
- Toggle button whose state is aria-pressed
- Bootstrap version uses .nav-pills, .tab-pane.fade and the button plugin
Accessibility
The tabs use role tablist, tab and tabpanel with aria-selected, aria-controls and aria-labelledby, and a roving tabindex so only the selected tab is a tab stop. Hidden panels use visibility: hidden, so screen readers skip them. The toggle is a button with aria-pressed and a visible label, every control has a blue focus outline, and the fades are switched off under prefers-reduced-motion.
Customise it
Edit the filters on .tc-original and .tc-retouched and the --tc-accent colour, and the .ft-before filter for the unedited look. In Bootstrap change the --bs-nav-pills-* and --bs-btn-* variables; in Tailwind edit the aria-selected: and aria-pressed: utilities and the filter classes on each image.






