# toggle

Toggles checked state, treating the mixed state as unchecked.

## Signatures

```ts
export declare function toggle<E, R>(state: RefSubject.RefSubject<State, E, R>): Effect.Effect<State, E, R>;
```



## Examples

```ts
import { Effect } from "effect"
import * as Checkbox from "@typed/ui/Checkbox"

const program = Effect.gen(function* () {
  const state = yield* Checkbox.makeState({ checked: "mixed" })
  yield* Checkbox.toggle(state)
})
```
