Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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:
- Host: GitHub
- URL: https://github.com/nwaughachukwuma/svelte-element-portal
- Owner: nwaughachukwuma
- Created: 2022-03-26T14:19:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-25T17:27:49.000Z (about 2 years ago)
- Last Synced: 2024-11-09T15:45:28.692Z (2 months ago)
- Language: JavaScript
- Homepage: https://svelte.dev/repl/1496bee2c5d642b0baa8158c33cc1d16?version=3.46.6
- Size: 194 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"