>`, default `8`): The amount in pixels of virtual padding around the viewport edges to check for overflow which will cause a collision.
- `customAnchor` (`string | HTMLElement | Measurable | null`): Use an element other than the trigger to anchor the content to. If provided, the content will be anchored to the provided element instead of the trigger. You can pass a selector string or an HTMLElement.
- `dir` (`"ltr" | "rtl"`): The text direction of the content.
- `escapeKeydownBehavior` (`"close" | "defer-otherwise-close" | "defer-otherwise-ignore" | "ignore"`, default `close`): Escape behavior type. `close`: Closes the element immediately. `defer-otherwise-close`: Delegates the action to its parent component that has an escape keydown handler. If no parent is found, it closes the element. `defer-otherwise-ignore`: Delegates the action to the parent element. If no parent is found, nothing is done. `ignore`: Prevents the element from closing and also blocks the parent element from closing in response to an escape key press.
- `forceMount` (`boolean`): When `true`, the link preview content will be forced to mount in the DOM. Useful for more control over the transition behavior.
- `hideWhenDetached` (`boolean`)
- `interactOutsideBehavior` (`"close" | "defer-otherwise-close" | "defer-otherwise-ignore" | "ignore"`, default `close`): Interact outside behavior type. `close`: Closes the element immediately. `defer-otherwise-close`: Delegates the action to the parent element. If no parent is found, it closes the element. `defer-otherwise-ignore`: Delegates the action to the parent element. If no parent is found, nothing is done. `ignore`: Prevents the element from closing and also blocks the parent element from closing in response to an outside interaction.
- `onEscapeKeydown` (`((e: KeyboardEvent) => void)`): Callback fired when escape is pressed.
- `onFocusOutside` (`((event: FocusEvent) => void)`): Callback fired when focus leaves the dismissible layer.
- `onInteractOutside` (`InteractOutsideEventHandler`): Callback fired when an outside interaction event completes, which is either a `pointerup`, `mouseup`, or `touchend` event, depending on the user's input device.
- `portalProps` (`PortalProps`): Props for the portal the content renders in: `to` (the element to render in, the body by default) and `disabled` (render in place).
- `side` (`"top" | "right" | "bottom" | "left"`, default `'bottom'`): The preferred side of the anchor to render against when open. Will be reversed when collisions occur.
- `sideOffset` (`number`, default `4`): The distance in pixels from the anchor to the floating element.
- `sticky` (`"partial" | "always"`)
Props of `LinkPreview.Portal`:
- `disabled` (`boolean`, default `false`): Disable portalling and render the component inline
- `to` (`PortalTarget`, default `document.body`): Where to portal the content to.
Example: A mention
A profile behind an @mention. The link works as a link; the card is extra, for mouse users.
```svelte
Week 49 was approved by
@anna
AB
Anna Berg
Project lead, Zest. Approves hours for 12 people.
```