# makeState

Creates hydrated Listbox state. value and activeId default to null, loop defaults to true, and
roving focus is used.

## Signatures

```ts
export declare function makeState(initial?: InitialState): Effect.Effect<RefSubject.HydratedRefSubject<{
    readonly value: string | null;
    readonly activeId: string | null;
    readonly orientation: "vertical";
    readonly loop: boolean;
    readonly rtl: boolean;
    readonly virtualFocus: boolean;
}, Schema.SchemaError, never, never>, never, Scope.Scope>;
```



## Examples

```ts
import * as Effect from "effect/Effect";
import * as Listbox from "@typed/ui/Listbox";

const program = Effect.scoped(
  Effect.gen(function* () {
    const state = yield* Listbox.makeState({});
    const collection = yield* Listbox.makeCollection();
    return { state: yield* state, collection: yield* collection };
  }),
);
```
