---
schema_version: "1"
id: 1a56ae3f6d45ca33ac619be0c6b34ccd6b0dcfe320d6b7053bdadc2158c05da9
title: Basic Navigation
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/components/components-navigation-basic.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/components-navigation-basic.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3adec3bc537e2fa39c1d32bbc5480135beae875f8e7e4798be8ae1ef0cb33f6a
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Basic Navigation

The `pageReference` JavaScript object represents a URL for a page. You can use a `pageReference` instead of parsing or creating a URL directly. This approach helps you avoid broken navigation if Salesforce changes URL formats in the future.

Use the following resources to simplify navigation across your apps. URLs for components using these resources are case-sensitive. For examples, see the [Component Library](https://developer.salesforce.com/docs/platform/aura-platform/guide/component-library.md).

**important:** Navigation isn’t supported for inactive pages. A page is considered inactive if it’s not currently visible in the DOM, such as a minimized page.

**`lightning:navigation`**

To navigate to a page or component, use the `navigate(pageReference, replace)` method from `lightning:navigation`. This approach is a substitute for a `navigateTo*` event, and both are supported.

When you navigate to a page reference from a modal, such as from a component that’s enabled for quick actions, the modal isn’t automatically closed by default. To automatically close the modal when navigating to another page reference, set `replace` to `true`.

To generate a URL in your component, use the `generateUrl()` method in `lightning:navigation` to resolve the URL.

**note:** `generateUrl()` returns a promise, which calls back with the resulting URL.

**`lightning:isUrlAddressable`**

To enable a component to navigate directly via a URL, add the `lightning:isUrlAddressable` interface to your component.

**tip:** `pageReference` and `lightning:isUrlAddressable` replace the `force:navigateToComponent` event for navigating directly to a component. Unlike the `force:navigateToComponent` event information-mapping protocol, the only attribute populated through the navigation dispatching system is the `pageReference` attribute. Information is passed to the addressed component through the `state` properties on the target page reference. `lightning:isUrlAddressable` doesn’t automatically set attributes on the target component. Get parameters from `v.pageReference.state` and manually set them using the target component’s `init` handler.

`pageReference` provides a well-defined structure that describes the page type and its corresponding attributes. `pageReference` supports the following properties.

|Property|Type|Description|Required?|
|--------|----|-----------|---------|
|`type`|String|The API name of the `pageReference` type, for example, `standard__objectPage`.|Y|
|`attributes`|Object|Values for each attribute specified by the page definition, for example, `objectAPIName` or `actionName`.|Y|
|`state`|Object|Parameters that are tied to the query string of the URL in Lightning Experience, such as `filterName`. The routing framework doesn’t depend on `state` to render a page. Some page reference types support a standard set of `state` properties. You can also pass non-standard properties into `state` as long as they’re namespaced.| |

**Note:** Experience Builder sites don’t support the `state` property.

**See Also**  


-   [pageReference Types](https://developer.salesforce.com/docs/platform/aura-platform/guide/components-navigation-page-definitions.md)

