# Quick Start

First, let's declare some destinations, in Guia, they are called a [NavigationKey](/guia-navigation/using-guia/the-lore/navigation-key.md)

<pre class="language-kotlin"><code class="lang-kotlin"><strong>@Parcelize
</strong>class HomeKey: NavigationKey

@Parcelize
class ProfileKey(val profileId: String): NavigationKey
</code></pre>

Then we declare a [Navigator](/guia-navigation/using-guia/the-lore/navigator.md):

```kotlin
val navigator = rememberNavigator(initialKey = HomeKey()) // Initial Key is optional
```

To link a [NavigationKey](/guia-navigation/using-guia/the-lore/navigation-key.md) to a Composable we can use the `builder` parameter in `rememberNavigator`:

```kotlin
val navigator = rememberNavigator(initialKey = HomeKey()) {
    screen<HomeKey> { HomeScreen() }
    bottomSheet<ProfileKey> { key -> ProfileScreen(profileId = key.profileId) }
    dialog<DialogKey> { DialogScreen() }
}
```

Alternatively, a key can host its own Composable, called a [NavigationNode](/guia-navigation/using-guia/the-lore/navigation-node.md), then we don't need to declare it in our builder, the builder is convenient in [Multi Module projects](/guia-navigation/using-guia/the-lore/multi-module-navigation.md)

```kotlin
class DetailsBottomSheetKey(
    val item: String
) : NavigationKey.WithNode<BottomSheet> {

    override fun navigationNode() = BottomSheet {
        Text(text = "Item: $item")
    }
}
```

To get the instance of our navigator and do some navigation:

*(For a list of all default operations provided by Guia check* [*Navigation Operations*](/guia-navigation/using-guia/the-lore/navigator/navigation-operations.md)*)*

```kotlin
@Composable
fun HomeScreen() {
    val navigator = requireLocalNavigator()
    
    // On Button click or some other event
    navigator.push(ProfileKey("some_id"))
    
    // We can also go back by calling pop
    navigator.pop()
}
```

Finally we render the navigator's state:

```kotlin
navigator.NavContainer()
```

We can also add some [Transitions](/guia-navigation/using-guia/the-lore/navigator-config/transitions.md), type-safe [Results](/guia-navigation/using-guia/the-lore/results.md), [bottom-nav](/guia-navigation/using-guia/the-lore/navhost.md) behaviour and more. Check [The Lore](/guia-navigation/using-guia/the-lore.md) for more comprehensive usage of Guia.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://roudi.gitbook.io/guia-navigation/using-guia/express-lore/quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
