ControlGroup

ControlGroup is a layout component for displaying controls. It should be used primarily on parent-level settings pages.

Internal Component

This component is intended solely for use within GitHub and is not available for external use.

Props

ControlGroup

NameDefaultDescription
border
boolean
fullWidth
boolean
data-testid
string
className
string

ControlGroup.Item

NameDefaultDescription
nestedLevel
0
0 | 1 | 2 | undefined
disabled
false
boolean
contentsClassname
string

ControlGroup.LinkItem

NameDefaultDescription
href Required
string
leadingIcon
ReactNode
nestedLevel
0
0 | 1 | 2 | undefined
value
string

ControlGroup.Selector

NameDefaultDescription
title Required
string

Title of the selection first row

description
string

Description of the selection first row

selectorIcon
Icon

Icon to show in the mode selector in the first row

selectedMode
string

The currently selected mode

onModeChange
((mode: string) => void) | undefined

Callback when the mode changes

modes Required
Mode[]

The available mode options. If there's only one, selector dropdown is not displayed and the mode editor is shown directly in the first row.

labelId
string
descriptionId
string