Tabs

Tabs UI Component

Installation

npm i @synerise/ds-tabs
or
yarn add @synerise/ds-tabs

Usage

import Tabs from '@synerise/ds-tabs'
<Tabs tabs={[{label: 'Tab 1'}, {label: 'Tab 2}]]} activeTab={0} handleTabClick={() => {}} />

Demo

API

Tabs

PropertyDescriptionTypeDefault
activeTabActive tab indexnumber-
configurationShows additional position in tabs dropdownConfiguration-
handleTabClickCallback fired when user clicks on the tab(index: number) => void-
tabsArray of tabsTab[][]
underscoreUnderscore active itembooleantrue

Tab

PropertyDescriptionTypeDefault
disabledFlag of disabled tabsbooleanfalse
icontab iconIcon-
labelLabel of tabstring-
underscoreUnderscore active itembooleantrue

Configuration

PropertyDescriptionTypeDefault
actionCallback fired when user clicks on the configuration buttonIcon-
disabledFlag of disabled configuration buttonboolean-
labelLabel of configuration buttonstring-