
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
react-ajala
Advanced tools
checkout ajala.js here
## npm
npm i react-ajala
## yarn
yarn add react-ajala
##pnpm
pnpm add react-ajala
import { AjalaJourneyProvider } from "react-ajala";
import YourComponent from "./where-ever-it-kept";
import "ajala.js/dist/ajala.css";
function App() {
return (
<AjalaJourneyProvider
steps={[
{
target: ".random",
id: "1",
title: "Step 2 Title",
content: "step 2 content lorem ipson",
tooltip_placement: "left_top",
enable_target_interaction: true,
},
]}
>
<YourComponent />
</AjalaJourneyProvider>
);
}
Please note: That you only need import "ajala.js/dist/ajala.css";
when you are using ajala default tooltip, you don't need it if you provide your own CustomTooltip
component.
Property | Type | Description |
---|---|---|
steps | TStep | An array of object that's passed down as ajala.js steps, for a full description of this props please check ajala.js doc here |
options | TAjalaOptions | An object that's passed down to to customize ajala.js, for a full description of this props please check ajala.js doc here |
CustomTooltip | JSX.Element or ReactNode | A React component that get's render as ajala.js custom_tooltip , this component will accept a prop of TReactAjalaCustomTooltipProps which is the active step and an ajala instance |
CustomArrow | JSX.Element or ReactNode | A React component that get's render as ajala.js custom_arrow . |
getInstance | Function | A callback function that gets called with ajala.js instance, can be used to get ajala instance at the parent file where AjalaJourneyProvider is being used. |
react-ajala also export a useAjalaJourneyContext
hook that can be used to get ajala instance down your component tree. Please note that your component must be wrapped with AjalaJourneyProvider
to use useAjalaJourneyContext
useAjalaJourneyContext
import { useAjalaJourneyContext } from "react-ajala";
function YourComponentWrappedWithAjalaJourneyProvider() {
const ajalaInstance = useAjalaJourneyContext();
return <div> ...Some content </div>;
}
CustomTooltip
and CustomArrow
import { AjalaJourneyProvider } from "react-ajala";
import YourComponent from "./where-ever-it-kept";
import YourCustomTooltipComponent from "./where-ever-it-kept";
import YourCustomArrowComponent from "./where-ever-it-kept";
function App() {
return (
<AjalaJourneyProvider
steps={[
{
target: ".random",
id: "1",
title: "Step 2 Title",
content: "step 2 content lorem ipson",
},
]}
CustomTooltip={YourCustomTooltipComponent}
CustomArrow={YourCustomArrowComponent}
>
<YourComponent />
</AjalaJourneyProvider>
);
}
export interface TReactAjalaCustomTooltipProps {
active_step: TSteps | undefined | null;
ajala: AjalaJourney | null;
}
Feel free to submit pull requests, create issues or spread the word.
MIT © Adeyanju Adeyemi
FAQs
### A lightweight React wrapper built around ajala.js
The npm package react-ajala receives a total of 27 weekly downloads. As such, react-ajala popularity was classified as not popular.
We found that react-ajala demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.