TopNav is a horizontal navigation bar for product-level navigation in application headers. Use TopNav for 5 or fewer always-visible navigation items, or minimal navigation paired with search and controls. For complex navigation hierarchies, use a sidebar; to filter content, use tabs or filter buttons instead.
Include a product logo and name in the heading slot to clearly identify the application.
Limit primary navigation items to 5 or fewer for quick scanning and minimal cognitive load.
Avoid using TopNav to filter page content; use Tabs or filter controls instead.
Avoid deeply nested navigation hierarchies; keep menus to one level of depth.
Typed props
Prop
Type and behavior
heading
ReactNode
Heading slot content (logo, brand): positioned at the left edge of the nav bar.
Alias for startContent. Prefer startContent when composing with heading, centerContent, or endContent; children keeps the common React nav-item pattern from silently dropping items.
Center content slot (tabs, search bar, primary navigation): when provided, switches the layout to a three-column CSS grid for true horizontal centering.