Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kaifaty/resize-observable

Resize observable web-component
https://github.com/kaifaty/resize-observable

Last synced: 21 days ago
JSON representation

Resize observable web-component

Awesome Lists containing this project

README

        

# Resize observable

Zero dependence resize observable web component.
Based on ResizeOberver.

## [Demo](https://kaifaty.github.io/resize-reservable/)

Lit example: ``

## Install

```npm i resize-observable```

## Properties/Attributes

* * *

| Name | Prop/Attr | Type | Default | Description |
|-------------|--------------|:-------------------------|--------------------------|-------------------------|
| `levels` | Prop | `array` | [480, 600, 768, 1024, 1200, 1600, 1900] | Levels of container size |

## Events

* * *

## `resize`

Params:

| Name | Type | Description |
|-------------|--------------------|:---------------------|
| `width` | number | Levels of container size |
| `sizes` | string | classname of container. Has classes with levels such as before-768, aftrer-600 etc |