@sqlrooms/ui / TabStripProps
Interface: TabStripProps
Properties
className?
optionalclassName?:string
tabsListClassName?
optionaltabsListClassName?:string
children?
optionalchildren?:ReactNode
tabs
tabs:
TabDescriptor[]
All available tabs.
openTabs?
optionalopenTabs?:string[]
IDs of tabs that are currently open.
selectedTabId?
optionalselectedTabId?:string|null
ID of the currently selected tab.
preventCloseLastTab?
optionalpreventCloseLastTab?:boolean
If true, hides the close button when only one tab remains open.
closeable?
optionalcloseable?:boolean
Whether tabs can be closed. Defaults to true.
onClose?
optionalonClose?: (tabId) =>void
Called when a tab is closed (hidden, can be reopened).
Parameters
| Parameter | Type |
|---|---|
tabId | string |
Returns
void
onOpenTabsChange?
optionalonOpenTabsChange?: (tabIds) =>void
Called when the list of open tabs changes (open from dropdown or reorder).
Parameters
| Parameter | Type |
|---|---|
tabIds | string[] |
Returns
void
onSelect?
optionalonSelect?: (tabId) =>void
Called when a tab is selected.
Parameters
| Parameter | Type |
|---|---|
tabId | string |
Returns
void
onCreate?
optionalonCreate?: () =>void
Called when a new tab should be created.
Returns
void
onRename?
optionalonRename?: (tabId,newName) =>void
Called when a tab is renamed inline.
Parameters
| Parameter | Type |
|---|---|
tabId | string |
newName | string |
Returns
void
renderTabMenu?
optionalrenderTabMenu?: (tab) =>ReactNode
Render function for the tab's dropdown menu. Use TabStrip.MenuItem and TabStrip.MenuSeparator.
Parameters
| Parameter | Type |
|---|---|
tab | TabDescriptor |
Returns
ReactNode
renderSearchItemActions?
optionalrenderSearchItemActions?: (tab) =>ReactNode
Render function for search dropdown item actions. Use TabStrip.SearchItemAction.
Parameters
| Parameter | Type |
|---|---|
tab | TabDescriptor |
Returns
ReactNode
renderSearchItemLabel?
optionalrenderSearchItemLabel?: (tab) =>ReactNode
Render function for custom search dropdown item labels.
Parameters
| Parameter | Type |
|---|---|
tab | TabDescriptor |
Returns
ReactNode
renderTabLabel?
optionalrenderTabLabel?: (tab) =>ReactNode
Render function for custom tab content. Receives the tab and returns the content to display.
Parameters
| Parameter | Type |
|---|---|
tab | TabDescriptor |
Returns
ReactNode
fontSize?
optionalfontSize?:FontSize<string|number>
Font size applied to tab labels, inline editing, and TabStrip subcomponents.
dndMode?
optionaldndMode?:TabStripDndMode
Whether this tab strip owns its dnd context or participates in a shared parent context.
dndScopeId?
optionaldndScopeId?:string
Unique scope for shared dnd tab ids. Defaults to a generated component id.
getTabDragData?
optionalgetTabDragData?: (tab) =>TabStripDragData|undefined
Extra drag payload attached to tab drags; may intentionally override kind.
Parameters
| Parameter | Type |
|---|---|
tab | TabDescriptor |
Returns
TabStripDragData | undefined
