{"id":3054,"date":"2017-04-24T15:48:29","date_gmt":"2017-04-24T20:48:29","guid":{"rendered":"http:\/\/cssnewbie.com\/?p=2224"},"modified":"2017-04-24T15:48:29","modified_gmt":"2017-04-24T20:48:29","slug":"8-awesome-css-textarea-snippets","status":"publish","type":"post","link":"https:\/\/cssdeck.com\/blog\/8-awesome-css-textarea-snippets\/","title":{"rendered":"8 Awesome CSS Textarea Snippets"},"content":{"rendered":"<p>Textareas are HTML elements that are meant for inputting large amounts of text. They differ from input fields because they are a lot larger than a typical input field, and can be manually resized by the user to accommodate a great deal of text. Most developers and designers don&#8217;t pay a whole lot of attention to textareas when it comes to style, and that&#8217;s totally fine, but if you&#8217;re looking to add a little flair to your plain textareas, check out this curated collection of stylish textarea snippets from around the web. You&#8217;re sure to find something you like enough to include in your next project.<\/p>\n<p>1. \u00a0<a href=\"http:\/\/codepen.io\/lonekorean\/pen\/gaLEMR\" target=\"_blank\" rel=\"noopener noreferrer\">Highlighted Text in a Textarea<\/a><\/p>\n<p><a href=\"http:\/\/codepen.io\/lonekorean\/pen\/gaLEMR\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2232 aligncenter\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-19-at-4.43.42-PM.png\" alt=\"Screen Shot 2017-04-19 at 4.43.42 PM\" width=\"643\" height=\"270\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This snippet uses a cool CSS hack to generate a highlighting effect within a textarea. As you can see from the screenshot, it&#8217;s not technically possible to render markup within a textarea element, but this snippet shows you how you can fake a similar effect by positioning a div behind the textarea and adding your desired highlights within that div.<\/p>\n<p>2. <a href=\"http:\/\/codepen.io\/kpourdeilami\/pen\/KDepk\" target=\"_blank\" rel=\"noopener noreferrer\">Auto-expanding Textarea<\/a><\/p>\n<p><a href=\"http:\/\/codepen.io\/kpourdeilami\/pen\/KDepk\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2233 aligncenter\" src=\"http:\/\/cssnewbie.com\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-19-at-4.47.02-PM-1024x389.png\" alt=\"Screen Shot 2017-04-19 at 4.47.02 PM\" width=\"632\" height=\"240\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This one is really cool. This snippet uses Angular to create a textarea that expands dynamically based on how much content is within it. The user is still given the option to manually expand the textarea, but that shouldn&#8217;t be necessary when it expands on its own.<\/p>\n<p>3. <a href=\"http:\/\/codepen.io\/mmoustafa\/pen\/lBwhv\" target=\"_blank\" rel=\"noopener noreferrer\">Hidden Navigation With Textarea<\/a><\/p>\n<p><a href=\"http:\/\/codepen.io\/mmoustafa\/pen\/lBwhv\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2234 aligncenter\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-19-at-4.48.51-PM.png\" alt=\"Screen Shot 2017-04-19 at 4.48.51 PM\" width=\"653\" height=\"382\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This innovate snippet uses the textarea element&#8217;s built-in expand feature to create a hidden menu that can be pulled in and out of view. The effect is really versatile and can be used for a lot of purposes.<\/p>\n<p>4. <a href=\"http:\/\/codepen.io\/steinvc\/pen\/kxbgH\" target=\"_blank\" rel=\"noopener noreferrer\">Notebook Textarea<\/a><\/p>\n<p><a href=\"http:\/\/codepen.io\/steinvc\/pen\/kxbgH\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2235 aligncenter\" src=\"http:\/\/cssnewbie.com\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-19-at-4.51.31-PM-1024x407.png\" alt=\"Screen Shot 2017-04-19 at 4.51.31 PM\" width=\"637\" height=\"253\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This fun CSS snippet styles your textarea to look like a piece of paper from a composition notebook. The effect is complemented by the use of the old-fashioned typewriter-style font.<\/p>\n<p>5. <a href=\"http:\/\/codepen.io\/levchenkod\/pen\/VYKXOR\" target=\"_blank\" rel=\"noopener noreferrer\">Twemoji<\/a><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/codepen.io\/levchenkod\/pen\/VYKXOR\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-2236\" src=\"http:\/\/cssnewbie.com\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-19-at-4.54.04-PM-1024x376.png\" alt=\"Screen Shot 2017-04-19 at 4.54.04 PM\" width=\"561\" height=\"206\" \/><\/a><\/p>\n<p style=\"text-align: left;\">This snippet is for a plugin that allows you to easily add dozens upon dozens of cool emojis (along with text) to any textarea box just like you would when typing a text message on your phone.<\/p>\n<p style=\"text-align: left;\">6. <a href=\"http:\/\/codepen.io\/michaellee\/pen\/JdbqGW\" target=\"_blank\" rel=\"noopener noreferrer\">What You See is What You Get Editor<\/a><\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/codepen.io\/michaellee\/pen\/JdbqGW\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-2237 aligncenter\" src=\"http:\/\/cssnewbie.com\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-19-at-4.55.43-PM-1024x527.png\" alt=\"Screen Shot 2017-04-19 at 4.55.43 PM\" width=\"692\" height=\"356\" \/><\/a><\/p>\n<p style=\"text-align: left;\">Another cool textarea snippet, this one creates a rich text editor, also known as a What You See is What You Get (WYSIWYG) editor out of a simple textarea element, so that the text within the element can be easily formatted by the user even if they have no coding knowledge.<\/p>\n<p style=\"text-align: left;\">7. <a href=\"http:\/\/codepen.io\/geertjanhendriks\/pen\/nztgv\" target=\"_blank\" rel=\"noopener noreferrer\">Under the Sea Contact Form<\/a><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/codepen.io\/geertjanhendriks\/pen\/nztgv\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-2238\" src=\"http:\/\/cssnewbie.com\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-19-at-4.58.40-PM-1024x461.png\" alt=\"Screen Shot 2017-04-19 at 4.58.40 PM\" width=\"615\" height=\"277\" \/><\/a><\/p>\n<p style=\"text-align: left;\">Most contact forms usually contain some sort of textarea element where the main message is meant to be written. This snippet gets creative when styling the input fields and textarea by paying homage to the sea and some of its lovely creatures.<\/p>\n<p style=\"text-align: left;\">8. <a href=\"http:\/\/codepen.io\/geertjanhendriks\/pen\/nztgv\" target=\"_blank\" rel=\"noopener noreferrer\">Character Counter Textarea<\/a><\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/codepen.io\/geertjanhendriks\/pen\/nztgv\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2239 aligncenter\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-19-at-5.01.04-PM.png\" alt=\"Screen Shot 2017-04-19 at 5.01.04 PM\" width=\"597\" height=\"268\" \/><\/a><\/p>\n<p style=\"text-align: left;\">If you&#8217;d like to add a limit to the amount of characters\u00a0that your users can enter into your textareas and\/or\u00a0if you&#8217;d like to display a character counter with your textareas, this snippet can help you to achieve both. Both features are created using this snippet, so simply customize the code to fit the exact needs of your projects and websites.<\/p>\n<div class=\"wp-socializer wpsr-share-icons \" data-lg-action=\"show\" data-sm-action=\"show\" data-sm-width=\"768\" ><h3>Share and Enjoy !<\/h3><div class=\"wpsr-si-inner\"><div class=\"wpsr-counter wpsrc-sz-32px\" style=\"color:#000\"><span class=\"scount\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook,twitter,linkedin,pinterest,print,pdf\">0<\/span><\/span><small class=\"stext\">Shares<\/small><\/div><div class=\"socializer sr-popup sr-32px sr-circle sr-opacity sr-pad sr-count-1 sr-count-1\"><span class=\"sr-facebook\"><a rel=\"nofollow\" href=\"https:\/\/www.facebook.com\/share.php?u=\" target=\"_blank\"  title=\"Share this on Facebook\"  style=\"color: #ffffff\" ><i class=\"fab fa-facebook-f\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-twitter\"><a rel=\"nofollow\" href=\"https:\/\/twitter.com\/intent\/tweet?text=%20-%20%20\" target=\"_blank\"  title=\"Tweet this !\"  style=\"color: #ffffff\" ><i class=\"fab fa-twitter\"><\/i><\/a><\/span>\n<span class=\"sr-linkedin\"><a rel=\"nofollow\" href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=\" target=\"_blank\"  title=\"Add this to LinkedIn\"  style=\"color: #ffffff\" ><i class=\"fab fa-linkedin-in\"><\/i><\/a><\/span>\n<span class=\"sr-pinterest\"><a rel=\"nofollow\" href=\"https:\/\/www.pinterest.com\/pin\/create\/button\/?url=&amp;media=&amp;description=\" target=\"_blank\"  title=\"Submit this to Pinterest\"  style=\"color: #ffffff\" data-pin-custom=\"true\"><i class=\"fab fa-pinterest\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"pinterest\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-print\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Print this article \"  style=\"color: #ffffff\" ><i class=\"fa fa-print\"><\/i><\/a><\/span>\n<span class=\"sr-pdf\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Convert to PDF\"  style=\"color: #ffffff\" ><i class=\"fa fa-file-pdf\"><\/i><\/a><\/span><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Textareas are HTML elements that are meant for inputting large amounts of text. They differ from input fields because they are a lot larger than a typical input field, and can be manually resized by the user to accommodate a [&#8230;]<\/p>\n<p><a class=\"more-link article\" href=\"https:\/\/cssdeck.com\/blog\/8-awesome-css-textarea-snippets\/\" title=\"Click to read '8 Awesome CSS Textarea Snippets'\">Read Article<\/a><\/p>\n","protected":false},"author":18,"featured_media":2236,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/3054"}],"collection":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/comments?post=3054"}],"version-history":[{"count":0,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/3054\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/media\/2236"}],"wp:attachment":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/media?parent=3054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/categories?post=3054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/tags?post=3054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}