Skip to content

Commit

Permalink
docs: Add watchFocus option
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Shingler committed Jul 10, 2024
1 parent 8e7c18c commit ff1141c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -640,3 +640,12 @@ Embla automatically watches the [container](/api/methods/#containernode/) for **
</Admonition>

---

### watchFocus

Type: <BrandPrimaryText>`boolean | () => void`</BrandPrimaryText>
Default: <BrandSecondaryText>`true`</BrandSecondaryText>

Embla automatically watches the [slides](api/options/#slides) for focus events. The default callback fires the [slideFocus](/api/events/#slidefocus/) event and [scrolls](/api/methods/#scrollto/) to the focused element. Set this to `false` to disable this behaviour or pass a custom callback to add your own focus logic.

---

0 comments on commit ff1141c

Please sign in to comment.