---
title: "zigzagBands"
description: "A mask of chevron (zigzag) stripes that scroll with the layer's clock."
group: "paint"
groupTitle: "Painting"
categoryId: "patterns"
categorySlug: "patterns"
categoryTitle: "Patterns & tiling"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/patterns.ts#L429"
---

# zigzagBands

A mask of chevron (zigzag) stripes that scroll with the layer's clock.

```ts
zigzagBands(slots: {
    count: PropRef
    angle: PropRef
    balance: PropRef
    softness: PropRef
    offset: PropRef
}): PatternPaint
```

Import `patterns` from `shaders/std` and use `patterns.zigzagBands`.

`count` is the number of stripe pairs across the canvas. `angle` is in degrees. `balance` 0–1 is how much of each pair is the 0 side. `softness` 0–1 blurs the edges. `offset` shifts the phase; 1 is one whole pair. Declare `animatedTime: {speed: 'speed'}` on the definition.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{
    count: PropRef
    angle: PropRef
    balance: PropRef
    softness: PropRef
    offset: PropRef
}` |  |

## Example

```ts
const bands = zigzagBands({count: p('count'), angle: p('angle'), balance: p('balance'), softness: p('softness'), offset: p('offset')})
```

> **Tip.** Reuse one `bands` value for both the color mix and an alpha mix. It is evaluated once.

## See also

- [`stripeBands`](/docs/primitives/patterns/stripebands) — A mask of straight parallel stripes that scroll with the layer's clock.
- [`checkerCells`](/docs/primitives/patterns/checkercells) — A checkerboard mask: 1 on one set of squares, 0 on the other, with clean edges at any size.

## Used by

[Chevron](/docs/components/chevron)