1.0.7 • Published 3 years ago

@illa-design/anchor v1.0.7

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years 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

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.9

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago