interface / @typed/ui/Composite

ActiveIdState

Public Composite.ActiveIdState behavioral model.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
Active item state
Since
1.0.0

Import

import { ActiveIdState } from "@typed/ui/Composite";

Signatures

export interface ActiveIdState {
    readonly activeId: string | null;
    readonly loop: boolean;
}

Why

The public model lets custom composites reuse Composite’s deterministic policy without copying an internal shape.

Ownership and lifetime

This declaration is data or schema metadata and acquires no resources.

Example

Import with import type { ActiveIdState } from "@typed/ui/Composite"; Extend the Composite.makeState runnable setup. A compatible focus state is observable directly: const active: ActiveIdState = yield* state.

Property: activeId

Id currently active for keyboard navigation; null means no active item.

Property: loop

Whether movement wraps between the first and last enabled items.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source