A light-weight tab panel component with allowing limitless panels without any content restriction.
Size - 1.92KiB
npm install @reuzun/tabpanel-webcomponent
Nth button changes content to Nth content.
<script src="./node_modules/@reuzun/tabpanel-webcomponent/dist/tab-panel.js"></script>
<tab-panel width="75%" height="250px">
<anything slot="button"></anything>
<anything slot="content"></anything>
<anything slot="button"></anything>
<anything slot="content"></anything>
</tab-panel>
<tab-panel width="300px" height="700px" direction="rtl">
<anything slot="content"></anything>
<anything slot="content"></anything>
<anything slot="button"></anything>
<anything slot="button"></anything>
</tab-panel>
Command | Description | Default | Allowed Values |
---|---|---|---|
width |
Width of the tab-panel | 400px | Same with css. |
height |
Width of the tab-panel | 400px | Same with css. |
direction |
Direction of buttons to Content | 'ttb' | 'ltr', 'rtl', 'ttb', 'btt' |
ltr | rtl | ttb | btt |
---|---|---|---|
cd demo
npm install
- open demo.html
Licensed under MIT License.