0.6.7 • Published 2 years ago

@leafvein/catalogue v0.6.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Catalogue

Generate a catalogue from your website content 📑

npm version

Installation

npm i @leafvein/catalogue
# or
pnpm i @leafvein/catalogue

Usage

Example

import React from 'react'
import Catalogue from '@leafvein/catalogue'
import '@leafvein/catalogue/lib/style.css'

const APP: React.FC = () => {
  return (
    <>
      <div className="doc">
        <h1>hello world</h1>
      </div>
      <Catalogue contentMark=".doc" />
    </>
  )
}

export default APP

API

PropertyDescriptionTypeDefaultVersion
contentMarkProvides a body content selector for the catalog componentstring-
contentLeftHow far is the left side of the custom catalogue from the main contentnumber20
isDebounceActivation mode of the catalogue item when scrolling the screenbooleantrue
delayTimeRolling event departure frequencynumber50ms
scrollHashWhether scrolling the page makes the hash value on the URL change with itbooleanfalse
scrollBehaviorClick on the Item of the catalogue, the scrolling behavior of the page'smooth' | 'auto''smooth'
openMoveHorizontallyWhether the catalogue component follows the body content and moves with the screen widthbooleanfalse
loadingDurationloading duration before catalogue loadsnumber500ms
diyLoadingStyleCustom loading style like {width: "100px"}objecttrue
diyLoadingChildrenCustom loading componentReactElement-
diyWrapStyleCustom Wrap style like {width: "100px"}object-
diyItemsStyleCustom Items style like {width: "100px"}object-
diyActiveItemColorCustomize Active Catalogue Item font color like "#000"string-
diyActiveItemBorderColorCustomize Active Catalogue Item border color like "#000"string-

License

MIT

0.6.7

2 years ago

0.6.6

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.6

2 years ago

0.5.5

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.4.2

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.9

2 years ago

0.2.8

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago