{"id":166721,"date":"2017-07-27T13:00:00","date_gmt":"2017-07-27T13:00:00","guid":{"rendered":"https:\/\/premium.wpmudev.org\/blog\/?p=166721"},"modified":"2017-07-26T04:15:50","modified_gmt":"2017-07-26T04:15:50","slug":"microinteractions-wordpress-ux","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/microinteractions-wordpress-ux\/","title":{"rendered":"5 Cool Examples of Microinteractions for a Better WordPress UX"},"content":{"rendered":"<p>They say the devil is in the details, but that is not true when it comes to user experience.<\/p>\n<p>A good microinteraction should facilitate or embellish an otherwise tedious task in a very subtle way\u2014a bad microinteraction can ruin your experience with a website or product. Even though they\u2019re \u201cmicro,\u201d it doesn\u2019t mean that microinteractions can\u2019t have a big impact on the way users interact with your website.<\/p>\n<p>A microinteraction refers to any small interaction the user has with a product. For example, turning your alarm off on your phone and then swiping (or using your thumbprint) to unlock it are two separate microinteractions.<\/p>\n<p>Usually, microinteractions are meant to instruct or provide clarification about something, or help users accomplish an action or a task. Microinteractions are there to seamlessly integrate with user experience and improve it\u2014they\u2019re there to simplify.<\/p>\n<p>We\u2019ve already covered the <a href=\"https:\/\/wpmudev.com\/blog\/microinteractions-wordpress\/\" target=\"_blank\">basics of microinteractions in a previous post<\/a>, but now it\u2019s time to put them into action. Below are a few types of microinteraction examples and how you can achieve them on your WordPress site.<\/p>\n<h2>Loading Text or Icons<\/h2>\n<p>It\u2019s fun to press buttons, both in real-life and on the Internet (unless you\u2019ve accidentally pressed the Send button on an unfinished email!). Implementing an interesting effect on your form or CTA buttons can have a big impact on how users interact with your site. The best part is that hover effects don\u2019t have to be overly complicated.<\/p>\n<p>Form plugins like Contact Form by WPForms have built-in settings you can easily customize that will display a loading text whenever someone sends a form. All you have to do is access the settings and enter the text you want your form to display while processing.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/07\/submit_button_wpforms.png\" alt=\"WP Forms submit button\" width=\"498\" height=\"162\" \/><\/p>\n<p>The resulting microinteraction is simple.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/07\/wpforms.gif\" alt=\"WP Forms microinteraction\" width=\"518\" height=\"346\" \/><\/p>\n<p>While it doesn\u2019t seem like much, simply letting your users know their message is in the process of being sent is important. If the user selects the button and nothing happens, and the thank you page takes a while to load, they might start frantically clicking the Send button, or worse, navigate away from your page. The processing microinteraction is a nice touch.<\/p>\n<p>There are several jQuery plugins that allow you to add more complex loading icons to your buttons. Both <a href=\"http:\/\/www.jqueryscript.net\/loading\/jQuery-Plugin-For-Built-In-Loading-Indicator-In-Buttons-Button-Loader.html\" target=\"_blank\">Button Loader<\/a> and <a href=\"http:\/\/lab.hakim.se\/ladda\/\" target=\"_blank\">Ladda<\/a> offer an extensive library of loading buttons you can add to your WordPress site.<\/p>\n<p>Below is a quick example on how to use a Ladda button.<\/p>\n<p>After you\u2019ve downloaded and uploaded both the <em>ladda.min.js<\/em> and <em>spin.min.js<\/em> files to WordPress, do the same with the <em>ladda.min.css<\/em> file, which includes all the buttons.<\/p>\n<p>Make sure the <code>ladda-button<\/code> class is attributed to the Ladda button, and the button label has the <code>ladda-label<\/code> class attributed to it. The HTML associated with a single Lada button (in this case, a button that will expand to the right) looks something like this:<\/p>\n<div class=\"gist\" data-gist=\"raewrites\/b748ed76e7081fbb861048ccf0404678\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/raewrites\/b748ed76e7081fbb861048ccf0404678.js\" target=\"_blank\">Loading gist raewrites\/b748ed76e7081fbb861048ccf0404678<\/a><\/p>\n<div class=\"gist-consent-notice\" style=\"display:none\">\n<p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p>\n<\/div>\n<\/div>\n<p>The <code>bind( )<\/code> jQuery method can be used for forms that submit entries to the server and result in a page reload.<\/p>\n<div class=\"gist\" data-gist=\"raewrites\/7e26b912270b98166b43c3794c72677d\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/raewrites\/7e26b912270b98166b43c3794c72677d.js\" target=\"_blank\">Loading gist raewrites\/7e26b912270b98166b43c3794c72677d<\/a><\/p>\n<div class=\"gist-consent-notice\" style=\"display:none\">\n<p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p>\n<\/div>\n<\/div>\n<p>This yields the following button that lets your users know their form is being processed!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/07\/submit_button.gif\" alt=\"Submit button with jQuery\" width=\"170\" height=\"76\" \/><\/p>\n<h2>Adding Tooltips to Your Forms<\/h2>\n<p>Tooltips are great. Not only do they provide your users with a little extra information, but animating them makes for a great microinteraction your user won\u2019t soon forget.<\/p>\n<p>You can add a cool tooltip to your text manually by using a little CSS, or by installing some easy-to-use plugins like <a href=\"https:\/\/wordpress.org\/plugins\/simple-tooltips\/\" target=\"_blank\">Simple Tooltip<\/a> or <a href=\"https:\/\/wordpress.org\/plugins\/wordpress-tooltips\/\" target=\"_blank\">WordPress Tooltip<\/a>.<\/p>\n<p>A fun way to improve user experience is to add tooltips to your forms, fields, or specific icons on your website. <a href=\"https:\/\/wordpress.org\/plugins\/magic-tooltips-for-contact-form-7\/\" target=\"_blank\">Magic Tooltips<\/a> is a great plugin for that if you use Contact Form 7 or Gravity Forms.<\/p>\n<p>You can also use <a href=\"http:\/\/calebjacob.github.io\/tooltipster\/\" target=\"_blank\">Tooltipster<\/a>, which allows you to customize tooltips in your forms. After you\u2019ve downloaded all the files, loaded the scripts, and activated Tooltipster, you can start doing some pretty cool stuff.<\/p>\n<p>If you can edit your form\u2019s fields, you can append the tooltip class (<code>class=\u201dtooltip\u201d<\/code>) and then use <code>title=\u201dtooltip text\u201d<\/code>. But if you cannot edit your form fields, you can target the form field ID. For instance, if you give your Name field the <code>id=\u201dcustomernameID<\/code>\u201d, you can add the following script to your <em>tooltipster-scripts.js<\/em>\u00a0file:<\/p>\n<div class=\"gist\" data-gist=\"raewrites\/93c9d69632e54646ac30b40211e49a8f\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/raewrites\/93c9d69632e54646ac30b40211e49a8f.js\" target=\"_blank\">Loading gist raewrites\/93c9d69632e54646ac30b40211e49a8f<\/a><\/p>\n<div class=\"gist-consent-notice\" style=\"display:none\">\n<p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p>\n<\/div>\n<\/div>\n<p>This yields the following result:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/07\/tooltip_form.gif\" alt=\"Tooltip form\" width=\"578\" height=\"76\" \/><\/p>\n<p>The secret to useful tooltips is to not go overboard. Adding tooltips to everything might really annoy some of your visitors. It\u2019s important to remember that less is more when it comes to microinteractions.<\/p>\n<h2>Hover Interaction<\/h2>\n<p>There are many ways to add hover effects to your buttons, but in order for those effects to be a meaningful microinteraction, there needs to be a rhyme or reason for it. An effective microinteraction provides the user with some additional insight into what will happen if they\u2019re about to click a button.<\/p>\n<p>There are many plugins available that will allow you to seamlessly integrate hover effects to your buttons. Some of them are:<\/p>\n<ul>\n<li style=\"font-weight: 400;\"><a href=\"https:\/\/wordpress.org\/plugins\/microthemer\/\" target=\"_blank\">Microthemer Lite<\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"https:\/\/wordpress.org\/plugins\/animate-it\/\" target=\"_blank\">Animate It!<\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"https:\/\/wordpress.org\/plugins\/amazing-hover-effects\/\" target=\"_blank\">Amazing Hover Effects Plugin<\/a><\/li>\n<\/ul>\n<p>You can also whip up a fun microinteraction with just simple CSS. Want a different text to appear when you hover over a button? No sweat!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/07\/following_unfollow.gif\" alt=\"Following unfollow button\" width=\"226\" height=\"104\" \/><\/p>\n<p>I\u2019m working with the Twenty Sixteen theme, but I wanted to include my own button. So I added some custom CSS to create a black button, for which the hover would turn white with black text instead. I added a piece of custom CSS in the Additional CSS section of the WordPress Customizer.<\/p>\n<p>First I designed my basic black button:<\/p>\n<div class=\"gist\" data-gist=\"raewrites\/4b24a95a59fc48eb05010b0830da5937\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/raewrites\/4b24a95a59fc48eb05010b0830da5937.js\" target=\"_blank\">Loading gist raewrites\/4b24a95a59fc48eb05010b0830da5937<\/a><\/p>\n<div class=\"gist-consent-notice\" style=\"display:none\">\n<p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p>\n<\/div>\n<\/div>\n<p>Then I applied the hover effect\u2014the color change, as well as the change that would occur between the initial text and the hover text.<\/p>\n<div class=\"gist\" data-gist=\"raewrites\/1d6af8d76db159ed1ab68c043bbfbfcb\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/raewrites\/1d6af8d76db159ed1ab68c043bbfbfcb.js\" target=\"_blank\">Loading gist raewrites\/1d6af8d76db159ed1ab68c043bbfbfcb<\/a><\/p>\n<div class=\"gist-consent-notice\" style=\"display:none\">\n<p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p>\n<\/div>\n<\/div>\n<p>I saved my changes then I applied the following HTML to the page on which I wanted the button to appear.<\/p>\n<div class=\"gist\" data-gist=\"raewrites\/2d71a92f3096039e46b4ecbf3a22e1ce\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/raewrites\/2d71a92f3096039e46b4ecbf3a22e1ce.js\" target=\"_blank\">Loading gist raewrites\/2d71a92f3096039e46b4ecbf3a22e1ce<\/a><\/p>\n<div class=\"gist-consent-notice\" style=\"display:none\">\n<p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p>\n<\/div>\n<\/div>\n<p>And voil\u00e0! Here it is again:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/07\/following_unfollow.gif\" alt=\"Following unfollow button\" width=\"226\" height=\"104\" \/><\/p>\n<p>You can use this simple CSS to work with all kinds of buttons on your site; however, appending actions or hyperlinks to your buttons is a tutorial for another time.<\/p>\n<h2>Social Media Microinteractions<\/h2>\n<p>If you\u2019re a stickler for details (which you probably are if you\u2019re reading this post), you\u2019ll notice that when you highlight a piece of text of this article you&#8217;re reading right now, this happens:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/07\/twitter_example.gif\" alt=\"Twitter example\" width=\"486\" height=\"272\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>When you select the Twitter icon, you\u2019re redirected to your Twitter account to tweet what you\u2019ve just highlighted. Pretty neat, right?<\/p>\n<p>There are a number of ways you can add this type of microinteraction to your site. You can try a plugin like <a href=\"https:\/\/wordpress.org\/plugins\/highlight-and-share\/\" target=\"_blank\">Highlight and Share<\/a> or <a href=\"https:\/\/wordpress.org\/plugins\/quotable\/\" target=\"_blank\">Quotable<\/a> or&#8230;you can try ours! We\u2019ve provided a step-by-step guide on how you can achieve this great microinteraction right <a href=\"https:\/\/wpmudev.com\/blog\/select-text-and-tweet\/?ptm=c&amp;utm_expid=3606929-108.O6f5ypXuTg-XPCV9sY1yrw.2&amp;utm_referrer=https%3A%2F%2Fwww.google.com.au%2F\" target=\"_blank\">here<\/a>.<\/p>\n<p>If you\u2019re not big on Twitter, you can try adding fun microinteractions for other social media websites, like Facebook. The <a href=\"https:\/\/wordpress.org\/plugins\/fb-quote-for-wp\/\" target=\"_blank\">FB Quote Plugin<\/a> lets you share highlighted text on Facebook in the same way our Twitter plugin does.<\/p>\n<h2>Microinter-like-tions<\/h2>\n<p>If you\u2019re jonesing for something in the same vein as the social media microinteractions (but not quite!), don\u2019t worry\u2014we\u2019ve got you.<\/p>\n<p>Adding customizable likes to your WordPress posts is a great fun little microinteractions that allows your readers and visitors to really&#8230;well, <i>interact<\/i> with you.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/07\/likes_example.gif\" alt=\"Likes example\" width=\"134\" height=\"82\" \/><\/p>\n<p>An interesting plugin that allows you to do this is\u00a0<a href=\"https:\/\/wordpress.org\/plugins\/i-recommend-this\/\" target=\"_blank\">I Recommend This<\/a>. It lets you add like hearts or recommend icons to your WordPress posts.<\/p>\n<p>It\u2019s always nice to have an element you deal with on a regular basis behave in an interesting manner. Even if the \u201cinteresting manner\u201d is just a small animation, it greatly improves the user\u2019s experience with your website.<\/p>\n<h2>Wrapping Up<\/h2>\n<p>Microinteractions are there to make a user\u2019s life easier. It\u2019s important not to get carried away with too many gimmicky microinteractions that have the potential to disrupt rather than instruct. Your microinteractions should facilitate actions and tasks while seamlessly integrating with your website\u2019s overall design\u2014they should never be the main focus.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>They say the devil is in the details, but that is not true when it comes to user experience. A good microinteraction should facilitate or embellish an otherwise tedious task in a very subtle way\u2014a bad microinteraction can ruin your experience with a website or product. Even though they\u2019re \u201cmicro,\u201d it doesn\u2019t mean that microinteractions [&hellip;]<\/p>\n","protected":false},"author":571550,"featured_media":166853,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[263],"tags":[38],"tutorials_categories":[],"class_list":["post-166721","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-design"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/166721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/571550"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=166721"}],"version-history":[{"count":11,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/166721\/revisions"}],"predecessor-version":[{"id":204432,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/166721\/revisions\/204432"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/166853"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=166721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=166721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=166721"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=166721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}