Edit page

TopNav

TopNav is the primary, header level navigation for a web site or application. It contains the root level pages, user logins, and the site title. The main navigation should be hidden on screen sizes smaller than the size of the navigation.

Import Syntax

Basic Usage

With React Router

Using React Router with Calcite React components is straight-forward. Pass the router component class to the as prop on whatever component needs the functionality provided by router. Props assigned to the Calcite component will be inherited by the underlying router component.

Props

TopNav default

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component.
contentWidthStringfalse-Override for contentWidth from CalciteThemeProvider (ex. '1300px'). Use "100%" for full width TopNav.
contentMaxWidthStringfalse-Override for contentMaxWidth from theme provider (ex. '95vw').

TopNavBrand

PropertyTypeRequiredDefaultDescription
altNodefalseLogoThe HTML alt property of the brand image.
srcNodefalse-The HTML src property of the brand image.
imageStyleObjectfalse-Style property for the underlying img element.

TopNavTitle

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component.
hrefStringfalse-The HTML href property of the TopNavTitle.

TopNavList

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component.
PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component.
hrefStringfalse-The HTML href property of the link. If this property is missing, the component will render as a span.

TopNavActionsList

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component.