{%- extends "theming/base_component.html" -%} {%- set parametrized = parametrized or [ "main_nav", "main_nav_item", "account_nav", "account_nav_item", "sidebar_nav", "sidebar_nav_item", "content_nav", "content_nav_item", "page_action", "page_action_wrapper", "content_action", "content_action_wrapper", ] -%} {%- block overview -%}
The nav_item component creates navigation menu items that serve
as individual elements within navigation structures. These components are the
fundamental building blocks of navigation menus, providing the clickable
elements that allow users to move between different sections of the site.
Nav item components handle proper styling, active state indication, and accessibility attributes to ensure navigation is both visually clear and functionally accessible. They can contain various types of content including text, icons, or other components, making them flexible for different navigation requirements. The component ensures consistent appearance and behavior across different navigation contexts.
Collection of nav_item components must be wrapped into nav.
Usually, nav_item component is not used directly. Instead,
depending on the context, one of the following specialized components is
used to create navigation items that are appropriate for specific
navigation menus and contexts:
main_nav_item: For main site navigation menus.account_nav_item: For account-related navigation menus.content_nav_item: For content-specific navigation menus.sidebar_nav_item: For sidebar navigation menus.page_action: For page-specific action items.content_action: For content-specific action items.
These components are built on top of the base nav_item component
in most cases, providing additional styling, context-specific behavior, and
appropriate attributes to ensure they fit seamlessly into their respective
navigation structures. Additionally, they must be wrapped into appropriate form of nav components
to ensure consistent layout and styling across the site:
main_nav: For main site navigation.account_nav: For account-related navigation.content_nav: For content-specific navigation.sidebar_nav: For sidebar navigation.page_action_wrapper: For page-specific action items.content_action_wrapper: For content-specific action items.
The main_nav_item component creates navigation items
specifically for the main site navigation menu. These components represent
the primary navigation options that users will encounter on most pages,
typically linking to major sections of the site like datasets,
organizations, groups, or user accounts.
Main nav items are designed to be prominent and easily identifiable, often featuring larger text, distinctive styling, or other visual elements that make them stand out as primary navigation options.
The account_nav_item component creates navigation
items specifically for account-related navigation menus. These components
provide links to account-specific sections such as profile management,
dashboard, settings, or other user account functions.
Account nav items are typically displayed in account-related contexts or in persistent account menus that appear when users are logged in.
The content_nav_item component creates navigation
items for content-specific navigation menus. These components provide
navigation options related to specific content items, such as tabs for
different aspects of a dataset, organization, or other content entity.
Content nav items are context-sensitive and typically appear on content-specific pages where users need to navigate between different aspects or views of the same content.
The sidebar_nav_item component creates navigation items for
sidebar navigation menus. These components are designed to be used within
sidebar navigation structures, providing links to various sections or
features of the site that are relevant to the sidebar context.
The page_action component creates page-specific action
items that provide quick access to actions related to the current page or
context. These components typically appear as buttons or links that allow
users to perform actions like "Add Dataset", "Create Group", or other
page-specific functions.
The content_action component creates content-specific
action items that provide actions related to specific content items. These
components typically appear near or within content displays and allow users
to perform actions like editing, sharing, or managing specific content
items.