Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nwaughachukwuma/svelte-element-portal

Escape parent overflow by rendering an element over its ancestor :v:
https://github.com/nwaughachukwuma/svelte-element-portal

Last synced: about 2 months ago
JSON representation

Escape parent overflow by rendering an element over its ancestor :v:

Awesome Lists containing this project

README

        

# Svelte-Element-Portal

Make an element escape its parent overflow by rendering it over an ancestor element in the DOM :v:. This is useful for rendering a tooltip or popover in place, over an element whose parent overflow is hidden.

[Demo](https://svelte.dev/repl/1496bee2c5d642b0baa8158c33cc1d16?version=3.46.6)

## Usage

```svelte

import ElementPortal from 'svelte-element-portal';





Item 1





```

## 🥢 Props

### target

HTMLElement or selector, which must have a defined position := relative. Defaults to "body"