function / @typed/ui/index

Focusable.Focusable

Renders a keyboard-focusable host without inventing widget semantics.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
Keyboard focus
Since
1.0.0
Member of
Focusable

Import

import { Focusable } from "@typed/ui/index";

Access Focusable.Focusable through the imported Focusable export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export declare function Focusable<const Options extends FocusableOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, FocusableInternalProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;

Why

The component provides a small native DOM primitive for higher-level composites while requiring callers to choose an appropriate role and label.

Ownership and lifetime

The returned Fx starts on execution; its Scope owns dynamic subscriptions and listener/ref cleanup. Custom hosts must retain the supplied tab index.

Examples

import { Focusable } from "@typed/ui/Focusable"

const region = Focusable({ role: "region", content: "Keyboard target" })

Other public imports

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

Source