Pixel Sort

Vertical bar stretch effect that reconstructs the image on scroll.

Main Features of Pixel Sort

How to Use Pixel Sort in Next.js

Installation Guide for Pixel Sort

Props

Customize the component with these props

PropertyTypeDefaultDescription
image
stringhttps://images.unsplash.com/photo-1634152962476-4b8a00e1915c?q=80&w=1000&auto=format&fit=cropImage URL
backgroundColor
stringbg-blackBackground color of the component
containerHeight
stringh-[120vh]Height of the container
imageWidth
stringw-[80vw]Width of the image
imageHeight
stringh-[60vh]Height of the image
scaleYRange
[number, number][50, 1]Y scale range
scaleXRange
[number, number][0.1, 1]X scale range
filterStart
stringblur(10px) contrast(200%)Initial filter value
filterEnd
stringblur(0px) contrast(100%)Final filter value
gradientFrom
stringfrom-blackGradient start color class
gradientTo
stringto-transparentGradient end color class
gradientOpacity
number0.5Opacity of gradient overlay
statusText
stringRECONSTRUCTING_DATA_STREAM...Status text displayed
statusTextColor
stringtext-whiteColor of status text
statusTextSize
stringtext-smSize of status text
scrollOffset
[string, string]["start end", "center center"]Scroll offset configuration
className
stringAdditional CSS classes

When to Use

Excellent for glitch-themed sites, technical products, and modern web applications that want to emphasize a digital 'reconstruction' feel. Use this React component when building intro sequences where an image appears to be stream-loaded and processed in real-time.

Best Practices

Optimize for performance by adjusting the `scaleYRange` to avoid excessive stretching on low-end GPUs. Follow React best practices by using high-contrast colors for the `statusText`. Maintain scalable component architecture by keeping the `filterStart` blur level consistent with other glitch effects on your site.

Why This Component Matters in Modern UI Development

Pixel sorting and data-bending are major trends in tech-forward modern frontend development. This customizable UI component gives you a production-level implementation of complex CSS and motion mapping, helping you build a real-world application architecture that feels cutting-edge.

Frequently Asked Questions

QCan I use it for horizontal sorting?

The current implementation is focused on vertical bar stretching, but the scale axis can be swapped for horizontal motion with minor adjustments.

QDoes it work with transparent PNGs?

Yes, but for the best 'pixel sort' effect, it is recommended to use high-contrast images with well-defined color regions.

QIs the reconstruction speed adjustable?

The speed is tied to the user's scroll position, allowing for a perfectly synchronized 'data reveal' as they move down the page.

Pixel Sort - React Scroll Reveal Animations | Uilora