Anchor
Hyperlinks to scroll on one page.
When To Use
For displaying anchor hyperlinks on page and jumping between them.
Examples
Anchor API#
| Property | Description | Type | Default Value |
|---|---|---|---|
| Key | Parameterused to refresh links list when the key changed. | String | -- |
| ChildContent | ParameterThe content of the component. | RenderFragment | -- |
| Affix | ParameterFixed mode of Anchor | Boolean | true |
| Bounds | ParameterBounding distance of anchor area | Int32 | 5 |
| GetContainer | ParameterScrolling container | Func<String> | window |
| OffsetBottom | ParameterPixels to offset from bottom when calculating position of scroll | Int32? | -- |
| OffsetTop | ParameterPixels to offset from top when calculating position of scroll | Int32? | 0 |
| ShowInkInFixed | ParameterWhether show ink-balls in Fixed mode | Boolean | false |
| OnClick | Parameterset the handler to handle click event | EventCallback<Tuple<MouseEventArgs, AnchorLink>> | -- |
| GetCurrentAnchor | ParameterCustomize the anchor highlight | Func<String> | -- |
| TargetOffset | ParameterAnchor scroll offset, default as AntDesign.Anchor.OffsetTop |
Int32? | -- |
| OnChange | ParameterCallback executed when the anchor changes, either by click or scrolling | EventCallback<String> | -- |
| Id | ParameterID for the component's HTML | String | Uniquely Generated ID |
| Class | ParameterSpecifies one or more class names for an DOM element. | String | -- |
| Style | ParameterSpecifies an inline style for a DOM element. | String | -- |
| RefBack | ParameterA ForwardRef instance. You can get a reference to the internal DOM by using AntDesign.ForwardRef.Current. |
ForwardRef | -- |
AnchorLink API#
| Property | Description | Type | Default Value |
|---|---|---|---|
| ChildContent | ParameterAdditional content. Does not override Title. | RenderFragment | -- |
| Href | ParameterTarget of hyperlink | String | -- |
| Title | ParameterContent of hyperlink | String | -- |
| Target | ParameterSpecifies where to display the linked URL | String | -- |
| Id | ParameterID for the component's HTML | String | Uniquely Generated ID |
| Class | ParameterSpecifies one or more class names for an DOM element. | String | -- |
| Style | ParameterSpecifies an inline style for a DOM element. | String | -- |
| RefBack | ParameterA ForwardRef instance. You can get a reference to the internal DOM by using AntDesign.ForwardRef.Current. |
ForwardRef | -- |