
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
scroll-pilot
Advanced tools
A simple React.js library that improves the accessibility of a web page. It includes a scroll indicator that tracks the user's scrolling progress and provides easy navigation options for moving between sections.
ScrollPilot is a React.js library designed to enhance web page accessibility. It provides a scroll indicator that visualizes how much a user has scrolled and offers easy navigation options for moving between sections on a web page.
You can install the ScrollPilot library using npm:
npm i scroll-pilot
Simply import the ScrollPilot from ScrollPilot
import { ScrollPilot } from 'scroll-pilot';
function App() {
return (
<div>
{/* Your content here */}
<ScrollPilot />
{/* More content */}
</div>
);
}
You can fully customize the ScrollPilot Component
// Sections list contains Label and Section ID
const sections = [
{
label: "Section 1",
section: "#section1"
},
{
label: "Section 2",
section: "#section2"
}
];
const config = {
index: sections, // Pass your sections list here
getScrollCompletionVal: (val) => {}, // Returns the value of scrolling progress (ranging between 1 - 100)
onNavClicked: (val) => {}, // Callback function triggered when the user clicks on a navigation link from the popup
aesthetics: {
icon: <>Hi !</>, // Displays an icon at the center of the indicator
tooltipTxt: "", // Shows text on hover over the indicator
location: "bottom-right", // Sets the position of the indicator and navigation popup
size: 50, // Sets the size of the indicator
hideOnScroll: true, // Hides the indicator while the user is scrolling
indicatorBackgroundColor: "#ffffff", // Sets the background color of the indicator
indicatorProgressColor: "#181818", // Sets the progress color of the indicator
margins: {
// Applies margins from the sides (e.g., if the location is "bottom-right", it will apply 80px from the bottom and right side)
desktop: 80,
mobile: 40 // Customize margins for responsive design
},
popupWidths: {
// Sets the width for the navigation popup
desktop: "200px",
mobile: "180px"
},
popupBackgroundColor: "#ffffff", // Sets the background color of the navigation popup
popupLinksColor: "#181818" // Sets the color for navigation links inside the popup
}
};
// Pass config as a prop to the component
function App() {
return (
<div>
{/* Your content here */}
<ScrollPilot config={config} />
</div>
);
}
You can add this line in the index.css file to enable smooth scrolling
html {
scroll-behavior: smooth;
}
| Attribute | Type | Default Value | Description |
|---|---|---|---|
| index | Array of objects | [] | Builds an index based on your sections and displays it in a popup when clicked on the indicator. Links will navigate to sections based on given section IDs. |
| getScrollCompletionVal() | Function | () | Provides the value (%) of the user's scrolling progress, ranging between 1 - 100. |
| onNavClicked() | Function | () | Callback function triggered when the user clicks on a navigation link from the popup. |
| icon | HTML Content | <>Hi !</> | Displays provided HTML content (e.g., text, images, SVG, and icons) at the center of the indicator. |
| location | String | "bottom-right" | Applies position to indicator, you can specify any value between these 1] top-left 2] top-right 3] bottom-left 4] bottom-right |
| tooltipTxt | String | " " | Shows the given tooltip text on hover over the indicator. |
| size | Number | 50 | The size of the indicator. The position of nav popup is calculate with size + margin value |
| hideOnScroll | Boolean | True | Hides the indicator while the user is scrolling. |
| indicatorBackgroundColor | String | #FFFFFF | Changes the background color of the indicator. |
| indicatorProgressColor | String | #181818 | Changes the circular progress color of the indicator. |
| margins | Object {desktop, mobile} | {desktop: 80, mobile: 40} | Applies margins from the sides based on the given location (e.g., "bottom-right"). Desktop and mobile attributes are provided to maintain margin based on devices. |
| popupWidths | Object {desktop, mobile} | {desktop: "200px", mobile: "180px"} | Sets the width of the navigation popup. Desktop and mobile attributes are provided to maintain width based on devices. |
| popupBackgroundColor | String | #FFFFFF | Changes the background color of the navigation popup. |
| popupLinksColor | String | #181818 | Changes the color of navigation links inside the popup. |
If you wish to contribute in repositiory, setup the dev-environment in following way
1] Clone the project
git clone https://github.com/Prasad-Katkade/Scroll-Pilot
2] Install dependancies using NPM
npm install
3] Start Coding !
Note: I plan to integrate Storybook for testing the component in the upcoming future. Until then, you can copy the component into a React project and test it accordingly.
Open for remote work opportunity ! Connect with me here
FAQs
A simple React.js library that improves the accessibility of a web page. It includes a scroll indicator that tracks the user's scrolling progress and provides easy navigation options for moving between sections.
We found that scroll-pilot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.