# Function: swayEffect() (/pixi-vn/index/namespaces/effects/functions/swayEffect)



\> **swayEffect**(`alias`, `options?`, `priority?`): `Promise`\<`string`\[] | `undefined`>

Defined in: [src/canvas/functions/canvas-effect.ts:351](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/canvas/functions/canvas-effect.ts#L351)

Sway the canvas element: a smooth, optionally combined positional and rotational drift around its
current state - a gentler, slower cousin of [nodEffect](/pixi-vn/index/namespaces/effects/functions/nodEffect)/[wiggleEffect](/pixi-vn/index/namespaces/effects/functions/wiggleEffect).

## Parameters [#parameters]

### alias [#alias]

`string`

The alias to identify the component.

### options? [#options]

[`SwayEffectProps`](/pixi-vn/index/interfaces/SwayEffectProps) = `{}`

Animation options.

### priority? [#priority]

`UPDATE_PRIORITY`

The priority of the PixiJS ticker.

## Returns [#returns]

`Promise`\<`string`\[] | `undefined`>
