Back to Grafana

TabsBar

packages/grafana-ui/src/components/Tabs/TabsBar.mdx

13.0.1652 B
Original Source

import { ArgTypes } from '@storybook/blocks'; import { Counter } from './Counter'; import { Tab } from './Tab';

TabsBar

A composition component for rendering a TabBar with Tabs for navigation.

It has two modes - navigation and onClick. Navigation renders it as a simple <a> element. To enable it, use the href prop. The onClick mode uses an onClick handler instead. To enable it, use the onChangeTab prop.

Warning! Using href and onChangeTab at the same time may have unintended consequences.

Tab

<ArgTypes of={Tab} />

Counter

A count indicator displayed alongside tabs and showing numeric values.

<ArgTypes of={Counter} />