Anchor

Hyperlinks to scroll on one page.

When To Use#

For displaying anchor hyperlinks on page and jumping between them.

import { NzAnchorModule } from 'ng-zorro-antd/anchor';

Examples

Do not change state when page is scrolling.

expand codeexpand code
Loading...

API#

nz-anchor#

PropertyDescriptionTypeDefaultGlobal Config
[nzAffix]Fixed mode of Anchorbooleantrue
[nzBounds]Bounding distance of anchor area, unit: pxnumber5
[nzOffsetTop]Pixels to offset from top when calculating position of scrollnumber0
[nzShowInkInFixed]Whether show ink-balls in Fixed modebooleanfalse
[nzContainer]Scrolling containerstring | HTMLElementwindow
(nzClick)Click of Anchor itemEventEmitter<string>-
(nzScroll)The scroll function that is triggered when scrolling to an anchor.EventEmitter<NzAnchorLinkComponent>-
PropertyDescriptionTypeDefault
[nzHref]target of hyperlinkstring-
[nzTitle]content of hyperlinkstring | TemplateRef<void>-