---
title: "flip"
description: "Flip the child horizontally, vertically, or both."
group: "space"
groupTitle: "Shapes, frames & warps"
categoryId: "warps"
categorySlug: "warps"
categoryTitle: "Warps"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/warps.ts#L94"
---

# flip

Flip the child horizontally, vertically, or both.

```ts
flip(slots: {flipX: ArgSpec; flipY: ArgSpec}): UvMapSource
```

Import `warps` from `shaders/std` and use `warps.flip`.

`flipX` and `flipY` are boolean props declared with `transform: transformBoolean`. The flip never looks outside the child, so set `edges: 'none'` on the definition.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{flipX: ArgSpec; flipY: ArgSpec}` |  |

## Example

```ts
map: warps.flip({flipX: p('flipX'), flipY: p('flipY')}),
edges: 'none',
```

## See also

- [`mirrorLine`](/docs/primitives/warps/mirrorline) — Mirror the child across a line through `center` at `angle`.

## Used by

[Flip](/docs/components/flip)