Tabs

Toggles a class on elements via a set of buttons.

<div ob-tabs>
	<ul>
		<li ob-tabs-toggle>Foo</li>
		<li ob-tabs-toggle>Bar</li>
		<li ob-tabs-toggle>Baz</li>
	</ul>

	<p ob-tabs-item>Vivamus eu volutpat enim. Proin …</p>
	<p ob-tabs-item>Integer ligula eros, mattis ac …</p>
	<p ob-tabs-item>Sed eget imperdiet nulla. Vestibulum …</p>
</div>
[ob-tabs-toggle].is-active {
	opacity: 0.6;
}

[ob-tabs-item]:not(.is-active) {
	display: none;
}
import { Watcher } from 'oblik'
import { Tabs } from 'oblik/components/tabs'

let w = new Watcher(document.body, {
	components: {
		tabs: Tabs
	}
})

w.init()

# Options

# active

Position in DOM of the initial item that should be activated.

Default: 1

# class

Class that should be toggled on elements.

Default: is-active

← Sharer Toggle →