Bird
Raised Fist0
Figmabi_tool~10 mins

Creating and resizing frames in Figma - Interactive Practice

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new frame in Figma using the API.

Figma
const frame = figma.create[1]();
Drag options to blanks, or click blank then click option'
AFrame
BRectangle
CGroup
DComponent
Attempts:
3 left
💡 Hint
Common Mistakes
Using createRectangle() instead of createFrame()
Using createGroup() which creates a group, not a frame
2fill in blank
medium

Complete the code to set the width of a frame to 300 pixels.

Figma
frame.[1] = 300;
Drag options to blanks, or click blank then click option'
Aheight
Blength
Csize
Dwidth
Attempts:
3 left
💡 Hint
Common Mistakes
Setting height instead of width
Using a non-existent property like size or length
3fill in blank
hard

Fix the error in the code to resize a frame proportionally by setting its height to 200 pixels while keeping the aspect ratio.

Figma
const aspectRatio = frame.width / frame.[1];
frame.height = 200;
frame.width = 200 * aspectRatio;
Drag options to blanks, or click blank then click option'
Alength
Bheight
Cwidth
Dsize
Attempts:
3 left
💡 Hint
Common Mistakes
Using width instead of height in the ratio calculation
Using a non-existent property like length or size
4fill in blank
hard

Fill both blanks to set the frame's size to 400x300 pixels.

Figma
frame.[1] = 400;
frame.[2] = 300;
Drag options to blanks, or click blank then click option'
Awidth
Bheight
Clength
Dsize
Attempts:
3 left
💡 Hint
Common Mistakes
Using length or size which are not valid properties
Swapping width and height values
5fill in blank
hard

Fill all three blanks to create a frame, set its width to 500, and add it to the current page.

Figma
const frame = figma.[1]();
frame.[2] = 500;
figma.currentPage.[3](frame);
Drag options to blanks, or click blank then click option'
AcreateFrame
Bwidth
CappendChild
DaddChild
Attempts:
3 left
💡 Hint
Common Mistakes
Using addChild instead of appendChild
Forgetting to add the frame to the page
Using wrong method names

Practice

(1/5)
1. What is the main purpose of a frame in Figma when designing a dashboard?
easy
A. To group and organize design elements neatly
B. To add color to the design
C. To write code inside the design
D. To export images only

Solution

  1. Step 1: Understand frame function

    Frames are containers that hold and organize design elements together.
  2. Step 2: Identify main use in dashboards

    Frames help keep dashboard layouts neat and adaptable by grouping elements.
  3. Final Answer:

    To group and organize design elements neatly -> Option A
  4. Quick Check:

    Frames = Group and organize [OK]
Hint: Frames group elements to keep designs tidy [OK]
Common Mistakes:
  • Thinking frames add color automatically
  • Confusing frames with exporting tools
  • Assuming frames are for coding
2. Which of the following is the correct way to resize a frame in Figma?
easy
A. Drag the frame edges or enter exact width and height values
B. Double-click the frame to resize automatically
C. Right-click and select 'Resize Frame' from the menu
D. Use the text tool inside the frame

Solution

  1. Step 1: Identify resizing methods

    Frames can be resized by dragging edges or typing exact sizes in properties panel.
  2. Step 2: Eliminate incorrect options

    Double-clicking or right-click menu does not resize frames; text tool edits text only.
  3. Final Answer:

    Drag the frame edges or enter exact width and height values -> Option A
  4. Quick Check:

    Resize = Drag edges or enter size [OK]
Hint: Drag edges or type size to resize frames [OK]
Common Mistakes:
  • Trying to resize by double-clicking
  • Looking for resize in right-click menu
  • Using text tool to resize frame
3. If you create a frame of size 400x300 pixels and then drag its right edge to increase width by 100 pixels, what will be the new size?
medium
A. 400x400 pixels
B. 300x400 pixels
C. 500x500 pixels
D. 500x300 pixels

Solution

  1. Step 1: Understand initial frame size

    The frame starts at width 400 pixels and height 300 pixels.
  2. Step 2: Apply width increase

    Dragging right edge increases width by 100 pixels, so width = 400 + 100 = 500 pixels; height stays 300 pixels.
  3. Final Answer:

    500x300 pixels -> Option D
  4. Quick Check:

    Width 400+100=500, height unchanged 300 [OK]
Hint: Width changes by drag amount; height stays same unless dragged [OK]
Common Mistakes:
  • Adding 100 to height instead of width
  • Changing both width and height mistakenly
  • Confusing width and height values
4. You try to resize a frame by typing width = -200 in the properties panel. What will happen?
medium
A. The frame width becomes 200 pixels
B. The frame height changes instead
C. An error or no change occurs because width cannot be negative
D. The frame flips horizontally

Solution

  1. Step 1: Understand frame size constraints

    Frame width must be a positive number; negative values are invalid.
  2. Step 2: Predict behavior on invalid input

    Typing negative width causes error or no change; frame does not flip or change height.
  3. Final Answer:

    An error or no change occurs because width cannot be negative -> Option C
  4. Quick Check:

    Negative size invalid = error/no change [OK]
Hint: Frame sizes must be positive numbers [OK]
Common Mistakes:
  • Assuming negative width flips frame
  • Thinking negative width sets positive size
  • Confusing width with height change
5. You have a dashboard frame sized 800x600 pixels containing several charts. You want to resize the frame to 1200x900 pixels but keep all charts scaled proportionally inside. What is the best approach in Figma?
hard
A. Resize the frame and manually resize each chart individually
B. Resize the frame and use constraints on charts to scale them proportionally
C. Create a new frame with 1200x900 and copy charts over without resizing
D. Resize the frame and lock the charts so they don't move

Solution

  1. Step 1: Understand proportional scaling need

    Charts inside frame should resize automatically to keep proportions when frame size changes.
  2. Step 2: Use constraints feature

    Applying constraints to charts allows them to scale or move proportionally when frame resizes.
  3. Step 3: Avoid manual resizing or locking

    Manual resizing is time-consuming; locking prevents resizing; copying without resizing loses scale.
  4. Final Answer:

    Resize the frame and use constraints on charts to scale them proportionally -> Option B
  5. Quick Check:

    Constraints + resize frame = proportional scaling [OK]
Hint: Use constraints to auto-scale elements when resizing frames [OK]
Common Mistakes:
  • Manually resizing each chart instead of using constraints
  • Locking charts so they don't resize
  • Copying charts to new frame without resizing