Positioning
Toast target option
Toasts can be displayed at a relative position to a specific element, similar to a tooltip, using the target option.
toast('toast target', { target: { element: element.current, offset: [30, 30], }, });
Toasts can be displayed at a relative position to a specific element, similar to a tooltip, using the target option.
| option | description | type | required |
|---|---|---|---|
| element | Target element where toast will be located | HTMLElement | true |
| offset | Offset away from element | [number, number] | false |
toast('toast target', { target: { element: element.current, offset: [30, 30], }, });