wired-tabs
v2.1.1
Published
Hand-drawn sketchy tabs - web component
Downloads
87
Maintainers
Readme
wired-tabs
Hand-drawn sketchy Tabs web component.
For demo and view the complete set of wired-elememts: wiredjs.com
Usage
Add wired-tabs to your project:
npm i wired-tabs
Import wired-tabs definition into your HTML page:
<script type="module" src="wired-tabs/lib/wired-tabs.js"></script>
Or into your module script:
import { WiredTab, WiredTabs } from "wired-tabs"
Use it in your web page:
<wired-tabs selected="Two">
<wired-tab name="One">
<h4>Card 1</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</wired-tab>
<wired-tab name="Two">
<h4>Card 2</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</wired-tab>
<wired-tab name="Three">
<h4>Card 3</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</wired-tab>
</wired-tabs>
WiredTabs Properties
selected - Name of the currently selected tab
WiredTab Properties
name - Unique identifier for that tab. Used for selection.
label - Text to show in the tab. Defaults to the name property.
Custom CSS Variables
--wired-item-selected-bg Background color of the selected tab.
--wired-item-selected-color Text color of the selected tab.