---
title: "Stroke dash animated icon"
description: "Stroke dash animated icon (Vector editing & design). The dash pattern runs along the stroke. Light: the top row of dashes marches one full dash period to the right, the last dash slipping out at the row's end while a new one grows in at its start, and the second row follows 80 ms behind; both land a touch past the period and settle. Strong: the rows draw back first, then march harder, overshoot further and settle in two beats. The source stroke swatch never moves."
canonical: https://generativeicons.lottiefiles.com/icons/stroke-dash/
---

# Stroke dash animated icon

The dash pattern runs along the stroke. Light: the top row of dashes marches one full dash period to the right, the last dash slipping out at the row's end while a new one grows in at its start, and the second row follows 80 ms behind; both land a touch past the period and settle. Strong: the rows draw back first, then march harder, overshoot further and settle in two beats. The source stroke swatch never moves.

- Id: `stroke-dash`
- Category: Vector editing & design
- Search terms: dashed line, dashed stroke, dashes, dash pattern, dash array, dasharray, dotted line, dotted, stroke style, line style, border style, marching ants, dashed border
- One action, back to rest
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.lottiefiles.com/assets/stroke-dash.lottie (dotLottie, 5368 bytes, sha256 8f374310da29a301f3ca632a7e3eda56753eae821060f66ab9c9258732297dc1)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add stroke-dash
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/stroke-dash.mjs';

export function StrokeDashIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/stroke-dash.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.lottiefiles.com/icons/stroke-dash/ · https://generativeicons.lottiefiles.com/api/icons/stroke-dash
