Introducing DIVZ – a React component to scroll, swipe & zoom through content on the 3D z-axis

Introducing DIVZ – a React component to scroll, swipe & zoom through content on the 3D z-axis

I’m excited to share DIVZ – a free open source React UI component that lets you scroll, swipe & zoom through HTML elements on the 3D z-axis. Think of it as a new, experimental way to navigate and present web content 🙌

👉 Try out the demos here 👈

👉 Dive into the source code 👈

Installation

Developers can install Divz as an open source component to use in React apps. Quickest install method is via the npm install command below:

npm install divz

Usage

After install, import the component and render it in your app or page, wrapping it around your list of divs or other HTML elements:

import { Divz } from divz;

function App() {
return (
<Divz>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</Divz>
);
}

The demo source code illustrates how the component can be initialised with more props – along with images and videos inside the child divs – for a richer user experience.

Why Divz?

Divz was initially created to showcase portfolio work within a pseudo-3D environment, loosely inspired by Apple’s Time Machine interface which allows the user to zoom through historical Finder windows:

What Sets It Apart?

Simplified Integration: Divz is designed to be responsive and easy to use, acting as a straightforward wrapper around a list of divs or other HTML elements.

Diverse Applications: While the demos showcase its versatility as a carousel, slideshow, or gallery component, Divz opens the door to a range of other potential uses. Consider it an innovative, experimental method for navigating web content.

Broad Device Support: Divz accommodates various navigation modes, including touch for mobile devices, cursor/trackpad for desktop users, and arrow keys for TV devices.

How Does It Work?

Under the hood, Divz performs CSS3 transforms on the core component and the child HTML elements, set dynamically with React TypeScript. The component is packaged using Vite to allow npm library integration.

Support

I hope this has given a good intro to the component and you get some use out of it for your own projects!

💬 Fire over a comment if you have any feedback, requests or issues 🐛

⭐ Give it a Github star if you like the component or want to bookmark it 🙏

Leave a Reply

Your email address will not be published. Required fields are marked *