Skip to main content

focus

On mount, focuses and selects the first enabled control in the form that accepts text input. Set it when the editor opens in a panel or modal and the user should start typing right away.

Usage

focus?: boolean;

Default: false.

Example

<script>
import { Editor, Willow } from "@svar-ui/svelte-editor";

const items = [{ comp: "text", key: "name", label: "Name" }];
const values = { name: "John Doe" };
</script>

<Willow>
<Editor {items} {values} focus placement="modal" />
</Willow>