UI Interactions & Animations Roundup #26

NFT Accelerator – Interaction

by THRC

Prism – Store

by Ruslan Siiz

Gamma

by Robin Noguier

material. | Story

by Ivan Gorbunov

Progressive Moments

by Ali Zafar Iqbal

3D Animation in Interface

by Barry

Mail App

by Slava Kornilov

Uprock Agency. New concept

by Evgeny UPROCK

Visual Creatures Folio

by Zhenya Rynzhuk

BX Films — Redesign Concept

by Evgeny UPROCK

Mobile House Website Animation

by Vito Burhonski

Sneakers Presentation

by Vito Burhonski

SASI Studio – redesign corporate website

by Evgeny UPROCK

Photo App

by Slava Kornilov

MUSIC STORE WEBSITE CONCEPT

by Vitalii Burhonskyi

Virtually Human

by Slava Kornilov

Acid Kinetic Typography

by Anastasiia Malai

Gore – Product Landing Page Animation

by Bayu Ananda

Elegant Design Studio Website Home Page Animation

by Pradeep kumar

ANNIE LEIBOVITZ

by Evgeny UPROCK

Cuberto Development Dept

by Cuberto

Collective #641





Collective 641 Item Image

Blob Opera

A mind-blowing machine learning experiment by David Li where you can create your own opera inspired song.

Check it out






Collective 641 Item Image

Cameras and Lenses

Bartosz Ciechanowski explains how cameras and the lenses work and how adjusting a few tunable parameters can produce fairly different results.

Check it out


Collective 641 Item Image

Tiny-Swiper

A JavaScript carousel powered by plugins with a native-like experience. It has zero dependencies and is written in TypeScript.

Check it out



















Collective 641 Item Image

Centering in CSS

Follow 5 centering techniques as they go through a series of tests to see which one is the most resilient to change. By Adam Argyle.

Read it



The post Collective #641 appeared first on Codrops.

UI Interactions & Animations Roundup #12

It’s time to share a new roundup of UI interaction and animation concepts with you! We’ve collected some fresh and super-hot shots that will give you an idea of current trends and some good motion inspiration. Check out those awesome icon animations, playful text warps and fun 3D rotations—they are super trendy these days!

Glasses

by Ruslan Siiz

TAKASHO debut

by Boro | Egor Gajduk

Ocean agency – home page load and scroll

by Juraj Molnár

Icons 3D

by Outcrowd

Marqeta Homepage

by Clay: UI/UX Design Agency

Berlin Music Awards

by Viacheslav Olianishyn

Header slider idea

by Hrvoje Grubisic

ORE Contact Page Animation

by Zhenya Rynzhuk

Inside intro animation

by Gil

Animated Icons for Maslo Mobile App

by Igor Pavlinski

Wine + Peace™ · Slider Winemaker Homepage

by Pierre-Jean Doumenjou

Uniform Wares. Watch website WIP design

by Daniel Montgomery

makemepulse website – Landing page focus

by Louis Ansa

Photography Contest Website Interactions

by tubik

ORE Image Grid Animation

by Zhenya Rynzhuk

Avalanche

by Advanced Team

W/2 – Interaction

by Anton Pecheritsa

Brand Experience

by Francesco Zagami

Endplan – Logo Animation

by Michaela Fiasova

Beginnings – Collections Slider

by Tom Anderson

The post UI Interactions & Animations Roundup #12 appeared first on Codrops.

UI Interactions & Animations Roundup #11

Today I’m happy to share another big UI animations roundup with you! Get inspired by these great concepts for website interactions and effects and see what’s in fashion these days.

I hope you enjoy this selection as much as I do and that it gets you up-to-date with the current motion trends!

If you’d like to see one of your shots featured here, don’t hesitate to get in touch with us.

Cargo Logistics Website Navigation

by Hrvoje Grubisic

Stop Plastic FAQ Page

by tubik

Quan landing page

by Lukáš Stra?ák

Archives® Experimental Animation

by Hrvoje Grubisic

Data planet

by Berezhnoy Eugene

Ringba Telecom Website Product Page Scroll

by Igor Pavlinski

Ginsburg

by Rokk Ebol

Ancient Art Museum Landing Page

by Kevin Pham

FWWA – Website Expl No. 1

by Rron Berisha

Personal Portfolio – 2021

by Denislav Jeliazkov

IBM: What’s Next in Computing

by Zhenya Rynzhuk

Tubular Concept 3 [Motion]

by David Kovalev

Tiny Porcelain – Concept art direction

by Tom Anderson

Origin2

by Zak Steele-Eklund

Landing page concept with zoom-in transition

by Minh Pham

IBM Research Website Hover Animation

by Zhenya Rynzhuk

Venue Faces—Interaction

by Hrvoje Grubisic

App Rating – MVP

by Lukáš Stra?ák

Hero Image Transition Experiments

by Zhenya Rynzhuk

Carousel Transition

by Francesco Zagami

Lighthouse – Custom Statue Store

by Malik Abimanyu

Task composer interactions

by Jakub Antalik

Header slider concept

by Hrvoje Grubisic

The post UI Interactions & Animations Roundup #11 appeared first on Codrops.

UI Interactions & Animations Roundup #10

Today we have a new interactions and animations roundup filled with fresh motion goodness for you! Flowy grids, organic shape animations and on-scroll fun mark this new set and we’re very excited about all the amazing inspiration!

Hope you enjoy this, too!

Sold&Sesy – Micro

by tokitoshi

Video Main

by Slava Kornilov

Curology

by Jonathan Vuijk

Arch – Homepage Motion

by Adarsh Goldar

Ring Homepage

by Rolf Jensen

Digital Exhibition of Shapes

by Zhenya Rynzhuk

Wiels — Contemporary Art Center — Events

by Glenn Catteeuw

Meilleur — Website

by tokitoshi

World of Shapes Animation with 3D objects

by Zhenya Rynzhuk

Docket note (Side menu)

by Ariuka

FOMU — Fotomuseum Antwerp — Carousel

by Glenn Catteeuw

Forest Planet

by Matthew Hall

Portfolio Interactions

by Tom Anderson

Archy – Interior agency website

by Yogie Ismanda

Landing page for gold jewelry website

by Artem

Ramenny web landing product page UI interaction

by Taras

physics 3D landing page concept

by Minh Pham

User Experience – Design Concept

by 00.032

OpenColony Marketing Website

by Ramotion

Web site — Ason Pottery

by Denys Boldyriev

Cobalten – Furniture Landing Page Animation

by Fauzi Akmal

Abstract 3D

by Kirill Emelyanov

The post UI Interactions & Animations Roundup #10 appeared first on Codrops.

UI Interactions & Animations Roundup #8

It’s time for a crisp new collection of inspirational UI interaction and animation shots! This time we have Aristide Benoist’s works stand out with some very creative motion ideas and there’s some wonderful mobile animations, too.

We hope you enjoy this set and get inspired!

The Secret Project — 002

by Aristide Benoist

PER-SONA — Interactive Menu Page No. 1

by Rron Berisha

Ecotourism Website Home Page

by tubik

The Secret Project — 003

by Aristide Benoist

GEORGINA

by Slava Kornilov

ORU Office Spaces

by Hrvoje Grubisic

SolarEdge App Redesign Concept

by Kamil Kozie?

Paved Landing Page – Animation Concept

by Robert Mayer

Liquid Tab Bar

by Cuberto

M. Editorial Website Letters Animation

by Zhenya Rynzhuk

Kreditrobot iOS mobile application interaction screens

by Taras Migulko

Cuberto Services Page

by Cuberto

Trip mobile app interaction

by Riko Sapto Dimo

élégante home no.1

by Clay Boan

Wildlife Shot Animation

by Keshav Dev

Tattoo Artist website landing page design interaction

by Taras Migulko

The Secret Project — 004

by Aristide Benoist

DSX About Page

by Clay: UI/UX Design Agency

Street Art News Animation

by Shakuro

Stunning_ Animation

by Tran Mau Tri Tam

The post UI Interactions & Animations Roundup #8 appeared first on Codrops.

How to Create a Motion Hover Effect for a Background Image Grid

If you follow our UI Interactions & Animations Roundups, you might have spotted this beautiful grid designed by the folks of tubik:

Previously, Zhenya Rynzhuk also designed this wonderful layout with a similar interaction:

It’s not too complicated to implement this. I wanted to try it and in the following I’ll walk you through the relevant markup and code.

The markup and style for the grid

The markup is simply a grid of items that have background images. I like to use this structure because it allows me to control the sizes of the images by setting their position in the grid.

<div class="grid">
    <div class="grid__item pos-1">
        <div class="grid__item-img" style="background-image:url(img/1.jpg);"></div>
    </div>
    <div class="grid__item pos-2">
        <div class="grid__item-img" style="background-image:url(img/2.jpg);"></div>
    </div>
    <div class="grid__item pos-3">
        <div class="grid__item-img" style="background-image:url(img/3.jpg);"></div>
    </div>
    ...
</div>

The grid is stretched to be a bit bigger than its parent because we want to move the items and create the illusion of an infinite plane of images.

.grid {
	pointer-events: none;
	position: absolute;
	width: 110%;
	height: 110%;
	top: -5%;
	left: -5%;
	display: grid;
	grid-template-columns: repeat(50,2%);
	grid-template-rows: repeat(50,2%);
}

.grid__item {
	position: relative;
}

.grid__item-img {
	position: relative;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: 50% 50%;
}

The grid is divided into 50 cells for the rows and columns. With this layout density, the position of each image element can be set precisely.

/* Shorthand grid-area: grid-row-start / grid-column-start / grid-row-end / grid-column-end */

.pos-1 {
	grid-area: 10 / 1 / 26 / 7;
}

.pos-2 {
	grid-area: 1 / 18 / 9 / 27;
}

.pos-3 {
	grid-area: 1 / 36 / 14 / 42;
}

...

Note that I use the double division structure for the possibility of moving the inner element with the background image to create the motion effect seen in demo 3. For that case, I define some extra styles:

/* If we want to move the inner image */

.grid--img .grid__item {
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	will-change: transform;
}

.grid--img .grid__item-img {
	flex: none;
	width: calc(100% + 100px);
	height: calc(100% + 100px);
	will-change: transform;
}

The JavaScript

Now, let’s have a look at the JavaScript part. I’m using GSAP by GreenSock. We start by creating a Grid class to represent the grid of pictures:

export default class Grid {
    constructor(el) {
        this.DOM = {el: el};
        this.gridItems = [];
        this.items = [...this.DOM.el.querySelectorAll('.grid__item')];
        this.items.forEach(item => this.gridItems.push(new GridItem(item)));
       
        this.showItems();
    }
    ...
}

const grid = new Grid(document.querySelector('.grid'));

There should be an initial animation where the grid items scale up and fade in. We can add a method to the class for that. We also want the items to start at different times and for that we use the GSAP stagger option. The items will start animating from the center of the grid:

showItems() {
    gsap.timeline()
    .set(this.items, {scale: 0.7, opacity: 0}, 0)
    .to(this.items, {
        duration: 2,
        ease: 'Expo.easeOut',
        scale: 1,
        stagger: {amount: 0.6, grid: 'auto', from: 'center'}
    }, 0)
    .to(this.items, {
        duration: 3,
        ease: 'Power1.easeOut',
        opacity: 0.4,
        stagger: {amount: 0.6, grid: 'auto', from: 'center'}
    }, 0);
}

Now, let’s make the items move as we move the mouse around. Each grid item will be represented by a GridItem class:

class GridItem {
    constructor(el) {
        this.DOM = {el: el};
        this.move();
    }
    ...
}

The position of each item in both axes should be mapped with the mouse position. So, the mouse can move from position 0 to the width or height of the window. As for the item, it’ll move in a range of [start, end] that we need to specify. We’ll be assigning random values for the start/end value so that each item moves differently from each other.

Let’s add the move method to the GridItem class:

move() {
    // amount to move in each axis
    let translationVals = {tx: 0, ty: 0};
    // get random start and end movement boundaries
    const xstart = getRandomNumber(15,60);
    const ystart = getRandomNumber(15,60);
   
    // infinite loop
    const render = () => {
        // Calculate the amount to move.
        // Using linear interpolation to smooth things out.
        // Translation values will be in the range of [-start, start] for a cursor movement from 0 to the window's width/height
        translationVals.tx = lerp(translationVals.tx, map(mousepos.x, 0, winsize.width, -xstart, xstart), 0.07);
        translationVals.ty = lerp(translationVals.ty, map(mousepos.y, 0, winsize.height, -ystart, ystart), 0.07);
       
        gsap.set(this.DOM.el, {x: translationVals.tx, y: translationVals.ty});  
        requestAnimationFrame(render);
    }
    requestAnimationFrame(render);
}

And that’s it!

I hope you find this helpful and please let me know your feedback via @codrops. Thank you for reading!

The post How to Create a Motion Hover Effect for a Background Image Grid appeared first on Codrops.