
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-onboarder
Advanced tools
Have you ever wanted to onboard your users to new features?
This module was built just for that. Say you've added a newly made feature that you want to draw attention to. With this module, we can create multiple "steps" to show off that feature, and it creates an overlay so you don't have to! If your item is lower on the page, we can now automatically scroll to where your feature exists.
yarn add react-onboarder
# Or if not using yarn:
npm install react-onboarder
import React from 'react';
import { Onboarder, Onboard } from 'react-onboarder';
class App extends React.Component {
render() {
return (
<div>
<NavBar />
<Onboarder delay={3000}>
<Main />
</Onboarder>
</div>
);
}
}
class Main extends React.Component {
render() {
return (
<div>
<div className="jumbotron">
<h1>Hello, world!</h1>
<p>...</p>
<Onboard step={0}>
<p><a className="btn btn-primary btn-lg" role="button">Learn more</a></p>
</Onboard>
</div>
{/* Assume we have a list of items */}
<ul className="list-group">
{items.map(this.renderItem)}
</ul>
</div>
);
}
renderItem(item, index) {
// We need to make sure we only show the Onboards for the first items, not ALL the items.
if (index === 0) {
return (
<li className="list-group-item" key={item.name}>
{item.name}
<div className="pull-right">
<Onboard step={1}>
<a className="btn btn-default" role="button">Edit</a>
</Onboard>
<Onboard step={2}>
<a className="btn btn-danger" role="button">Delete</a>
</Onboard>
</div>
</li>
);
} else {
return (
<li className="list-group-item" key={item.name}>
{item.name}
<div className="pull-right">
<a className="btn btn-default" role="button">Edit</a>
<a className="btn btn-danger" role="button">Delete</a>
</div>
</li>
);
}
}
}
| Property | Type | Default Value | Description |
|---|---|---|---|
| alpha | String | "0.3" | The amount of transparency for the overlay that is shown. Min is 0, max is 1.0. (CSS RGBA values) |
| color | String | "000000" | The hex value of the color for the overlay that is shown. (CSS RGBA values) |
| delay | Number | 0 | Amount of time to delay the highlight on react component load. |
| show | Boolean | true | Boolean to run the child highlights. If false, will show what's inside each Highlight but won't actually run the highlights. |
| Property | Type | Default Value | Description |
|---|---|---|---|
| step | Number | 0 | The queue for when a the highlight goes off. |
| time | Number | undefined | The amount of time (in milliseconds) that the highlight will show. undefined or null creates an infinite highlight. |
| scroll | Boolean | false | Boolean to automatically scroll the item into the viewport. |
| className | String | undefined | Adding additional classes for when the highlight occurs. Will not exist before and after the highlight step occurs. |
| style | Object | undefined | Adding additional style for when the highlight occurs. Will not exist before and after the highlight step occurs. |
Some items will not seem to be "highlighted". This is because the highlight really only takes into account the current item's CSS attributes. So if an item's background-color is buried back into multiple parents, then it will not show up. This is why you can add your own custom className or style to the item you're trying to highlight, which will make it be shown to your users.
Contributors are welcome! Anything to help this project get used more and more, new features or bug fixes are always welcome. Submit a PR or an issue and we can discuss what you're planning on doing.
yarn build will build the files and to use it locally in your projects.
To use this project locally, just npm link while inside this folder, and then npm link react-onboarder inside the project you want to use it in, along with the yarn build, and everything should work properly!
Be sure to write tests and make sure the linter doesn't complain.
FAQs
A tool to onboard your users to new features.
We found that react-onboarder 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.