getNavItems (Beta)

Use this wire adapter to retrieve the items in the navigation menu.

getNavItems uses this User Interface API resource.

  • formFactor— (Optional) The response includes navigation items that support this form factor.

    • Large—(Default) Desktop display size.
    • Medium—Tablet display size.
    • Small—Phone display size. To get a value to pass as the formFactor, use the @salesforce/client/formFactor module.
  • navItemNames—(Optional) A comma-delimited list of TabDefinition name values to include in the response. If navItemNames isn’t specified, the response includes all the navigation items for the specified formFactor.

  • page— (Optional) The page offset from which to begin returning nav items. The default value is 0, which returns nav items from the first page. For example, for page=2 and pageSize=10, the first item returned is the 21st item in the list.

  • pageSize— (Optional) The maximum number of nav items to return on a page. The default value is 25.

  • propertyOrFunction—A private property or function that receives the stream of data from the wire service. If a property is decorated with @wire, the results are returned to the property’s data property or error property. If a function is decorated with @wire, the results are returned in an object with a data property and an error property.