Reusable box in figma

26 Views Asked by At

I want to create a reusable rectangle in figma that has some text written in it and changes background color from grey to yellow when on hovering on it, but it does not affect the written text in any way, just that the bg-color changes, also i want to this rectangle multiple time in a page with different text written in it but with the same color change on hover property.

enter image description here

in the attached image i have two rectangles, with different text in them, i want the rectangle to be reusable.

thanks

i tried by prototyping but it didn't work like i wanted it to

1

There are 1 best solutions below

0
Nielio On

Components are elements you can reuse across your designs. They help to create and manage consistent designs across projects.

You can create components from any layers or objects you've designed. These could be a whole range of things like buttons, icons, layouts, and more.

There are two aspects to a component:

1. Main Component

A main component defines the properties of the component. You can try to "Create Component" using Ctrl+Alt+K or Cmd+Option+K.

2. List item

An instance is a copy of the component you can reuse in your designs. Instances are linked to the main component and receive any updates made to the component. You can create components to use within a single file. Or, you can use team library to share components and styles across files and projects.

Here is some reference and video tutorial how to do it
https://help.figma.com/hc/en-us/articles/360038662654-Guide-to-components-in-Figma