@yiyb0603/react-scroll-progress-line
TypeScript icon, indicating that this package has built-in type declarations

0.1.0ย โ€ขย Publicย โ€ขย Published

@yiyb0603/react-scroll-progress-line

๐ŸŽ This package is a bar with the ability to show at the top how far down the current scroll point is.

Install

npm install --save @yiyb0603/react-scroll-progress-line

or

yarn add @yiyb0603/react-scroll-progress-line

Props

Name Description Type Required Default
backgroundColor Color indicating where the current scroll has not reached string O ""
progressColor A color indicating where the current scroll has reached string O ""
height ProgressLine's height string | number X 5px
customStyle Set other custom styles CSSProperties X {}
disableClick Whether to use the click-to-go event or not. boolean X false
clickCallback Function to run after click move Function X () => {}

Usage

import React from 'react'

import ScrollProgressLine from '@yiyb0603/react-scroll-progress-line'

const App = (): JSX.Element => {
  return (
    <ScrollProgressLine
      backgroundColor='gray'
      progressColor='blue'
      height='8px'
    />
  )
}

export default App

Execution

Untitled_ Jul 19, 2021 1_46 PM

License

MIT ยฉ yiyb0603

Package Sidebar

Install

npm i @yiyb0603/react-scroll-progress-line

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

30.6 kB

Total Files

12

Last publish

Collaborators

  • yiyb0603