[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/flow](../../README) / [index](../README) / FlowChain

# Interface: FlowChain\<T\>

Defined in: [flow/src/utils.ts:121](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L121)

The fluent modifier chain returned by [flow](../functions/flow). Each accessor/method appends a
directive modifier and returns the same chain, so calls compose left-to-right; the
chain is a no-op transparent Proxy at runtime and is consumed by the JSX compiler,
which reads `__isFlow`/`__target`/`__modifiers`/`__key` to emit the `flow:*` attributes.

Generic over `T` so the compiler preserves the wrapped target's type (a bound property,
an `@expose` method, or a client arrow-function expression).

## Example

```tsx
// Binding modifiers on an input, and event modifiers on a form/button:
<input bind={flow(this.query).live} />                 // flow:model.live="query"
<form onSubmit={flow(this.save).prevent}>…</form>       // flow:submit.prevent="save"
<button onClick={flow(this.refresh).debounce(300)}>↻</button>
```

Binding modifiers  (bind={flow(this.field)...})
  .live            sync on every keystroke  (flow:model.live)
  .blur            sync on blur             (flow:model.blur)
  .lazy            defer until explicit save (flow:model.lazy)
  .fill            also fill sibling fields  (flow:model.fill)
  .debounce(ms)    debounce by ms            (flow:model.debounce.300ms)
  .throttle(ms)    throttle by ms            (flow:model.throttle.300ms)

Server event modifiers  (onClick={flow(this.method)...})
  .prevent         event.preventDefault()    (flow:click.prevent)
  .stop            event.stopPropagation()   (flow:click.stop)
  .once            remove after first fire   (flow:click.once)
  .self            target === currentTarget  (flow:click.self)
  .window          attach to window          (flow:keydown.window)
  .document        attach to document        (flow:keydown.document)
  .outside         click outside element     (flow:click.outside)
  .passive         addEventListener passive  (flow:scroll.passive)
  .capture         addEventListener capture  (flow:click.capture)
  .camel           camelCase event name      (flow:custom-event.camel)
  .debounce(ms)    debounce action           (flow:click.debounce.300ms)
  .throttle(ms)    throttle action           (flow:click.throttle.300ms)
  .confirm(msg)    confirm dialog first      (flow:click.confirm)

Client expressions  (onClick={flow(() => this.expr)})
  An anonymous arrow function as target signals a client-side expression.
  `this.` is rewritten to `$flow.` so TypeScript checks the access against
  the Component class while the browser evaluates it via the reactive proxy.
  Emits flow:click (not x-on:click) — the bridge detects `$flow` and
  evaluates it in Alpine context instead of sending a WebSocket action.
  All event modifiers still apply.

  <button onClick={flow(() => (this.ticks = 0))}>Reset</button>
    → flow:click="($flow.ticks = 0)"

  <button onClick={flow(() => this.increment()).stop}>+</button>
    → flow:click.stop="$flow.increment()"  (calls server via $flow proxy)

Usage:
  <input bind={flow(this.query).live} />
  <form onSubmit={flow(this.save).prevent}>...</form>
  <span text={flow(this.clock)} />
  import { flow as _ } from '@zerotal/flow'; // shorthand alias

## Type Parameters

### T

`T`

The wrapped target: a bound value, an `@expose` method reference, or a
  client callback (`() => …`).

## Properties

### live

> `readonly` **live**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:123](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L123)

***

### blur

> `readonly` **blur**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:124](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L124)

***

### lazy

> `readonly` **lazy**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:125](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L125)

***

### fill

> `readonly` **fill**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:126](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L126)

***

### prevent

> `readonly` **prevent**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:129](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L129)

***

### stop

> `readonly` **stop**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:130](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L130)

***

### once

> `readonly` **once**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:131](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L131)

***

### self

> `readonly` **self**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:132](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L132)

***

### window

> `readonly` **window**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:133](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L133)

***

### document

> `readonly` **document**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:134](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L134)

***

### outside

> `readonly` **outside**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:135](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L135)

***

### passive

> `readonly` **passive**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:136](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L136)

***

### capture

> `readonly` **capture**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:137](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L137)

***

### camel

> `readonly` **camel**: `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:138](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L138)

***

### \_\_isFlow

> `readonly` **\_\_isFlow**: `true`

Defined in: [flow/src/utils.ts:146](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L146)

***

### \_\_target

> `readonly` **\_\_target**: `T`

Defined in: [flow/src/utils.ts:147](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L147)

***

### \_\_modifiers

> `readonly` **\_\_modifiers**: `string`[]

Defined in: [flow/src/utils.ts:148](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L148)

***

### \_\_key

> `readonly` **\_\_key**: `string` \| `undefined`

Defined in: [flow/src/utils.ts:149](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L149)

## Methods

### debounce()

> **debounce**(`ms`): `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:141](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L141)

#### Parameters

##### ms

`string` \| `number`

#### Returns

`FlowChain`\<`T`\>

***

### throttle()

> **throttle**(`ms`): `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:142](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L142)

#### Parameters

##### ms

`string` \| `number`

#### Returns

`FlowChain`\<`T`\>

***

### confirm()

> **confirm**(`message`): `FlowChain`\<`T`\>

Defined in: [flow/src/utils.ts:143](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/utils.ts#L143)

#### Parameters

##### message

`string`

#### Returns

`FlowChain`\<`T`\>
