
Scroll Stack
Scroll
A slanted wipe that switches between two content panels inside one section with a sharp angled motion.
Shear Wipe lets users move between related content states without leaving the page.
On desktop, the interaction is built around two large vertical labels, Components and Showcase, at the edges of the section. Clicking Showcase sweeps a slanted panel across from the right edge to cover the Components view; clicking Components pulls it back. Hovering the opposite label nudges the slanted edge as a preview. The result feels more graphic than a standard tabs component, but the job is still simple: show the right content when the user asks for it.
Use Shear Wipe when two related content views need to share the same space: components and showcases, features and proof, product story and results, design approach and implementation details. It is built for exactly two panels, Components and Showcase, each holding a heading and a short paragraph that you edit in the source. The page job is controlled switching: the visitor should understand which view is active, what changed, and where to click next.
The production risk is treating the visual wipe as the product. On desktop the two labels are clickable divs, not buttons, so they cannot be reached or triggered from the keyboard; add real buttons or a tab pattern before relying on it there. The angled wipe should make the content change feel designed; it should not make the user decode the interface.
import ShearWipe from '@/components/shear-wipe' const page = () => { return ( <> <ShearWipe /> </> )} export default page A product page can use Shear Wipe to switch between Components and Showcase. The Components view explains what the product includes in a heading and short paragraph, while the Showcase view gives a short proof statement; richer content such as screenshots means extending the panels in the source. The angled wipe makes the change feel intentional, but the user remains in control of what appears.
The outcome is focus: the page can show multiple sides of one story without stacking every detail vertically or forcing the visitor into a full carousel.
Not for page transitions, route changes, checkout flows, dashboards, dense documentation, or large tab systems with many panels.
Not for critical information that users must see without clicking.
Not for keyboard-critical interfaces without changes: on desktop the panels switch only on a mouse click (hover just nudges the edge) and the labels are not focusable. Below 1024px the switch uses real tab buttons that work with keyboard and touch.
Animate transform, clipping, and opacity rather than layout. Pre-size the content area where possible so the wipe does not create layout shift. Avoid loading heavy media for every inactive panel upfront, and clean up timers, observers, or animation instances when the component unmounts.
Below 1024px the component already uses a role="tablist" with two role="tab" buttons carrying aria-selected, plus a sliding underline on the active tab. On desktop the vertical labels are plain divs with click handlers and no tabIndex or key handling, so keyboard users cannot switch panels there, and the active panel is shown only by which colour fills the section. Make the desktop labels real buttons, give each panel a labelled region, and preserve focus-visible styles.
Below 1024px the slanted wipe is replaced by the tab layout: the underline slides to the selected tab, the background colour changes, and the panel content cross-fades. With reduced motion enabled, the desktop wipe and the mobile content swap happen instantly, and the hover nudge on the labels is turned off.
| Prop | Type | Default | Description |
|---|---|---|---|
componentsTextColor | string | #0D47A1 | Text color for the Components panel. |
componentsBackgroundColor | string | #E3F2FD | Background color for the Components panel. |
showcaseTextColor | string | #ffffff | Text color for the Showcase panel. |
showcaseBackgroundColor | string | #0D47A1 | Background color for the Showcase panel. |
clipPathDuration | number | 0.9 | Duration of the shear clip-path wipe between panels. |
Shear Wipe is a React content-switching component that reveals different content views through an angled slide-in wipe.
No. It does not change routes. It switches content inside the same component when a user clicks labels such as Components or Showcase.
Use it when related content views need a shared space and a more graphic switch than normal tabs.
If the views are mutually exclusive and function like tabs, use a proper tab pattern. If the labels behave more like mode switches, use real buttons with clear active state and a labelled content region.
Below 1024px it switches automatically to a tab layout with Components and Showcase tab buttons, a sliding underline and a cross-fade between panels, so there are no large angled panels on small screens.
With prefers-reduced-motion set, the angled wipe and the mobile cross-fade are skipped and the content switches instantly. The content stays fully readable without motion.
Need a custom effect? Tell us what to create.