# Attach

interface in `@dioramajs/diorama/effects`

```ts
import type { Attach } from '@dioramajs/diorama/effects'
```

`app.attach`: puts an effect on elements by selector, element or list.

```ts
Attach<P extends ParamSpec>(
  target: Target,
  use: Effect<P> | EffectUse<P>,
  options?: AttachOptions,
): EffectHandle<P>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `target` | `Target` |  |
| `use` | `Effect<P> \| EffectUse<P>` |  |
| `options?` | `AttachOptions` |  |

```ts
Attach<N extends 'curtain' | 'horizontal' | 'grid' | 'coin' | 'explode' | 'pins' | 'ribbon' | 'smoke' | 'tunnel' | 'zoom' | 'wave' | 'image' | 'gallery' | 'model' | 'globe' | 'label' | 'box' | 'ripple' | 'bend' | 'reveal' | 'parallax' | 'ambient' | 'hover-preview' | 'sequence' | 'expand' | 'zoom-scroll' | 'compare' | 'lightbox' | 'panorama' | 'tilt' | 'tone' | 'flipbook' | 'spin' | 'glitch' | 'pixelate' | 'video-hover' | 'stack' | 'coverflow' | 'carousel' | 'polaroids' | 'spotlight' | 'scrub' | 'chroma' | 'liquid' | 'flare' | 'frost' | 'reflection' | 'text-reveal' | 'scramble' | 'marquee' | 'video-text' | 'split-flap' | 'magnet' | 'assemble' | 'dust' | 'text-glitch' | 'neon' | 'extrude' | 'counter' | 'shimmer' | 'rotator' | 'inflate' | 'orbit' | 'voxel' | 'emboss' | 'shatter' | 'melt' | 'unfold' | 'blinds' | 'physics' | 'fire' | 'water' | 'keycaps' | 'lens' | 'prism' | 'hologram' | 'gradient' | 'dots' | 'waves' | 'stars' | 'blobs' | 'clouds' | 'device' | 'book' | 'hotspots' | 'vinyl' | 'beat' | 'visualizer' | 'confetti' | 'sparkles' | 'snow' | 'emoji' | 'drops' | 'beam' | 'glow' | 'shine' | 'chart' | 'graph' | 'heatmap' | 'map'>(
  target: Target,
  name: N,
  params?: Partial<ParamsOf<SpecFor<N>>>,
  options?: AttachOptions,
): EffectHandle<SpecFor<N>>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `target` | `Target` |  |
| `name` | `N` |  |
| `params?` | `Partial<ParamsOf<SpecFor<N>>>` |  |
| `options?` | `AttachOptions` |  |

Also exported from `@dioramajs/effects`.

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