1.0.7 • Published 1 year ago

@illa-design/anchor v1.0.7

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

Anchor

You can quickly find the location of the information through the anchor component.

Installation

yarn add @illa-design/anchor

Import component

import { Anchor } from "@illa-design/anchor"

API

Anchor Basic Properties

PropsDescTypeDefault
animationWhether to scroll smoothlybooleantrue
scrollContainerThe scroll containerstring | HTMLElement | Window-
boundaryThe scroll boundary value. After setting this value to a number, it will stop scrolling when it is a distance from the scroll container boundarynumber | "end" | "start" | "center" | "nearest""start"
hashWhether to change the hashbooleantrue
affixWhether to used the Affix componentbooleantrue
linelessWhether to show the left side lineboolean-

Anchor Events

PropsDescTypeDefault
onChangeCallback when the anchor changes when scrolling(newLink: string, oldLink: string) => void-
onSelectCallback when the anchor is clicked(newLink: string, oldLink: string) => void-

AnchorLink Basic Properties

PropsDescTypeDefault
hrefLink of the anchorstring"#"
titleTitle of anchor linkstringReact.ReactNode-

Example

Basic usage

<Anchor />

Set Anchor link

<Anchor>
  <AnchorLink title="anchor" href="#anchor" />
</Anchor>
1.0.7

1 year ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.9

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago