--- url: /reference/items/AnchorNav.md --- # AnchorNav ## Usage This component can be directly imported and defined as a dependency of your application: ```js import { registerComponent } from '@studiometa/js-toolkit'; import { AnchorNav } from '@studiometa/ui'; registerComponent(AnchorNav); ``` Then in your html make sure to have similar id and href for the link and the target. ```html{16}
``` You can then add [transition options](/reference/items/Transition/js-api) on the links, and set the viewport margin of a target with `data-mount="in-view:"`: ```html{16}
```