
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-coach-mark
Advanced tools
A light weight coach mark library on react.

import { CoachMark, ICoachProps } from "react-coach-mark";
const coach: ICoachProps = {
activate: true,
component: <div>Any Component You Want</div>,
reference: ref,
tooltip: { position: 'bottom' }
};
<CoachMark {...coach} />
src folder contains demo as well as library code. Go to the lib folder from here to check the source code.
To install
npm i react-coach-mark
To contribute or play-around with the project
git clone https://github.com/hashlucifer/react-coach-mark.git
npm install
npm start
There are just 4 params you need to feed in as basic props.
activate : boolean to enable/disable the black screencomponent : Element can be any valid React Node.reference : will be react reftooltip : having position of tooltip w.r.t focused element on screen.Check out demo file here for integrations steps.
Step 1: Create and Assign ref (hooks version), it also works for class version.
const ref1 = useRef(null);
const ref2 = useRef(null);
// assign it to div
<h1 ref={ref1}>Coach Mark</h1>
<p ref={ref2}>Any ref based element</p>
Step 2: Create state and write your next/prev/skip handlers
const [activatedNumber, setActivateNumber] = useState<number>(0);
const NextButton = <button onClick={() => setActivateNumber(activatedNumber + 1)}>Next</button>;
Step 3: You control the flow, you control the components it will render.
const coachList: Array<ICoachProps> = [
{
activate: activatedNumber === 0,
component: <div>I can do this {NextButton} </div>,
reference: ref1,
tooltip: { position: 'bottom' }
},
{
activate: activatedNumber === 1,
component: <div>I can be long. {NextButton}</div>,
reference: ref2,
tooltip: { position: 'top' }
}
]
const coach : ICoachProps = coachList[activatedNumber]
Step 4: Just pass the configuration to the coach mark
<CoachMark {...coach} />

Please note that : This works individually as well by calling it twice <CoachMark {...coach1} /> and <CoachMark {...coach2} /> but it might not give smooth css transition for one focus to another.
You can override classes for your own css customization
Please feel free to connect and contribute, Happy Coding.
FAQs
A light weight coach mark library on react.
The npm package react-coach-mark receives a total of 83 weekly downloads. As such, react-coach-mark popularity was classified as not popular.
We found that react-coach-mark demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.