{"id":164624,"date":"2017-05-11T13:00:23","date_gmt":"2017-05-11T13:00:23","guid":{"rendered":"https:\/\/premium.wpmudev.org\/blog\/?p=164624"},"modified":"2017-05-08T02:19:00","modified_gmt":"2017-05-08T02:19:00","slug":"microinteractions-wordpress","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/microinteractions-wordpress\/","title":{"rendered":"How Microinteractions Make Boring Websites Larger Than Life (and How to Add Them to WordPress)"},"content":{"rendered":"<p>Microinteractions are single-case interactions that revolve around the use of a product or technology. They are <strong>everywhere<\/strong> in the real world and online. Maybe you&#8217;ve noticed them, maybe you haven&#8217;t. But one thing&#8217;s for sure: their proper use (or misuse) can make or break a product.<\/p>\n<p>In this articles, we&#8217;ll take a\u00a0closer look at microinteractions and how you can use them to improve the user experience of your WordPress website.<\/p>\n<h2>What are Microinteractions?<\/h2>\n<p>An example of a familiar microinteraction is the use of a hyperlink on the web. Links are usually underlined and change when you hover over them. These two elements have become ingrained in us so deeply that we instinctively know what to do with them. We don&#8217;t have to think twice and there&#8217;s no confusion.<\/p>\n<p>If you show a webpage to someone who has never used the internet before, they may not know what to do with a link, perhaps mistaking it for simple highlighted text.<\/p>\n<h3>Why Microinteractions Matter<\/h3>\n<p>For newcomers to a product or service, microinteractions serve as sensory cues, establishing a pattern. But for the initiated, they provide familiarity, which increases user happiness and also leads to usage efficiency.<\/p>\n<h3>Catering to Preconceptions<\/h3>\n<p>When creating microinteractions you&#8217;ll need to cater to user preconceptions. Let me show you what I mean by looking at a great article named <a href=\"http:\/\/microinteractions.com\/what-is-a-microinteraction\/\" target=\"_blank\">What is a microinteraction<\/a>.<\/p>\n<p>If you view the article and scroll down you&#8217;ll see the Vine embeds. Even if they don&#8217;t display the &#8220;click for sound&#8221; text, you&#8217;ll know what the icon is in the bottom-right. Clicking in it will give you sound: your preconception has been fulfilled.<\/p>\n<p>Now, scroll down to the very bottom and click on the image under the &#8220;The Structure Of Microinteractions&#8221; image. It opens in a lightbox, so press escape to go back to the article. Ooops, it didn&#8217;t work! The display isn&#8217;t actually a lightbox, it&#8217;s a static image file.<\/p>\n<p>Not only can the user not press escape, but might not understand what&#8217;s happened, and may need a few seconds to stop smashing escaping and click back.<\/p>\n<h3>Microinteractions in WordPress<\/h3>\n<p>So where are microinteractions in WordPress? Any time you interact with anything you&#8217;ll see one. From menu hovers to clicking buttons and saving comments.<\/p>\n<div  class=\"wpdui-pic-large   \" >\n<figure class=\"wp-caption alignnone\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-1050x1050 size-1050x1050\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/05\/comment-microinteraction.gif\" alt=\"Comment Microinteraction\" width=\"1046\" height=\"488\" \/><figcaption class=\"wp-caption-text\">A comment microinteraction.<\/figcaption><\/figure>\n<\/div>\n<p>The gif above shows a couple. Take special notice of clicking the update comment button. A little loader is displayed immediately which lets me know that everything is going as planned. My interaction was successful, I just need to wait for things to be saved.<\/p>\n<h2>Microinteractions on Websites<\/h2>\n<p>Far more important than the WordPress backend is how your visitors will interact with your site.<\/p>\n<p>Here are a couple of examples I like from the wild, and not necessarily from WordPress sites:<\/p>\n<h3>Svbtle<\/h3>\n<p>On the Svbtle blogging website, when you give\u00a0kudos to someone there&#8217;s a cute animation that makes it pretty obvious your kudos has been delivered.<\/p>\n<div  class=\"wpdui-pic-regular  \">\n<figure class=\"wp-caption alignnone\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/05\/kudos.gif\" alt=\"Giving kudos to a Svbtle article\" width=\"600\" height=\"308\" \/><figcaption class=\"wp-caption-text\">Giving kudos to a Svbtle article<\/figcaption><\/figure>\n<\/div>\n<h3>Tinder<\/h3>\n<p>If you&#8217;ve used Tinder before, you&#8217;ll be more than familar with swiping. This microinteraction, which is reminiscent of turning a page in a book, is easy to understand, repeat and enjoy.<\/p>\n<div  class=\"wpdui-pic-regular  \">\n<figure class=\"wp-caption alignnone\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/05\/tinder.jpg\" alt=\"A Tinder swipe is a great microinteraction - easy to understand, repeat and enjoy\" width=\"350\" height=\"600\" \/><figcaption class=\"wp-caption-text\">A Tinder swipe.<\/figcaption><\/figure>\n<\/div>\n<h3>Facebook<\/h3>\n<p>When you hover over a\u00a0&#8220;Like&#8221; button on Facebook, you can choose to use an emotion. Another great microinteraction.<\/p>\n<div  class=\"wpdui-pic-regular  \">\n<figure class=\"wp-caption alignnone\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/05\/like.gif\" alt=\"The all-mportant Facebook Like\" width=\"600\" height=\"374\" \/><figcaption class=\"wp-caption-text\">The all-important Facebook Like.<\/figcaption><\/figure>\n<\/div>\n<p>Note that many of these microinteractions have subtly tuned animations. Getting microinteractions <em>just right<\/em> is key to making them fit within a workflow and be a pleasure to use.<\/p>\n<h2>Creating Your Own Microinteractions<\/h2>\n<p>A combination of CSS and JavaScript can be used to create some great functionality with relative ease. For this section of the article, I&#8217;ll presume you know how to make themes so we&#8217;ll just focus on the interactions themselves.<\/p>\n<h3>Creating a Nice Menu Experience<\/h3>\n<div  class=\"wpdui-pic-regular  \">\n<figure class=\"wp-caption alignnone\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/05\/Menu.gif\" alt=\"A simple, but effective menu microinteraction\" width=\"600\" height=\"134\" \/><figcaption class=\"wp-caption-text\">A simple, but effective menu microinteraction<\/figcaption><\/figure>\n<\/div>\n<p>To create this microinteraction all you need is CSS. Links consist of an outer hyperlink container which is set to be a block level element. Each contains two spans with the two lines of text. On hover, the top border becomes higher, the bottom text starts gaining opacity and looses its negative bottom margin. Check it out:<\/p>\n<div class=\"gist\" data-gist=\"df0e7215ca50adebc4cec6846689fc4c\" data-gist-file=\"menu.html\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/df0e7215ca50adebc4cec6846689fc4c.js?file=menu.html\">Loading gist df0e7215ca50adebc4cec6846689fc4c<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div><br \/>\n<div class=\"gist\" data-gist=\"df0e7215ca50adebc4cec6846689fc4c\" data-gist-file=\"menu.css\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/df0e7215ca50adebc4cec6846689fc4c.js?file=menu.css\">Loading gist df0e7215ca50adebc4cec6846689fc4c<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h3>Better Links<\/h3>\n<div  class=\"wpdui-pic-regular  \">\n<figure class=\"wp-caption alignnone\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/05\/better-link.gif\" alt=\"A link showing useful information about the target\" width=\"600\" height=\"238\" \/><figcaption class=\"wp-caption-text\">A link showing useful information about the target\/<\/figcaption><\/figure>\n<\/div>\n<p>This requires a little bit of Javascript, but only because the target is parsed out of the URL.<\/p>\n<div class=\"gist\" data-gist=\"df0e7215ca50adebc4cec6846689fc4c\" data-gist-file=\"link.html\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/df0e7215ca50adebc4cec6846689fc4c.js?file=link.html\">Loading gist df0e7215ca50adebc4cec6846689fc4c<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div><br \/>\n<div class=\"gist\" data-gist=\"df0e7215ca50adebc4cec6846689fc4c\" data-gist-file=\"link.css\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/df0e7215ca50adebc4cec6846689fc4c.js?file=link.css\">Loading gist df0e7215ca50adebc4cec6846689fc4c<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div><br \/>\n<div class=\"gist\" data-gist=\"df0e7215ca50adebc4cec6846689fc4c\" data-gist-file=\"link.js\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/df0e7215ca50adebc4cec6846689fc4c.js?file=link.js\">Loading gist df0e7215ca50adebc4cec6846689fc4c<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>I used a little vanilla JS, no jQuery or other library is necessary for such a simple task. If you want to forgo the JS, or you are creating these links manually, you could put any text in the data-target attribute, say: <code>data-target=\"To Wikipedia!\"<\/code> and it will work just fine.<\/p>\n<h2>Conclusion<\/h2>\n<p>This was just a brief introduction to the world of microinteractions. As interactions become more and more complex &#8211; like paying for a product &#8211; you&#8217;ll need to do more and more work and testing.<\/p>\n<p>The good news is that these are <strong>micro<\/strong> interactions. You don&#8217;t always need to focus on the whole process, first make sure that your loading button is nice and smooth. Then turn your attention to a better card number input system.<\/p>\n<p>Remember, it&#8217;s the sum of all these little parts that matter, how they come together into on cohesive whole. Make one little interaction better, and your whole website just got better!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microinteractions are single-case interactions that revolve around the use of a product or technology. They are everywhere in the real world and online. Maybe you&#8217;ve noticed them, maybe you haven&#8217;t. But one thing&#8217;s for sure: their proper use (or misuse) can make or break a product. In this articles, we&#8217;ll take a\u00a0closer look at microinteractions [&hellip;]<\/p>\n","protected":false},"author":344049,"featured_media":164686,"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":[557],"tags":[38],"tutorials_categories":[],"class_list":["post-164624","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-design"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/164624","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\/344049"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=164624"}],"version-history":[{"count":13,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/164624\/revisions"}],"predecessor-version":[{"id":164803,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/164624\/revisions\/164803"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/164686"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=164624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=164624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=164624"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=164624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}