https://github.com/uiwebkit/tabs
Uni Tabs
https://github.com/uiwebkit/tabs
custom-elements javascript tab tab-bar tabs tabs-management tabs-widget tabswitcher typescript web-components webcomponents
Last synced: 5 months ago
JSON representation
Uni Tabs
- Host: GitHub
- URL: https://github.com/uiwebkit/tabs
- Owner: uiwebkit
- License: mit
- Created: 2021-11-30T18:44:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-13T10:21:24.000Z (over 2 years ago)
- Last Synced: 2025-01-29T18:47:42.184Z (about 1 year ago)
- Topics: custom-elements, javascript, tab, tab-bar, tabs, tabs-management, tabs-widget, tabswitcher, typescript, web-components, webcomponents
- Language: HTML
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README

# Uni Tabs
Uni Tabs is a set of Web Components & Custom Elements for adding webpage tabs and customize it in the declarative style.
Uni Tabs components have three modes:
1. Custom Element - `100%` convenience;
2. Web Component - `100%` security;
3. Unpacked - `100%` customization;
Uni Tabs takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components & Custom Elements that run in any browser supporting the Custom Elements v1 spec.
Uni Tabs components are just HTML Web Components & Custom Elements, so they work in any major framework or with no framework at all.
## Getting Started
Clone this repo to a new directory:
```bash
git clone https://github.com/uiwebkit/tabs.git uni-tabs
cd uni-tabs
```
and run:
```bash
npm i
npm run serve:dev
```
To build the component for production, run:
```bash
npm run build:prod
```
Check out our docs [here](https://uiwebkit.com/wgt/tabs/1/).
## Naming Components
When creating new component tags, use `uni` in the component name (ex: ``) or use a prefix that fits your company or any name for a group of related components. For example, all the UiWebKit generated Web Components & Custom Elements use the prefix `uni`.
## Using Components
There are two strategies we recommend for using Uni Tabs:
### Script tag
- Put a script tag `` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc
### Node Modules
- Run `npm i @uiwebkit/tabs --save`
- Paste import '@uiwebkit/tabs'; into the main JS/TS file;
- Then you can use the element anywhere in your template, JSX, html etc