Prototyping for the web with Framer

Default avatar.
September 01, 2016
Prototyping for the web with Framer.
Framer

is a really powerful tool that can prototype anything you can think of but if you take a look at Framer’s Gallery you’ll quickly notice something: 001 Out of their 54 examples, 48 of them are apps, 4 for Apple Watch, 1 for iPad and 1 for Apple TV. Is Framer even meant for traditional’ web/​desktop design? Absolutely. At IBM Design most of my designs are made for enterprise desktop web applications. Most designers I work with use Sketch (including myself). These Sketch files are then prototyped using a tool like InVision or recreated and prototyped in code. As a front end developer on a design team I have a unique position where I both design and code prototypes. After learning the basics of Framer, I decided to add it to my workflow and it’s really improved my design process. The single most powerful part is being able to import a static Sketch file into Framer and turn it into a realistic, interactive prototype in a relatively short amount of time. With this, I don’t have to spend valuable time in the beginning of the process recreating designs in code. I can get ideas in front of stakeholders & users much faster. I can save coding for later on when the project is more solidified. 002 After using Framer for a few months here’s some things I’ve learned: 003

Plan and scope your prototypes

Before I start a project, I decide a few things:

What am I trying to accomplish?

Whether the prototype is for user testing or getting an idea conceptualized, what’s the minimum amount of work needed to get my idea across or to gain insight from testing? I’m not just being lazy ;) , this helps decide the necessary interactions, animations and screens that are needed.

The more time you spend on your design the more you become attached. The more attached, the less likely you are to make the necessary changes.

Let’s use the prototype above as an example. I was working on a new project and I wanted to explore what a card based layout with shuffling’ animations in between states would look like. I sketched out the basic idea I wanted to make and used that as my starting point. 004 If you take a look at the finished prototype, only the first card is clickable in each step. There is no way to go back, no hover states, the content in the last screen isn’t complete, and it’s not nearly pixel perfect. None of those were necessary to get my idea across so I didn’t spend time including them. Framer can do just about anything, but that doesn’t mean you should try to do everything in your prototype. 

Create UI flows using Andreas’ awesome ViewController module

You can use the ViewController Sketch plugin to create UI flows right in Sketch. Quickly turn your designs into clickable prototypes without having to write code. 005006 This is great for presenting your work to stakeholders and is really quite simple to do. Instead of walking through a Sketch file with a dozen artboards or a .pdf, you can present an interactive prototype or share your hosted Framer project URL. Depending on what I’m trying to accomplish I may end up writing some code for things like hover effects, animations and text inputs for an added touch of realism and interactivity. Again, as a designer, decide what’s necessary to get your idea across and implement appropriately. Check out Andreas’ Create UI flows using Sketch and Framer article to learn more about the plugin.

Microinteractions

007

I think there’s a few reasons that mobile prototyping is really popular with Framer, one of them being microinteractions seem to much more commonplace on mobile. But it doesn’t have to be that way! I think as designers for the web can be better at making our work have more motion and Framer is really good at this. This is just a simple example of a quick interaction I made using a Sketch file a designer on my team had already made. Exploring interactions like this takes a matter of minutes.

Sure, but why not just code?

As a front end developer, a lot of my projects will eventually end up with a coded prototype. I then use this prototype as a basis to write the front end code into the product, working along side engineering. So why not just code from the start? As I mentioned earlier, speed. I can quickly flesh out ideas that either I or another designer have already made by importing them from Sketch into Framer. It’s great for the early part of the design process where you’re exploring ideas and implementing feedback quickly. I can move pretty fast in code, but Framer takes it to the next level. Another reason is freedom. The simple fact that all of my code written in Framer will be thrown away is actually kind of great. It allows me to try things I wouldn’t otherwise and to be a bit more loose with my code. I can spend 15 minutes exploring an idea and then trash it without any remorse.

Some tips & tricks

You (or the designer you’re working with) will probably have to set up Sketch files a bit differently. 

  • Group your layers. Layers that are not in a group are ignored
  • Avoid using spaces in your group names
  • Hidden layers in Sketch are still imported, but their visibility will be set to false.
  • Create simple, unique names for your artboards
  • A minus (-) at the end of your artboard will exclude it from being imported into Framer

Flatten any layers in Sketch that will remain static. This will improve the loading time of your project, which is especially great when creating a heftier prototype. You can do this by adding an asterisk(*) to the end of the layer in Sketch. 008 It’s worth spending some time with the designers on your team to go over how to setup Sketch files to best fit the workflow and what works best for the team. When you import a Sketch file into Framer, you’ll see something like this:

# Import file "design" sketch = Framer.Importer.load("imported/design@1x")

Replace sketch with $, and you can now use $ to reference your Sketch layers, saving yourself from writing the word sketch hundreds of times:

$ = Framer.Importer.load("imported/design@1x")

Use the Normal Cursor’ snippet for a normal mouse pointer:

document.body.style.cursor = "auto"

I import my designs at @2x and then scale them down, so they’re extra crisp. Note that this doesn’t seem to get along with the ViewController module mentioned above.

Framer.Device.contentScale = .5

Sketch and Framer use different default artboards/​devices for the web. Sketch uses 1440×1024 while Framer uses 1440×900. I opt for 1440×900. Don’t think you’re restricted to 900 pixels for height though, you can easily create scrollable pages in Framer. [– This article was originally posted on Medium, republished with the author’s permission –]

Ross Fenrick

Front End Developer & Product Designer at IBM Design. Follow him on twitter @rossenfeffer

Read Next

Apple Opts for AR over VR at WWDC

An Apple VR headset has been one of the most widely-rumored devices of the last few years, and it was finally settled a…

Exciting New Tools for Designers, June 2023

We’re halfway through 2023 already, and the number of incredible apps, tools, and resources for designers is mounting.

3 Essential Design Trends, June 2023

This month we are focusing on three trends within a bigger website design trend – different navigation menu styles and …

15 Best New Fonts, May 2023

The choices you make when selecting a typeface have more impact on your design than almost any other decision, so it’s …

10+ Best Tools & Resources for Web Designers and Agencies (2023 updated)

Having the ability to envision a tastefully designed website (i.e., the role creativity plays) is important. But being …

20 Best New Websites, May 2023

This month, there are tons of great new agency websites to get excited about. 3D animated prisms are a popular theme, a…

How to Find the Right White Label Website Builder for Your Agency

Web design agencies face a lot of obstacles in closing the deal with new clients. One of the most common ones is the ar…

Exciting New Tools For Designers, May 2023

There are hundreds of new tools for designers and developers released each month. We sift through them all to bring you…

3 Essential Design Trends, May 2023

All three of the website design trends here mimic something bigger going on in the tech space, from a desire to have mo…

10 Best AI Tools for Web Designers (2023)

It’s time to stop worrying if AI is going to take your job and instead start using AI to expand the services you can of…

10 Best Marketing Agency Websites (Examples, Inspo, and Templates!)

Marketers are skilled in developing strategies, producing visual assets, writing text with high impact, and optimizing …

15 Best New Fonts, April 2023

Fonts are a designer’s best friend. They add personality to our designs and enable fine typography to elevate the quali…