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

https://github.com/pxlrbt/filter-elements

Filter HTML Elements by tag based filters by setting an data attribute.
https://github.com/pxlrbt/filter-elements

filter htmlelement javascript js

Last synced: 11 months ago
JSON representation

Filter HTML Elements by tag based filters by setting an data attribute.

Awesome Lists containing this project

README

          

# Filter Elements

Let's you filter HTML Elements by tag based filters by setting an data attribute. Supports clickable handles and selects.

## Installation

```bash
npm install @pxlrbt/filter-elements
```

## Usage

```js
import FilterElements from '@pxlrbt/filter-elements';
var filter = new FilterElements();
```

```html
All
JavaScript
HTML






```

```css
[data-filterable] {
display: none;
}

[data-filter-filtered="false"] {
display: block;
}
```