@svackages/set-focus
v1.0.3
Published
![svackage logo](https://raw.githubusercontent.com/svackages/persistent-store/main/logo.png) # Svelte action set-focus
Downloads
79
Readme
Svelte action set-focus
- will set focus on
a
orbutton
as soon as element mounts. - will return focus to previous element when closed
How to
<div
use:setFocus>
<h2>I am an overlay</h2>
<button>Focus will be set here</button>
</div>
REPL
https://svelte.dev/repl/fa3cd21b4dd24b60a578386f7a1b6dc0?version=3.44.2