<?xml version="1.0" encoding="utf-8"?>

A stroke refers to the outline or border that surrounds a shape or object, allowing you to define edges, create visual boundaries, and add detail to your designs. You can apply strokes to a variety of objects, including rectangles, circles, and custom shapes, giving you the flexibility to enhance the visual appeal of your work.

Figma also offers extensive control over strokes, enabling you to adjust thickness, color, and style. This means you can easily customize how bold or subtle you want the border of an object to be, choose from a spectrum of colors to match your design scheme, and select styles such as solid, dashed, or dotted lines to convey different visual effects or meanings, opening up creative possibilities for intricate designs.

Exercise #1

When to apply strokes

Strokes can have multiple applications in design including but not limited to:

  • Defining boundaries: Use strokes to delineate the edges of shapes, text, or images, enhancing distinction against varied backgrounds.
  • Enhancing visibility: Apply strokes to improve the readability and visibility of design elements.
  • Creating visual hierarchy: Employ strokes to emphasize certain elements, directing the viewer's focus and establishing order within your design.
  • Styling: Utilize strokes for decorative effects, such as patterns and frames, or to add depth, enriching the overall aesthetic appeal.

Exercise #2

Stroke paints

Stroke properties are accessible within the Design panel in Figma, with various options to customize stroke appearance. The Paints property allows the addition of solid colors, gradients, or images to a stroke. It also supports multiple paints on a single stroke, enabling diverse and intricate designs.

To add paints to strokes:

  1. In the Design panel, locate the Stroke section.
  2. Click on the color swatch to open the color picker and select from solid, gradient, or image fills. Adjust opacity as desired.
  3. Click "+" to layer more paints, mixing colors or textures.
  4. Use the eye icon to experiment with the visibility of different paint layers without having to make any permanent changes.
  5. Click "-" to delete a paint layer or stroke.

Pro Tip: When adding more than one stroke paint layer, the weight, position, and style properties of all layers must be the same.

Exercise #3

Stroke position

By default, shape layers have strokes set to inside, while lines default to center. However, you can position strokes inside, outside, or the center of a layer's path by using the dropdown Position menu in the Stroke section of the Design panel. This flexibility allows you to enhance the visual clarity and precision of your design elements according to their context and background.

Before finalizing your choice, Figma offers a preview feature. By hovering over each stroke position option in the dropdown menu, you can see a live preview on the canvas, helping you make informed decisions about the best stroke position for your design.

Exercise #4

Stroke weight

Adjusting stroke weight allows you to modify the thickness of strokes. This adjustment can dramatically impact the visual appeal and readability of your design, enabling fine control over how bold or subtle you want the outlines or borders of your elements to be.

To change the stroke weight:

  1. Select the layer you wish to modify.
  2. Navigate to the Design panel’s Stroke section.
  3. Here, you'll find a numeric input field labeled with an icon that looks like a stack of lines. You can either type in a specific value for the stroke weight or use the up and down arrows on your keyboard within the input field to incrementally adjust the thickness.
  4. Alternatively, you can click on the Apply variable button next to the numerical input to select an existing stroke variable from your libraries.

Exercise #5

Individual strokes

You have the flexibility to apply stroke properties selectively across different sides of a layer, such as rectangles, frames, or components/instances that utilize frames. This is made possible through the Individual strokes property under the Stroke settings in the Design panel, offering various options:

  • All (default): Applies the stroke uniformly around the entire layer
  • Top: Adds the stroke only to the top edge
  • Bottom: Applies the stroke solely to the bottom edge
  • Left: Targets the stroke application to the left edge
  • Right: Focuses the stroke on the right edge
  • Custom: Enables selective application of strokes to specific sides, also allowing for varied stroke weights on each side. When the Custom option is selected, 4 input fields appear under the Stroke section, permitting independent weight adjustments for each side. Setting a side's weight to 0 effectively removes the stroke from that side.

Exercise #6

Start and end points

Start and end points are the design elements at the beginning and end of strokes, providing a finished look or aesthetic, or indicating direction. Figma allows customization of these points on open paths with various styles, such as round, square, line arrow, triangle arrow, circle arrow, reverse triangle, and diamond arrow.

For layers with only two endpoints, such as lines or arrows, you can directly set the style for both points in the main Stroke section under the Start point and End point dropdowns.

To add unique individual end caps for shapes with more than two endpoints:

  1. Enter vector edit mode by pressing Return (Mac) or Enter (Windows) with the layer selected.
  2. Then, select a specific endpoint to customize.
  3. Locate the Advanced stroke settings under the Stroke section in the Design panel.
  4. Select the desired style under the End point dropdown.
Exercise #7

Dashed strokes

Dashed strokes are useful for creating patterns, emphasizing boundaries, or guiding user attention without being too overwhelming.

To apply a dashed stroke:

  1. First, access the Stroke settings in the Design panel and click the Advanced stroke settings icon.
  2. Choose the Dashed stroke option in the Style dropdown.
  3. In the settings that open up, specify your desired dash length in pixels, which determines the length of each dash.
  4. Then, input the gap length in pixels to set the space between dashes.
  5. Lastly, select the cap type for your dash (none, round, or square) to define the dash ends' appearance.

Exercise #8

Dotted strokes

Dotted strokes, like dashed strokes, are particularly useful for guiding user attention, delineating sections subtly, or adding a decorative touch to designs without overwhelming the visual composition. They serve as a lighter alternative to solid lines, offering a nuanced way to organize content or embellish elements with a delicate, refined aesthetic.

To apply a dotted stroke:

  1. Head to the Stroke section in the Design panel and set the stroke position to Center.
  2. Click the Advanced stroke settings button.
  3. From the modal that opens up, select the Dashed stroke style from the Stroke style dropdown.
  4. Set the Dash length to 1px or lower for small, discrete dots and increase the value to make them larger.
  5. Choose Round in the Dash cap setting to give each dot a perfect circular shape.
  6. Adjust the gap between dashes to control the spacing between dots, tailoring the pattern to your design's needs.

Exercise #9

Custom strokes

Custom strokes help you create unique dashed or dotted lines with tailored patterns. This is ideal for emphasizing specific elements, creating visual rhythms, or guiding user navigation in a design.

To apply a custom stroke:

  1. Go to the Stroke section in the Design panel and click the Advanced stroke settings icon.
  2. Choose the Custom option under Stroke style dropdown.
  3. In the Dashes setting, input your pattern using the syntax [dash size, gap size, dash size, gap size...] This allows for intricate sequences of dashes and gaps. For instance, to create a pattern of a long dash followed by a short gap, then a short dash and another short gap, enter [10, 5, 5, 5]. Adjusting these values lets you experiment with various visual effects tailored to your design's needs.
  4. Select a Dash cap to define the shape of the dash ends.

Exercise #10

Join and miter angle

Join and miter angles are tools used to define how lines connect within a path or vector network. These settings are especially important when working on detailed design elements where the precision of line connections impacts the overall look.

To use join and miter angles:

  1. To adjust joins for an entire path, navigate to the Advanced stroke settings in the Design panel.
  2. For specific adjustments, enter vector edit mode by pressing Return (Mac) or Enter (Windows). Select a single anchor point and then navigate to the Advanced stroke settings.
  3. Next, choose the type of join:
    • Miter: Creates a sharp point where two paths meet, ideal for geometric designs or to emphasize angles. You can adjust the angle to control the sharpness of the join.
    • Bevel: Cuts off the sharp point for a flat edge, useful for a more modern and clean look.
    • Rounded: Rounds the point where paths meet, softening the connection for a friendlier appearance.
Exercise #11

Outline stroke

The Outline stroke feature in Figma is a transformative tool that converts strokes into editable vector objects. This process turns each path of an object into a singular, modifiable shape, significantly expanding design possibilities. With this feature, you can craft custom shapes for intricate designs, merge multiple paths for unified objects, and scale vector objects uniformly without distortion.

You can apply Outline stroke in 2 ways:

  • Right-click on the layer and select Outline stroke.
  • Employ keyboard shortcuts: Option Command O (Mac) or Alt Ctrl O (Windows)

Upon conversion, any stroke paints are applied as fills to the new vector object, maintaining the visual aesthetics. To further edit this new vector object, enter vector edit mode by pressing Return (Mac) or Enter (Windows).

Pro Tip: Once a stroke is outlined, reverting it to a stroke format directly isn't possible unless you undo the action immediately using Command Z (Mac) or Ctrl Z (Windows).

Exercise #12

Dynamic and brush strokes

Figma's Dynamic and Brush Strokes are found under the Advanced stroke settings in the Stroke section of the Design panel. When you click this icon, a panel opens with 3 tabs at the top: Basic, Dynamic, and Brush.

In the Dynamic tab, you can adjust how the stroke behaves along the path. You can control settings like:

  • Frequency: How often the stroke changes width
  • Wiggle: How irregular or wavy the stroke is
  • Smoothen: How much smoothing is applied
  • End points: Adds cap shapes at the start or end of the stroke if it’s an open path

In the Brush tab, you can apply textured effects and adjust the stroke direction (left or right). This adds a hand-drawn or painted feel to your vector paths. These features are helpful when you want more expressive strokes, like for illustrations, icons, or decorative elements.

Complete this lesson and move one step closer to your course certificate