Design a Horizontal Accordion Slider (Plus an Exclusive Freebie!)

Design a Horizontal Accordion Slider (Plus an Exclusive Freebie!)

Tutorial Details
  • Program: Adobe Photoshop CS2+
  • Difficulty: Beginner
  • Estimated Time: 1hr

Final Product What You'll Be Creating

Today we’re going to walk through the creation of your very own horizontal accordion together with an exclusive bonus – a light version of the very same accordion we’ll be creating today.

Accordion’s are great for showing off your favourite images, posts, or perhaps compacting a product feature tour. If you’re going to add a little pizazz to your accordion, you should take a look at SlideDeck – mega simple to work with.


Note: Accordion Layer Setup

During the course of this tutorial there will be references to different layers and layer groups – this can be a little confusing. As a reference, below is an image of the final layer groups used just in case you get a little stuck :)

Create an Accordion Slider

Step 1 Creating the Background

Open up Adobe Photoshop and create a new document with the following settings: 1100×490 pixels, 72ppi, and a white background.

Using the Rectangle Tool (U), create a rectangle that covers the entire surface area of the canvas. Fill this rectangle with a light grey colour (#f2f2f2) and apply a noise filter (Filter > Noise > Add Noise) with the following settings:

  • Amount: 1%
  • Distribution: Uniform
  • Monochromatic: Yes

Place this layer in it’s own layer group called “bg”.

Create an Accordion Slider

Step 2 Creating the Accordion Frame

Create a new layer group called “accordion” and within this group yet another group called “frame”. This is where all the layers making up the frame will live.

Select the Rounded Rectangle Tool (U) and ensure that you have the following settings

  • Drawing Mode: Shape Layers
  • Border Radius: 4px
  • Fill Colour: #2d2d2d
Create an Accordion Slider

Step 3

Using guides, mark out an area of 940px x 360px centrally on the canvas. With the Rounded Rectangle Tool still selected, draw a rectangle within the guides you just created. For accuracy you should enable “Snap to Guides” which can be found in View > Snap To > Guides.

Create an Accordion Slider

Step 4

Convert the rectangle to a Smart Object by going to “Layer > Smart Objects > Convert to Smart Objects” or by right-clicking on the layer in the layers palette and selecting “Covert to Smart Object”.

Apply a drop shadow to the Smart Object and also a noise filter with the same settings as before.

Create an Accordion Slider

Why Smart Objects? Smart Objects allow us to apply filters and styles without rasterising the original artwork. This comes in particularly handy when you want to edit part of the design later.


Step 5

Mark out another area 10px inside the rectangle you have already created – this should be 920px x 340px in size. Draw another rounded rectangle within these guides and convert to Smart Object. Will will assume that there is a light source directly above the accordion shining down. Apply the following layer styles.

Create an Accordion Slider
Create an Accordion Slider
Create an Accordion Slider

You should end up with the following result:

Create an Accordion Slider

Step 6 Creating the Spines

We’re now done with the frame and can make a start on the spines. Create a new layer set called spine and mark out an area 50px x 330px set 5px inside the frame backing. Draw a rounded rectangle inside these guides using #313131 as the fill colour. You should end up with the following (zoomed)

Create an Accordion Slider

Step 7

Convert this rectangle to a Smart Object, apply a noise filter and the following layer styles.

Create an Accordion Slider
Create an Accordion Slider

You should be left with the following:

Create an Accordion Slider

Step 8

Create yet another rounded rectangle on top of the spine you just created, fill this with white. With the white rectangle selected in the layers palette, click the “Add Vector Mask” icon to add a mask.

Keeping the rectangle layer selected, select the Gradient Tool (G) ensuring that the gradient selected is “Foreground to Transparent” and your foreground colour is set to black. Click and drag a vertical line down the length of the spine. Once you have created your gradient set the entire layer to 5% opacity.

Create an Accordion Slider

Step 9

Using the Horizontal Type Tool (T) type out your required slide label in a light grey colour, I’ve used #dddddd. Using the Transform Tool (CMD/CTRL+T) rotate the text holding down the shift key. Align the text to the right using the Paragraph palette and position it at the top of the spine. Apply a drop shadow.

Create an Accordion Slider

Step 10

Using the Type Tool once again, type out the spine number using a dark colour, I have used #191919. Position the number at the bottom of the spine and apply another drop shadow.

Create an Accordion Slider

Step 11

Now we have finished creating a spine we can simply duplicate the entire layer set three times creating four in total. Position the three duplicated spines alongside the original with 5px margins inbetween.

Create an Accordion Slider

Step 12

To create a hover state for the spines, open up one of the duplicated spine layer groups and find the layer we applied a gradient to earlier. This should be set to 5% opacity, change it to 10%

Create an Accordion Slider

Step 13 Creating the Content Area

In the void that you are left with, mark out an area with your guides 5px from any surrounding element. This should be 690px x 330px is size. Using a light colour, draw a rounded rectangle within these guides.

Create an Accordion Slider

Step 14

You can fill this area with whatever content you require however I’m going to fill this area with a screenshot. Paste the screenshot into the document, position as required and disregard for the time being. As the image is too large for the content area we need to mask it off. In the layers palette, hold down CMD/CTRL and click the vector mask of the rectangle we created earlier – this will create a selection of the shape.

Create an Accordion Slider

Step 15

Select the screenshot layer in the layers palette and while the marching ants are still on your screen, click the “Add to Vector Mask” icon – this will mask off the unwanted areas.

Create an Accordion Slider

Step 16 Creating the Shadow

The last step is to create the shadow that sits under the accordion. Create a new layer set called shadow and using the Ellipse Tool (U) create a shape similar to below.

Create an Accordion Slider

Step 17

Apply a Gaussian Blur (Filter > Blur > Gaussian Blur) with a radius of around 10px. The exact amount is not important and it is often better to judge “by eye”. Change the opacity of the layer to 30% and position the shadow under the accordion.

The trick here is not to generate the shadow with a single layer but with multiple layers of varying sizes and opacity. Duplicate the shadow we just created, use the Transform Tool to make it slightly smaller in width and height and change the opacity to 80%. Repeat this process with the final shadow being just a few pixels wider than the accordion base.

Create an Accordion Slider

Finished!

That’s it, we’re done! now you can fill each content area with your required content and add a stylish looking accordion to your latest design!

Create an Accordion Slider

Bonus File: Horizontal Accordion “Light”

With a few changes to fill colours and layer styles you can begin to create some interesting alternatives. Here I’ve created a “light” version of the accordion within just a few minutes to demonstrate the possibilities.

Remember the Smart Objects? They really come into play here as you can still edit the original artwork (to change colours) while keeping all filters, such as noise, applied to the shape. If we had rasterised all the layers when creating the original accordion, we would have to redraw all the shapes when creating new styles. No thanks!

Create an Accordion Slider

Orman Clark is ormanclark on Themeforest
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.dazydude.net Rik de Vos

    Wow, that looks great!

    Thanks,
    Rik de Vos

  • http://www.hiddendepth.ie Dave

    Would this Tut not be better suited in PSD Tuts as it doesn’t actually give any code for the Accordion.

    Please tell me there is a code version in the pipeline as there doesn’t seem to be anywhere with a good horizontal accordion tutorial.

    • http://themeforest.net/user/epicera/portfolio?ref=epicera Brandon Jones

      Hi Dave, We didn’t plan on a coding tutorial since Slidedeck is a complete solution and that’s what Orman designed it after, but I’ll see if I can’t whip something up :)

    • http://mcclanegames.com ev149

      I think it’s fine here since this is Webdesigntuts+, not Webdevelopmenttuts+. Perhaps the coding should go on Nettuts+…

  • Derk

    Since this is webdesigntuts+ part 2 coding it? :D

    • http://themeforest.net/user/epicera/portfolio?ref=epicera Brandon Jones

      We didn’t plan on it initially, but I’ll see if I can’t whip together a tutorial for coding this up (or implementing it with SlideDeck).

      • http://www.slidedeck.com Chuck

        Thanks for a great post. Orman’s work never disappoints.

        We’d be happy to work with you guys on a post of how to build this into a SlideDeck skin for both the jQuery and WordPress version.

        We’d also freely share the skin with the SlideDeck community and credit Orman for the design and Dave for the dev. Just let us know.

        • http://montanaflynn.me Montana Flynn

          I’d love to see this design on slidedeck!

  • http://tonyharrison.tumblr.com Stephen

    I love all premium pixel stuff! Good work Orman!

  • Seth

    Awesome tut! It’s really a beautiful accordion design. I, too, would love to see this coded up :)

  • Brock Nunn

    Would love to see a coding tut, I am trying to get away from using pure plugins, because I really should focus on script/jQuery knowledge. I always seem to default to the nivo slider on my designs.

  • http://www.hiddendepth.ie Dave

    Thanks Brandon, Slidedeck is fine but building something from the ground up means we understand the coding and can adapt it to suit our or our clients websites and needs.

    I really don’t like how the Slidedeck WordPress plugin works and would much prefer to have a simple tutorial here, create my own slide and then use a custom post type with some custom fields in it. WordPress has custom fields plugins for free but I prefer to add these in myself as I can then adapt to exactly my requirement.

    I think a tut that puts each slide in as divs would be great. that way we can add whatever content, images, etc. into the slide without affecting the size of the outter div. A basic slider and then ability to create standalone themes would be the ideal tut. Fingers crossed :)

    • http://themeforest.net/user/epicera/portfolio?ref=epicera Brandon Jones

      Thanks Dave – you provide all the reason necessary for the coded portion and I think it’s a great idea (even if it ends up running over at Nettuts since it’s a code based tut) – check back in a week or two to see when it’s complete :)

      • http://www.hiddendepth.ie Dave

        Cheers Brandon, music to my ears that the code version will go ahead. If you need a guinea pig for any of it let me know.

        Would be great to have a tutorial which ran through a website design project from start to finish and then linked to all the other great relevant tuts throughout the network.
        E.G. It started here and described the layout of a site, the general pages and an index of the entire project. Then linked to various layouts on PSDTuts, coded plugins on NETTuts, content advice for that page in The NetSetter column in WorkAwesome, then onto codecanon for some cool plugings or graphicsriver for creative extra touches. So basically the tut on this site would be an index of what people need to make great sites.

        I think a tut covering a different page of a site every week or month would be amazing. I see nearly every tutorial on every site concentrate on the home page. Don’t get me wrong these are great tutorials but so many sites have a great home page and the rest really lacks any creativity or time & care spent on it. I want to see tutorials to help people create stunning testimonials pages, informative about pages, services pages using clever info graphics, etc.

        What if you proposed 4-5 tuts a month in advance and let everyone vote on which one they want to learn. Anyway thanks for this tut and can’t wait for the code version.

  • Matt27

    Awesome tutorial.

    Really hope a coding tutorial is in the works as well, sure it will be a popular one!

  • http://connorcrosby.me Connor Crosby

    Excellent tutorial. I as well would like to see a coded version of this tutorial.

  • Keiran

    This is webdesigntuts, why is everyone asking for the code, that’s what nettuts is for :) great looking accordion.

    • http://envexlabs.com Matt Vickers

      I’m assuming that it’s because a lot of the web designers on this site do both design and development. Which, IMO, all web designer should know how to code their designs.

  • Jimbo

    Great tutorial. Webdesigntuts should be all about design leave the coding to nettuts.

  • Bas

    Great tut.

    You could use Easy Accordion from Andrea Cima Serniotti free alternative to Slidedeck for design implementation.
    http://www.madeincima.eu/blog/jquery-plugin-easy-accordion/

  • Ciwan

    This is wonderful !

    How does one apply this to an ASP.NET Accordion Control ?

  • http://www.pixelarama.com Pierre

    Great tutorial Orman. Appreciate the effort you put into all of your work.

    What I thought really stood out from this tut is the way you explain why you used a certain function or chose to do something a certain way. It helps readers grasp not only what the technique is, but when to apply said technique.

    Cheers, Pierre

  • http://mixmo-anime.blogspot.com kankaro

    Thanks for the great tuts Mr. Orman, this is one of the awesome tuts I’ve read… by the way I hope sometimes there’s a code package by this kind of tuts, so that we know how to code it or we have a knowledge on how to do it…

    thanks a lot once again :D god bless !

  • http://www.techwench.com techwench

    its great work
    thanks!!!
    ……

  • http://www.wehavewebfun.com Chris Beard

    All this talking about integrating the slider with the psd got me inspired!
    I wanted to integrate something slide-y after reading this, and I did!
    You can view the result here : http://wehavewebfun.com/projects/showhideslide/
    Thanks a lot =] I check this site for updates over 10 times a day, you guys give me truckloads of inspiration.

  • Tim

    Awesome tutorial, thnx!!

  • http://www.pixelglow.ro SeeL

    It-s an awesome tutorial and very easy to understand. Thank you.

  • Pingback: Kasım 2010′un En Popüler Photoshop Dersleri | Superkodlar

  • Pingback: Kasım 2010′un En Popüler Photoshop Dersleri

  • http://www.stav.co Mathias M. Stav

    Nice tutorial! I made a pure css slider out of this. Not a perfect copy, but looking a lot the same. Check it out at http://www.csslider.com/

  • http://newdynamicmedia.com/ Oksana

    Thanks, it looks very nice and clean. Will use it for my next project :)

  • http://nicolahibbert.com Nikki

    I created a horizontal accordion plugin for jQuery based on Orman’s design. You can find the plugin here: http://nicolahibbert.com/demo/liteAccordion/

    Thanks!

  • Step 15

    Step 15′s image is not showing for some reason. Tried clearing my cache + F5 already but still not showing.

  • Yousuf

    Hi
    thank you very much about this lesson
    but I want to know how to put this design in my personal website (not forum)
    and make it slied
    as you know I am beginner and I read about jquery and css but I understand nothing
    pleas If you can help me
    I don’t forget you favour
    thank you verymuch again

  • http://www.ankaraitfaiyemeydani.com ikinci el esya alanlar

    very nice tutorial.
    amazing.
    thanks a lot.

  • Jim

    Thanks for the tutorial.

    Is it just me or do the numbers not add up, for the outside border?

    [1100px × 490px]

    [940px x 360px]

    Wouldn’t that create a large outside border of [80px x 65px]?

    Did I miss something?

  • http://www.aksesorisjogja.com aksesoris wanita

    Fantastic! this what i need, thank you!

  • Pierre-Louis

    Here is a very nice design, Photoshop ready, vertical orientation, and 100% free….designed it using this tutorial, and giving it away for free, here http://www.creattor.com/web-elements/sleek-accordion-3997

  • josh

    I don’t understand how this could be of use to anyone without the code.