0
0
Figmabi_tool~10 mins

Corner radius and smoothing in Figma - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the corner radius of a rectangle in Figma.

Figma
rectangle.cornerRadius = [1]
Drag options to blanks, or click blank then click option'
AsetRadius(10)
B'10px'
Cradius(10)
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string like '10px' instead of a number.
Trying to call a function to set radius.
2fill in blank
medium

Complete the code to set the smoothing of a rectangle's corners in Figma.

Figma
rectangle.cornerSmoothing = [1]
Drag options to blanks, or click blank then click option'
A1.5
B0.5
C'0.5'
Dsmooth(0.5)
Attempts:
3 left
💡 Hint
Common Mistakes
Using a value greater than 1.
Using a string instead of a number.
3fill in blank
hard

Fix the error in setting corner radius and smoothing for a rectangle.

Figma
rectangle.cornerRadius = [1]
rectangle.cornerSmoothing = 0.7
Drag options to blanks, or click blank then click option'
A'15px'
BsetRadius(15)
C15
Dradius(15)
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string like '15px'.
Trying to call a function to set radius.
4fill in blank
hard

Fill both blanks to set corner radius and smoothing correctly.

Figma
rectangle.cornerRadius = [1]
rectangle.cornerSmoothing = [2]
Drag options to blanks, or click blank then click option'
A20
B0.3
C'0.3'
D'20px'
Attempts:
3 left
💡 Hint
Common Mistakes
Using strings instead of numbers.
Setting smoothing outside the 0-1 range.
5fill in blank
hard

Fill all three blanks to create a rectangle with corner radius and smoothing, then log the values.

Figma
const rect = figma.createRectangle()
rect.cornerRadius = [1]
rect.cornerSmoothing = [2]
console.log('Radius:', [3])
Drag options to blanks, or click blank then click option'
A15
B0.6
Crect.cornerRadius
D'15px'
Attempts:
3 left
💡 Hint
Common Mistakes
Logging a string instead of the property.
Using strings for numeric properties.