Bootcamp

From idea to product, one lesson at a time. To submit your story: https://tinyurl.com/bootspub1

Follow publication

Figma quick trick: components with customisable contents.

Basic pop-up component with a content placeholder

Hi everyone,
Maybe I’m just super slow for not discovering this little trick that I’m about to show you earlier, but I’ll share it anyway. I hope it will help someone like me to bring more structure and consistency to their design files.

I beg you, do not detach the instance 🙏

If you’re like me, you’ve probably tried creating components for things like forms and dialogs to bring more consistency to your designs, however, it wasn’t really as smooth as you’d hoped. Forms and dialogs have various contents.

You’re lucky if the only variation in your case is the copy. Text can be overridden without breaking the link to the original component. But what should you do if you need to put something custom inside of the container?

I need to make a confession. In such cases, I would often click the nasty “Detach instance” button and modify what used to be an instance of a component. You can only imagine how many inconsistent designs I’ve accumulated over the time that I’ve been designing.

In some other cases, I would wrap an instance in a frame and put the content on top. But that would totally ruin the nice auto-layout configuration. And the layer structure would be just a mess.

Please, take a 30-minute walk and really think about it, when you feel the need to do this.

Instance swapping saves the day 🚀

Alright, if you’ve understood the trick that I’m about to show you from the title of this section it means that you are a designer I should really look up to.

For everyone else, who is still intrigued, please enjoy the reading.

First things first — let’s take that “Content Placeholder” frame from the original component and make it a component of its own. Then put an instance of this placeholder component inside of the original Dialog component.

Content Placeholder instance placed inside of the Dialog component

Now go ahead, publish this beautiful component and add an instance of it to where you need to use it.

Now let’s design actual content that we want to put inside of the Dialog instance and make it a local component.

You should end up with something like this.

Local component next to Dialog instance

Now comes the most exciting part.

In the left part of your screen inside of the Layers panel, expand your Dialog instance and select the Content placeholder instance.

Selecting the Content placeholder component inside of the Dialog component

Now, in the right part of your screen inside of the Design panel, click where it says “Content placeholder” (or whatever is the name of your placeholder component).

Swap instance dropdown

You will see a drop-down that allows you to replace this particular instance with any other component, even when it’s inside of another component instance. Pretty cool right?

Make sure you are viewing the “Local components” section. There you should see your local content component. Click it.

Viola! You have your custom content inside of the container component instance without breaking the link and detaching the instance!

Feels like magic!

Did you find this article useful? Let me know in the comments!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Bootcamp
Bootcamp

Published in Bootcamp

From idea to product, one lesson at a time. To submit your story: https://tinyurl.com/bootspub1

Anton CGI
Anton CGI

Written by Anton CGI

Lead Designer at Termius, VR enthusiast, ex. iOS developer.

Responses (3)

Write a response