Skip to content
S

Scroll Into View If Needed

Element.scrollIntoView ponyfills for things like "if-needed" and "smooth"

by scroll-into-viewFree

#1457in Utilities
0In stores

Description

scroll-into-view-if-needed is a small, dependency-free ponyfill for the Element.scrollIntoView API. It adds options that are not yet in the…

Highlights

  • Ponyfill for scrollIntoView with if-needed scrolling
  • Boundary option to limit which parents scroll
  • Block and inline alignment options
  • Custom behavior functions for transitions
  • Dependency-free core package

Ratings & Reviews

No ratings yet

Be the first to rate Scroll Into View If Needed.

People also visit

A

animation-on-scroll

Create an on-scroll animation trigger using IntersectionObserver

AI Skills
Get
R

react-scroll

React scroll component

UI Libraries
Launch
L

locomotive-scroll

Comprehensive skill for Locomotive Scroll smooth scrolling library

AI Skills
Get
R

react-scrollchor

A React component for scrolling to #hash links with smooth animations

UI Libraries
Launch
U

use-scroll-animate

Compatibility alias of motionary (same build)

UI Libraries
Launch
R

react-waypoint

A React component to execute a function whenever you scroll to an element

UI Libraries
Launch

Scroll Into View If Needed FAQ

What does this package do?

It provides scrollIntoView behavior that the standard does not yet offer, such as scrolling only when an element is not fully visible.

Does it depend on other packages?

The core package has no dependencies. Smooth scrolling needs the separate add-on package.

Do I need the add-on for smooth scrolling?

Only if native smooth scrolling does not work well in your target browsers, according to the README.

Is the boundary option standard?

No. The README says it is a non-standard feature that is not in any spec.

How do I use it?

Install the package and import its scrollIntoView function in place of the built-in method.

What are the best Scroll Into View If Needed alternatives?

Popular alternatives to Scroll Into View If Needed include Scroll-Btween and SSGOI. See all Scroll Into View If Needed alternatives

Developer Stuff

Badges