Caspeco WebComponents - v3.7.0
    Preparing search index...

    Type Alias NavigationSingleItemProps

    NavigationSingleItemProps: {
        canonicalHref?: string;
        href?: string;
        id?: string;
        isActiveUrlPattern?: string;
        notifications?: number;
        open?: undefined;
        subItems?: undefined;
    } & ({ id: string } | { href: string })

    Type Declaration

    • OptionalcanonicalHref?: string

      A stable, canonical URL used for the "last visited" section on the overview page.

      It should not include volatile segments such as user IDs, order numbers, etc., so that different concrete URLs map back to the same logical destination.

      // Concrete link the user clicks
      href = "/payroll/staff/23/timereport/2025-01-25";

      // Canonical form stored for the "last visited" section
      trackedHref = "/payroll/staff/timereport";
    • Optionalhref?: string

      The URL that the navigation item links to when clicked. Must be defined if id is undefined.

    • Optionalid?: string

      An optional unique identifier (useful for applying custom behavior onClick).

    • OptionalisActiveUrlPattern?: string

      An optional regex pattern (as a string accepted by new RegExp()) used to check if this item is active, tested against the pathname of currentLocation.

      For example, /communication/(inbox|archive) marks the item active for /communication/inbox or /communication/archive, but not /communication/contact.

      If not provided, the item is active whenever currentLocation starts with (or is equal to) href. For instance, if href is /payroll/month, it would be active if currentLocation is /payroll/month/warningList/2024-01-25.

    • Optionalnotifications?: number

      The number of notifications associated with this item.

    • Optionalopen?: undefined

      Not allowed on single items.

    • OptionalsubItems?: undefined

      Not allowed on single items.

    • { id: string }
    • { href: string }