🚧 Rspress 2.0 document is under development
close

Tabs/Tab

Tabs and Tab switch between multiple content panes.

Usage

Code blocks

Props

interface TabsProps {
  children: React.ReactNode;
  defaultValue?: string;
  groupId?: string;
  tabPosition?: 'left' | 'center';
}

interface TabProps {
  label: string;
  value?: string;
  children: React.ReactNode;
}

Use defaultValue to preselect a tab (matches value); groupId syncs selection across multiple Tabs; tabPosition sets list alignment.