HorizontalNav Props with types
Props | Type | Description | Default |
---|---|---|---|
switchToVertical | boolean | Switch menu orientation to vertical if set to true | false |
hideMenu | boolean | Hide the menu when breakpoint size is reached on window resize. | - |
breakpoint | xs | sm | md | lg | xl | xxl | always | Set when the sidebar should trigger responsiveness behavior | lg |
breakpoints | Partial<typeof defaultBreakpoints> | Set custom breakpoints when the sidebar should trigger responsiveness behavior | - |
customBreakpoint | string | Set custom breakpoint value, this will override breakpoint prop | - |
customStyles | CSSObject | Set custom styling for the horizontal navigation | - |
verticalNavProps | { width?: number; backgroundColor?: string; backgroundImage?: string; customStyles?: CSSObject; } | Change the look of the Vertical navigation when breakpoint is reached | width: {260} |
verticalNavContent | { ({ children }: ChildrenType) => JSX.Element } | Change the content of the Vertical navigation when breakpoint is reached | width: {260} |
Here is the defaultBreakpoints
props type:
defaultBreakpoints: Record<BreakpointType, string> = {
xs: '480px',
sm: '600px',
md: '900px',
lg: '1200px',
xl: '1536px',
xxl: '1920px',
always: 'always'
}