lightning__UrlAddressable Target
Enables you to directly navigate to a component using a specific URL.
lightning__UrlAddressable doesn't accept properties within a standard__component page reference type.
The navigation attributes that determine the URL and passed data are:
| Property | Type | Description | Required |
|---|---|---|---|
componentName | String | The component's name in the format namespace__componentName (e.g., c__MyComponent). This attribute is required within the attributes object of the PageReference. | Yes |
state | Object | An object containing key-value pairs that are serialized into URL query parameters to pass state information to the component. Keys must include a namespace (e.g., c__paramName). Values must be strings. | No |
Use the lightning__UrlAddressable target to make your component accessible via a browser URL.
This target is supported only in the following types of projects. It's not supported in Experience Builder sites.
- Lightning Experience
- Salesforce Mobile App
- Custom apps, such as Lightning Console Apps
For examples of how to use lightning__UrlAddressable, check out Navigate to a URL-Addressable Component.
See Also