TopNav#
The <TopNav> component renders a list of links or items used for navigation.
Bumbag's navigation you see at the top is built with <TopNav> & it fits perfectly alongside the PageWithHeader component.
Import#
import { TopNav } from 'bumbag'
Usage#
Editable example
Variants#
Pill#
Editable example
Selected items#
Controlled#
Editable example
Uncontrolled#
Editable example
Props#
TopNav Props#
defaultSelectedId string
onChange any
selectedId string
Inherits Navigation props
Inherits Box props
use
string
| (ComponentClass<any, any> & { useProps: any; })
| (FunctionComponent<any> & { useProps: any; })className string
children
string
| number
| boolean
| {}
| ReactElement<any, string
| ((props: any) => ReactElement<any, string
| ...
| (new (props: any) => Component<any, any, any>)>)
| (new (props: any) => Component<...>)>
| ReactNodeArray
| ReactPortal
| ((props: BoxProps) => ReactNode)alignX "right" | "left" | "center"
alignY "top" | "bottom" | "center"
variant string
colorMode string
disabled boolean
overrides
{
useCSSVariables?: boolean;
altitudes?: AltitudesThemeConfig;
borders?: BordersThemeConfig;
borderRadii?: BorderRadiiThemeConfig;
... 95 more ...;
Template?: TemplateThemeConfig;
}elementRef ((instance: any) => void) | RefObject<any>
themeKey string
Theming#
TopNav.styles.baseTopNav.Section.styles.baseTopNav.Item.styles.baseTopNav.Item.styles.activeTopNav.Item.styles.hoverTopNav.Item.styles.focusOn this page

