Navigation
Changelog
NavPills
Breaking changes
tabs
has a new structure:
tabs: {
// Replaces old `tabButton` property
label?: string | React.ReactElement
// Replaces old `tabIcon` property
icon?: string | React.ReactElement
// Replaces old `tabContent` property
content: React.ReactNode
/** New optional property
* Custom tab properties that apply to the current Tab element */
props?: Omit<TabProps, 'icon' | 'label'>
}[]
the following colors are no longer supported:
danger
replaced byerror
,theme
andthemeWithBackground
.horizontal: boolean
property has been replaced byorientation: 'horizontal' | 'vertical'
alignCenter
property has been removed.capitalize
is now defaultfalse
fullWidth
is now defaultfalse
, it sets the width tofit-content
Improvements
The new
NavPills
component, now handles tab changes by default, it uses0
based index values. To override the default implementationonChange
andactive
properties must be used.color
property overridesindicatorColor
andselectedColor
, and also comes with themed background colors combinations.gradient
boolean property, applies a gradient background to the selectedcolor
.variant
is now by defaultscrollable
New features
The new
tabProps
property, also extends Matrial-UITabProps
and allows customizing all tabs at once (e.g. changing icon position).New
orientation
property allows switching betweenhorizontal
tabs andvertical
ones.indicatorColor
allows changing the indicator bottom line of the selected tab.selectedColor
changes the selected tab's text color, keeping the background transparent.Tabs can now be individually customized using the new
props
property available on each tab element from the array of tabs (e.g. disabling a tab):
tabs: {
{...}
//Custom tab properties that apply to the current Tab element
props?: Omit<TabProps, 'icon' | 'label'>
}[]
Last updated