
Sketch Tutorial Series
Creating Responsive Components for your Design System: Video Player š¹
Let me show you how to create fully Responsive Components within your Design System
Yes. Although Atoms, Molecules and the like (thatās Buttons, Text Fields etc⦠for us regular folk) are the basic, core elements of any great Design System. The real fun begins when you start bringing those smaller components together to create full-fat, king-size Components with their many Overrides at your disposal. And in this short, but hopefully insightful Tutorial Series I aim to show you how I created many of the larger Components inside of my own Design System; Cabana. Taking those smaller elements; Symbols, and in turn Nested Symbols, and creating fully Responsive Components.
Iāll show you how I created the foundational elements such as Icons, Buttons, and Text Styles and constructed these little by little into full sized, Responsive Components such as Menus, Calendars, Cards, and more⦠throughout this Tutorial Series. Hold tight, itās going to be informative with a sprinkle of fun!
Ok. Letās get goingā¦
Letās take the example below which is included in the Cabana Design System. A simple, but highly versatile Video Playerā¦

This Responsive Component is constructed from quite a few Symbols, Text Styles, and Layer Styles as you can see hereā¦

ā¦a combination of Symbols, Text Styles, and Layer Styles, and by golly Iām going to break it down and show you how I constructed this versatile Component.
Letās take it from the bottom (of the Layer List)ā¦
Container/Video Still

Ok. For this first element I simply drew out a Rectangle around 1140 in Width and 650 in Height. Rounded the corners off to 4, applied a Mask to it, and then give it an Image Fill. Done, done, and done!
Overlay

The Overlay was a simple Layer Style that took the Hex value of one of my Base Color Layer Styles that Iād created previouslyā¦

ā¦which I then applied 60% Opacity to and then saved as a new Layer Style with the label of Overlay/Black.

I then simply drew out a Rectangle with the same dimensions as the Container/Video Still element and applied this new Layer Style.

Controls

The Controls for the Video Player Component were constructed from 4 Icon Symbols, and a Text Style for the timecode, and this is where the bulk of the Resizing/Responsive options came into play.

Let me show you how I set this upā¦
I firstly inserted one of my Icon Symbols, the Play icon to be exact (You can read about the creation of the Icons in Part 1 here), gave it a Color Override of White, Fixed its size Horizontally and Vertically, and then Pinned it to the Left Edge in the Resizing options.

Then, using the 8pt Grid System, I positioned it 24pt from the Left, and Bottom edges of the Container.

Next, I inserted the Pause icon, and the same as before, gave it a Color Override of White, Fixed its size Horizontally and Vertically, and then Pinned it to the Left Edge in the Resizing options.
Then I positioned it 8pt to the Left of the Play icon.

For the Timecode, this was simply taken from one of the pre-existing Text Styles that Iād created previously. (Again I touch upon these in Part 1 of this Tutorial Series here), and like the Icons before I applied the same Resizing options to it; Pin to the Left Edge, and Fix the Size Horizontally, and Vertically.
I then positioned it 16pt to the Left of the Pause icon.

For the Settings icon, I gave it a Color Override of White, Fixed its size Horizontally and Vertically, and then Pinned it to the Right Edge in the Resizing options.

I then positioned it 24pt from the Right, and Bottom edges of the Container.
And then finally, I inserted a Volume Symbol icon, positioned it 16pt to the Left of the Settings icon, Fixed its size Horizontally and Vertically, and then Pinned it to the Right Edge in the Resizing options.

With all 5 elements selected, I grouped these, labelled it Controlsā¦

ā¦and then with the new Group selected, Pinned it to the Left, Bottom, and Right edges, and Fixed its size Vertically.

Progress Bar

For the Progress Bar, I created 5 separate Symbols, with attached Layer Stylesā¦
- Progress Bar 0%
- Progress Bar 25%
- Progress Bar 50%
- Progress Bar 75%
- Progress Bar 100%

ā¦which allowed me plenty of options when using this element inside of a larger Component.
Letās focus on the Progress Bar 50% which is used inside of the Video Player example, and how I constructed this Symbolā¦

The Progress Bar is basically 2 elements (Bar, and Track), with the relevant Layer Styles attached. Nothing too strenuous, and much, much simpler in its current form since Sketch 52, without the reliance of Masks, and Color Symbols, and all that extra overhead.

For the Track shape layer I simply created a Rectangle, gave it a Radius of 12, applied one of my pre-existing Color Layer Styles, and then Pinned it to All edges.

Then, for the Bar shape layer, once more created a Rectangle, gave it a Radius of 8, applied one of my pre-existing Color Layer Styles, and then Pinned it to the Top, Left, and Bottom edges.

With both Shape Layers selected, I then converted to a Symbol, and now had a Symbol that would scale and look great at any screen size. Huzzah!
Back on the Video Player Component, I inserted this freshly created Symbol, resized it to be 24pt from the Left, and Right edges of the Containerā¦

ā¦and then applied the following Resizing optionsā¦

Share Icon

And last, but not least, to finish things up, popped in a Share icon Symbol, tweaked its Color Override, and positioned it 24pt from the Top, and Right edges of the Container.
Finally, I grouped all of the elements together (Share icon, Progress Bar, Controls, Overlay, and Container), which then allowed me to have a fully Responsive Component at the ready!

š£ Woah! Hang on. Before you goā¦
ā¦If you really donāt want to create all the Components that I cover in this Tutorial Series you need to check out the followingā¦
š Design Better, Smarter, and Faster in Sketch. You can pick up a copy of my fully featured Design System ā Cabana right here.
Use the offer code MEDIUM25 to receive 25% OFF.

Thanks for reading the article,
Marc
Designer, Author, Father and Lover of old Rave tracks!