> For the complete documentation index, see [llms.txt](https://plugin-everything.gitbook.io/textbox-3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plugin-everything.gitbook.io/textbox-3/stroke.md). Agents can also search and read this documentation through its [MCP server](https://plugin-everything.gitbook.io/textbox-3/~gitbook/mcp).

# Stroke

Use `Stroke` to outline a shape, draw just the border, or cut a border-shaped opening. To add a basic outline, choose `Normal` in `Stroke Mode`, then set `Stroke Width` and `Stroke Color` in `Stroke Style`.

## `Stroke Mode`

| Option     | What it does                                                                                                        |
| ---------- | ------------------------------------------------------------------------------------------------------------------- |
| `None`     | Draws no stroke. This is the default                                                                                |
| `Normal`   | Draws the stroke with the fill                                                                                      |
| `Solo`     | Shows the stroke and hides the fill                                                                                 |
| `Subtract` | Uses the stroke's opacity to cut the shape. Set `Draw Order` to `Above Text` to let the stroke cut the text as well |

Use `Expression Controls` > `Stroke Mode` to keyframe the mode or control it with an expression. [Animate modes or link them to other controls](https://plugin-everything.gitbook.io/textbox-3/expression-controls.md).

## `Stroke Style`

| Control              | What it does                                                                                                                                      |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Stroke Width`       | Sets the full thickness in pixels. The default is 4 pixels                                                                                        |
| `Stroke Expansion`   | Moves the stroke relative to the shape edge in pixels. Positive values move it outward and negative values move it inward                         |
| `Stroke Expand Mode` | `Even Offset` follows the shape's actual edge at offset distances. `Standard Stroke` draws a centered stroke along an expanded or contracted path |
| `Stroke Cap`         | `Butt` gives an open end a flat edge. `Round` rounds the ends of a trim or dash                                                                   |
| `Inherit Fill Style` | Shares the fill's color or opacity with the stroke                                                                                                |
| `Stroke Color`       | Sets a separate solid stroke color                                                                                                                |
| `Stroke Opacity`     | Sets the stroke's overall opacity                                                                                                                 |
| `Draw Order`         | Places the stroke `Below Fill`, `Above Fill`, or `Above Text`. The default, `Above Fill`, places the stroke between the fill and the text         |

For an outline separated from the fill, increase `Stroke Expansion` until the stroke clears the shape edge. Use `Below Fill` to hide the inner part of a stroke behind an opaque fill. In `Subtract`, choosing `Below Fill` cuts at the `Above Fill` position. [Combine a stroke with a text matte](https://plugin-everything.gitbook.io/textbox-3/compositing.md).

<details>

<summary>Share the fill color, gradient, or opacity</summary>

| `Inherit Fill Style` | What it does                                                      |
| -------------------- | ----------------------------------------------------------------- |
| `None`               | Uses `Stroke Color` and `Stroke Opacity`                          |
| `Color`              | Uses the fill color or gradient with `Stroke Opacity`             |
| `Opacity`            | Uses `Stroke Color` with `Style` > `Fill Opacity`                 |
| `Color & Opacity`    | Uses both the fill color or gradient and `Style` > `Fill Opacity` |

A shared gradient includes its stop opacities. The stroke fits the gradient to its own full bounds, so animating a trim or dash pattern reveals different parts of the same gradient. [Set up a gradient fill](https://plugin-everything.gitbook.io/textbox-3/gradient.md).

</details>

## `Trim Paths`

Turn on `Enable` and set `Start` and `End` as percentages of the stroke's perimeter. The stroke starts at its top midpoint and travels clockwise in the box's own axes. The starting point follows `Transform Box`. The stroke shows the interval between the two values. Equal values hide it.

Use `Offset` to move a partial interval around the perimeter. A 90° offset moves it a quarter of the way around. To animate an outline drawing on, set `Start` to 0% and keyframe `End` from 0% to 100%.

## `Dashes`

Turn on `Enable` and choose `Dash Mode` based on what you want to keep consistent when the box changes size.

| Option        | What it does                                                                                                               |
| ------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `Absolute`    | Keeps the dash and gap lengths in pixels. Useful when the same dash size should appear on boxes of different sizes         |
| `Fit to Path` | Fits a fixed number of repeats around the full perimeter. Useful when the same dash count should appear as the box resizes |

<details>

<summary>Absolute dashes</summary>

Set `Length` for each dash body and `Gap` for the space between dashes. Use `Offset` to move the pattern in pixels. A positive value moves it clockwise. A `Gap` of 0 draws a continuous stroke, and a `Length` of 0 hides the dashes.

With `Trim Paths` enabled, the pattern starts at the beginning of the trimmed interval. Moving that start moves the pattern. Changing the trim end clips the pattern at the new endpoint.

</details>

<details>

<summary>Fit to Path dashes</summary>

Set `Dash Count` for the number of repeats around the full path, and `Coverage` for the percentage of each repeat occupied by the dash body. At 0% the dashes disappear. At 100% the stroke is continuous.

Use `Phase` to move the dash pattern. A positive 90° shifts it clockwise by a quarter of the full perimeter. Each shape in `Multi Shape` fits its own pattern. `Trim Paths` reveals or hides portions of that pattern while the dashes stay in place.

</details>

`Round` caps extend beyond dash bodies and can close small gaps. Increase `Gap` or lower `Coverage` to restore space between rounded dashes. With trims or dashes enabled, tight shapes can limit the rendered stroke width so the end caps fit.
