The Programmer News Hubb
Advertisement Banner
  • Home
  • Technical Insights
  • Tricks & Tutorial
  • Contact
No Result
View All Result
  • Home
  • Technical Insights
  • Tricks & Tutorial
  • Contact
No Result
View All Result
Gourmet News Hubb
No Result
View All Result
Home Tricks & Tutorial

10 Simple CSS and JavaScript Micro-interactions for Buttons — SitePoint

admin by admin
July 25, 2023
in Tricks & Tutorial


In the physical world, some things click when we flick or press them — such as light switches. Some things light up or beep — such as the buttons on an ATM. These responses are all “micro-interactions” that let us know when we’ve successfully done something. In this article, we’ll learn ten simple ways to add micro-interactions to buttons on a web page.

Table of Contents
  1. What are Micro-interactions?
  2. Bouncy 3D Micro-interaction
  3. Adding a Clicking Sound to a Button
  4. Buttons with Border Animations
  5. Ripple Micro-interaction
  6. Shape-changing Micro-interaction
  7. Text Change Micro-interaction
  8. Icon Change Micro-interaction
  9. Shaky Icons Micro-interaction
  10. Jittery Button Micro-interaction
  11. Glow Up Micro-interaction
  12. Combining Button Micro-interactions
  13. The Benefits of Micro-interactions

What are Micro-interactions?

Micro-interactions are small interactions or animations on the user interface. They provide instant feedback to users when they perform actions. Micro-interactions keep users engaged and can improve their overall experience.

Some examples of micro-interactions include the typing indicator when we’re chatting with someone online, the progress bar on a download, and the loading indicator when we refresh a page.

Buttons are one of the most common interactive elements on websites, and they can perform a range of tasks — such as toggling, submitting, deleting, closing, selecting (via radio buttons, option buttons, or select menus), and so on.

Bouncy 3D Micro-interaction

We can use the CSS transform property to create a 3D button that bounces when we click on it. Before we get started, the image below shows what we’re aiming for.

Here’s the HTML for this button:

<body>
  <button class="btn"><span class="text">Click Mespan>button>
body>

For this example, we’re nesting a element within the





Source link

Previous Post

Leading AI companies have committed to ensuring transparent AI development to U.S. government

Next Post

Making Apps More Accessible: An Introduction to the New Accessibility Audit Test for iOS

Next Post

Making Apps More Accessible: An Introduction to the New Accessibility Audit Test for iOS

Recommended

Behind the CSScenes, October 2022 | CSS-Tricks

12 months ago

Apiumhub becomes a partner of the Global Summit for Node.js 23

9 months ago

Weekly News for Designers № 686

7 months ago

The dichotomy of AI for the software developer

2 months ago

Hiring Bias – What is it and How can it be Eradicated?

10 months ago

SD Times Open-Source Project of the Week: Storybook

1 month ago

© The Programmer News Hubb All rights reserved.

Use of these names, logos, and brands does not imply endorsement unless specified. By using this site, you agree to the Privacy Policy and Terms & Conditions.

Navigate Site

  • Home
  • Technical Insights
  • Tricks & Tutorial
  • Contact

Newsletter Sign Up.

No Result
View All Result
  • Home
  • Technical Insights
  • Tricks & Tutorial
  • Contact

© 2022 The Programmer News Hubb All rights reserved.