Files
coco 723ce1af5c a
2026-07-03 15:12:48 +08:00

35 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Navigation models
Navigation model is a core concept of Appyx.
## What's a NavModel?
Navigation models describe navigation itself by the states and operations they define, any custom navigation mechanism can be implemented.
`NavModel` capabilities differ across implementations, however, typically:
1. They store information on the states of all children
2. They behave like a state machine
3. They offer some public API to trigger changing the state of children
## Some examples of navigation models
You can take a look at some of these examples:
1. [Back stack](backstack.md)
2. [Spotlight](spotlight.md)
3. [Tiles](tiles.md)
4. [Promoter carousel](promoter.md)
When you feel ready, you can try to [implement your own NavModel](custom.md).
## What does a NavModel not do?
The `NavModel` represents only the model, not the looks:
- UI representation depends on your `@Composable` view hosting the children See [Adding children to the view](../ui/children-view.md)
- [Transition animations](../ui/transitions.md) (if any) is a separate concern