Argent

Tabs

Switches between views, with a slug that slides.

Project overview.
import { Tabs } from '@rajatweb/argent'

<Tabs
  label="Project"
  items={[
    { value: 'overview', label: 'Overview', content: <Overview /> },
    { value: 'activity', label: 'Activity', content: <Activity /> },
  ]}
/>

Props

PropTypeDefaultWhat it does
items requiredreadonly TabItem[]
label requiredstringAccessible name of the tab list.
classNamestring
defaultValuestring
onValueChange(value: string) => void
valuestring

Accessibility

  • Arrow keys move between tabs on the web.

Do

  • Keep labels to one or two words.

Don’t

  • Use tabs for steps in order.