3.0.0 • Published 5 years ago

@stellar-apps/scroll-to-link v3.0.0

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

@stellar-apps/scroll-to-link

A link component for scrolling to a particular querySelector on the page using an easing function.

Installation

yarn add @stellar-apps/scroll-to-link

Usage

import ScrollToLink from '@stellar-apps/scroll-to-link'


<ScrollToLink to='#some-id' duration={500}/>

ScrollToLink

Props

  • as {React.Component}
    • default curls/A
    • The type of Component to render the scroll link as
  • to {string}
    • The query selector to scroll to when the link is clicked. e.g. #your-cool-id
  • duration {number]
    • default 400
    • The amount of time to spend scrolling to the element defined in to
  • timing {func}
    • default BezierEasing(0.4, 0, 0.2, 1)
    • The timing function used to ease the scrolling
  • offset {number}
    • A positive or negative offset used to add a padding to the position of the element you're scrolling to. If positive, it will scroll past the element by the defined amount.
3.0.0

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago