agrp.dev logo
Components
BadgeButtonCheckboxCollapseDatePickerIconIndicatorInputMessageNotificationPaginationProgressRadioSelectSkeletonSwitchTabsBasic usagePropsTextAreaTimelineTooltipsTypography

Tabs

Is a component that allows you to switch between different views.

Basic usage

Children of Tabs must have a key that corresponds with key of the tab in list, otherwise children order (index) is used.

Props

Mandatory props to make everything work as it is supposed to are activeKey, onClick, List and children.

  • activeKey: accepts string or number and indicates which tab is active at the moment
  • onClick: accepts function and is called when user clicks on tab
  • List: accepts a function component that is used to render list of tabs
  • children: accepts children of Tabs component where each child is a tab content