CodeAI

Tabs

Tab Group — primary (underline) or secondary (contained) tablist. Tab Item is an internal building block.

⌥-click (Option/Alt) nested elements to edit their props

Appearance

Value

Accessibility

Props — Tabs
View MUI docs
PropTypeDescription
type"primary" | "secondary"primary = underline; secondary = contained.
size"large" | "medium" | "small" | "extraSmall"Control height. Default medium (40).
itemsTabsItem[]Tab definitions passed to the group.
valuestringControlled selected tab value.
defaultValuestringInitial selected tab (uncontrolled).
onChange(value: string) => voidCalled when selection changes.
onItemDismiss(value: string) => voidCalled when a dismissible tab is closed.
aria-labelstringAccessible name for the tablist.
Props — Tab Item
PropTypeDescription
valuestringUnique tab identifier.
labelReactNodeTab label text.
startIconNameFaIconNameLeading icon.
endIconNameFaIconNameTrailing icon.
iconOnlybooleanHide label visually; requires aria-label.
dismissiblebooleanShow close control on this tab.
disabledbooleanDisables this tab.
aria-labelstringRequired when iconOnly is true.