UIElement Docs Version 0.13.3

🔗 Function: focus()

focus<P, E>(reactive): Effect<P, E>

Defined in: src/lib/effects.ts:476

Effect for controlling element focus by calling the 'focus()' method.
If the reactive value is true, element will be focussed; when false, nothing happens.

🔗 Type Parameters

🔗 P

P extends ComponentProps

🔗 E

E extends HTMLElement = HTMLElement

🔗 Parameters

🔗 reactive

Reactive<boolean, P, E>

Reactive value bound to the focus state

🔗 Returns

Effect<P, E>

Effect function that sets element focus

🔗 Since

0.13.3