0.0.6 • Published 1 year ago

@digital-butlers/components-test v0.0.6

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Digitalbutlers-components

Usage

Install library

npm install @digital-butlers/components

or

pnpm add @digital-butlers/components

Import library and initialize script

// for tabs
import { Tabs } from '@digital-butlers/components';

const SELECTORS = {
	TABS_WRAPPER: '[data-role="tabs-wrapper"]',
	PANEL_LIST: '[data-role="panel-list"]',
	TAB_LIST: '[data-role="tab-list"]',
};

	const tabsVertical = new Tabs(SELECTORS.COMPONENT, {
	tabpanelsListSelector: SELECTORS.PANEL_LIST,
	tabbuttonsListSelector: SELECTORS.TAB_LIST,
	orientation: 'vertical',
	deletableTabs: true,
	animation: {
		delay: 1000,
	},
	triggerEvent: 'mouseover',
	matchMediaRule: '(min-width: 600px)',
	// equalHeight: true,
	autoplay: {
		delay: 0,
	},
	on: {
		tabChange: (tabs) => {
			console.log(tabs.activeIndex);
		},
	},
});

Documentation for tabs

0.0.3

1 year ago

0.0.2

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.6

1 year ago

0.0.1

1 year ago