🛶Navigation
Changelog
NavPills
Breaking changes
tabshas 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:
dangerreplaced byerror,themeandthemeWithBackground.horizontal: booleanproperty has been replaced byorientation: 'horizontal' | 'vertical'alignCenterproperty has been removed.capitalizeis now defaultfalsefullWidthis now defaultfalse, it sets the width tofit-content
Improvements
The new
NavPillscomponent, now handles tab changes by default, it uses0based index values. To override the default implementationonChangeandactiveproperties must be used.colorproperty overridesindicatorColorandselectedColor, and also comes with themed background colors combinations.gradientboolean property, applies a gradient background to the selectedcolor.variantis now by defaultscrollable
New features
The new
tabPropsproperty, also extends Matrial-UITabPropsand allows customizing all tabs at once (e.g. changing icon position).New
orientationproperty allows switching betweenhorizontaltabs andverticalones.indicatorColorallows changing the indicator bottom line of the selected tab.selectedColorchanges the selected tab's text color, keeping the background transparent.Tabs can now be individually customized using the new
propsproperty 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