Trap Focus
The trapFocus
helper allows you to trap the focus within a Modal.
When to use
This helper is ideal for when you are using a custom Modal.
Usage
API
Arguments
The trapFocus
helper accepts a single argument:
Name | Default | Description |
---|---|---|
ref | null | The ref of the dialog element to trap focus within. |