# Flight

interface in `@dioramajs/diorama/transitions`

```ts
import type { Flight } from '@dioramajs/diorama/transitions'
```

Every write requests a frame, so it can be tweened directly.

```ts
interface Flight
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `from` | `Element` | The element that left (detached, or still in the DOM with Barba sync). |
| `key` | `string` | The `data-dio-key` that paired the two elements. |
| `opacity` | `number` | Alpha multiplier for the flying copy and the target copy taking over under it. Default 1. |
| `progress` | `number` | 0 at the source box, 1 at the target box. Eased by `ease` unless `animate` drives it. |
| `state` | `FlightState` | Where the flight is now. |
| `to` | `Element` | The element that came in. |

Also exported from `@dioramajs/transitions`.

Defined in [packages/transitions/src/types.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/transitions/src/types.ts#L78).
