We are hiring

Web Design Tidbits #5: Twitter search form

Twitter search form

In a series of blog posts, we’ll discuss web design’s best practices when it comes to usability, responsiveness and accessibility. We care about great design and we’d love to show you that a little CSS love goes a long way. In this post I’ll look at the Twitter search form, to replicate its elegant design.

Recreating the Twitter search form

Now Twitter wraps it’s elements in a whole lot of divs and spans. I’ll drill it down to the input-element and button, to keep things accessible. Using only HTML, our search form looks a bit ‘boxy’.

Next we’ll write the style sheet to display a nice search form with rounded corners, that reminds me somewhat of a submarine. The button-element is used for the magnifying-glass in the search box, which we simply borrow from Twitter. You’ll end up with a HTML & CSS representation of the Twitter search form that looks like this:

Twitter search form on Codepen

Neat, huh? Feel free to play around with this Codepen! If you have a request for an upcoming edition of the Tidbits series, let us know in the comments!

[{"code":""30 days before Christmas
[{"code":""30 days before Christmas
is my 30 days of happiness"."
is my 30 days of happiness"."
"label":"30 days free trial"
"label":"30 days free trial"
"win":true}
"win":true}
{"code":""I'm up in the sky with joy about this Free Upgrade"."
{"code":""I'm up in the sky with joy about this Free Upgrade"."
"label":"Free Upgrade"
"label":"Free Upgrade"
"win":true}
"win":true}
{"code":""25% off for 6 months? Yaaas!" Or simply apply coupon BLACK25 upon check out."
{"code":""25% off for 6 months? Yaaas!" Or simply apply coupon BLACK25 upon check out."
"label":"25% Off Coupon"
"label":"25% Off Coupon"
"win":true}
"win":true}
{"code":""I love Usersnap so much I'm going to wear it"."
{"code":""I love Usersnap so much I'm going to wear it"."
"label":"Usersnap Tshirt"
"label":"Usersnap Tshirt"
"win":true}
"win":true}
{"code":""30 days before Christmas
{"code":""30 days before Christmas
is my 30 days of happiness"."
is my 30 days of happiness"."
"label":"30 days free trial"
"label":"30 days free trial"
"win":true}
"win":true}
{"code":""I'm up in the sky with joy about this Free Upgrade"."
{"code":""I'm up in the sky with joy about this Free Upgrade"."
"label":"Free Upgrade"
"label":"Free Upgrade"
"win":true}
"win":true}
{"code":""
{"code":""
"label":"Not your day!"
"label":"Not your day!"
"win":false}
"win":false}
{"code":""25% off for 6 months? Yaaas!" Or simply apply coupon BLACK25 upon check out."
{"code":""25% off for 6 months? Yaaas!" Or simply apply coupon BLACK25 upon check out."
"label":"25% Off Coupon"
"label":"25% Off Coupon"
"win":true}
"win":true}
{"code":""30 days before Christmas
{"code":""30 days before Christmas
is my 30 days of happiness"."
is my 30 days of happiness"."
"label":"30 days free trial"
"label":"30 days free trial"
"win":true}
"win":true}
{"code":""I'm up in the sky with joy about this Free Upgrade"."
{"code":""I'm up in the sky with joy about this Free Upgrade"."
"label":"Free Upgrade"
"label":"Free Upgrade"
"win":true}
"win":true}
{"code":""
{"code":""
"label":"Spin again"
"label":"Spin again"
"win":false}
"win":false}
{"code":""
{"code":""
"label":"Trip to Vienna"
"label":"Trip to Vienna"
"win":false}]
"win":false}]