https://github.com/devlop/tabwrap
Minimalistic utility to add tab wrapping to any element, such as dialogs and popups.
https://github.com/devlop/tabwrap
javascript tabbing typescript ux
Last synced: 2 months ago
JSON representation
Minimalistic utility to add tab wrapping to any element, such as dialogs and popups.
- Host: GitHub
- URL: https://github.com/devlop/tabwrap
- Owner: devlop
- License: mit
- Created: 2021-11-20T07:13:27.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-22T09:24:28.000Z (over 3 years ago)
- Last Synced: 2025-03-05T22:08:13.562Z (2 months ago)
- Topics: javascript, tabbing, typescript, ux
- Language: HTML
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# tabwrap
Minimalistic utility to add tab wrapping to any element, such as dialogs and popups.
# Installing
using npm
```bash
npm install @devlop/tabwrap
```# Usage
```html
```
```javascript
import tabwrap from '@devlop/tabwrap';tabwrap(document.querySelector('div.dialog'));
```## Simplified usage on multiple elements
If you have many places you want to add tab wrapping it can usefull to give all your elements you wish to target
the same attribute, for example `data-tabwrap`, then it's easy to add tab wrapping to them all like this.```javascript
import tabwrap from '@devlop/tabwrap';document.querySelectorAll('[data-tabwrap]').forEach(function (element) {
tabwrap(element);
});
```