
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.
traitify-widgets
Advanced tools
The widgets can be installed through our CDN or npm. Usage through the CDN will maintain backwards compatibility, while the npm library will use semantic versioning.
Depending on the use-case, different IDs are required to use the widgets.
Additionally an authKey is required.
<script src="https://cdn.traitify.com/js/v3/traitify.js"></script>
<script>
Traitify.http.authKey = "Your Traitify public key";
Traitify.http.host = "https://api.traitify.com";
Traitify.options.assessmentID = "an assessment id you have generated via a server side client";
Traitify.render("#the-id-of-the-target-you-wish-to-render-to");
</script>
npm i --save traitify-widgets
import traitify from "traitify-widgets";
traitify.options.assessmentID = "an assessment id you have generated via a server side client";
traitify.render("#the-id-of-the-target-you-wish-to-render-to");
Click here to view other classes available to import, such as Http.
Click here to view available to components, such as the Results.Personality.Type.List.
Traitify.render({Survey: "#dom-id"}); // Render just the Survey in the target element
Traitify.render({Results: "#dom-id"}); // Render just the Results in the target element
This is useful if you want to get the career results server side and modify the data returned or just want to proxy through your own server.
Traitify.options.career.path = "/my-career-endpoint";
Traitify.options.career.experienceLevels = [4, 5];
Traitify.options.career.perPage = 10;
Traitify.options.career.jobs = {
inline: true, // Show the jobs in the list view, otherwise show them in the modal
path: ({career}) => career && `/my-jobs-endpoint?careerID=${career.id}`, // Can be a string or function
source: "Indeed" // If no jobs are found, a link displays to Indeed, Monster, or MyNextMove
};
Traitify.render({
"Survey": "#survey",
"Results": "#results",
"Results.Career.Container": "#careers",
"Results.Guide": "#guide",
"Results.Personality.Type.List": "#personality-types",
"Results.Personality.Trait.List": "#personality-traits"
});
import traitify, {Components} from "traitify-widgets";
export default function Personality({id}) {
return (
<Components.Container {...traitify.props} assessmentID={id}>
<Components.Results />
</Components.Container>
);
}
The widgets are capable of showing multiple kinds of surveys to users in order to satisfy benchmark requirements. To handle the event when all surveys have been finished you should use this event:
Traitify.listener.on("Surveys.finished", (surveys) => {
console.log("Surveys.finished", surveys);
});
To handle the event when each survey has been finished, maybe to record total progress in a backend system:
Traitify.listener.on("Survey.finished", ({response}) => {
console.log("Survey.finished", response);
});
Here are some other events that can be handled:
Traitify.listener.on("Survey.initialized", () => {
console.log("Survey.initialized");
});
Traitify.listener.on("Survey.updated", () => {
console.log("Survey.updated");
});
Traitify.listener.on("Survey.updateSlide", ({response}) => {
console.log("Survey.updateSlide", response);
});
Traitify.options.locale = "en-us";
// Or if the component has already been rendered
Traitify.updateLocale("en-us");
Here is a list of the available locales (en-us is the default):
zh-cnht-usnl-nlen-gben-usfr-cafr-frja-jpno-nopt-bres-ussv-seTraitify.options.survey.allowBack = true;
Traitify.options.survey.allowFullscreen = true;
Traitify.options.showHeaders = true;
Traitify.options.results.benchmarkID = benchmarkID;
Note: This differs from options.benchmarkID. A profileID and benchmarkID can be used to get an assessment with multiple recommendations. This option can be used to select one of those recommendations.
Traitify.options.perspective = "firstPerson";
OR
Traitify.options.perspective = "thirdPerson";
Traitify.options.survey.disableTimeLimit = true;
Traitify.options.report = "manager";
This report also makes use of a benchmark/recommendation. It will default to the benchmark used to create an assessment. To use a different benchmark, you can pass the ID as an option.
Traitify.options.benchmarkID = benchmarkID;
Traitify.options.report = "candidate";
Traitify.options.report = "employee";
We expose our JavaScript api client that you can use to make additional calls to our API from the client side. We make available get, put, and post functions. These methods will use the api key and url you configured when you initialized the Traitify library. Here is an example that returns career matches for a career-deck assessment. Further documentation on the API methods available can be found at https://app.traitify.com/developer/documentation.
<script src="https://cdn.traitify.com/js/v3/traitify.js"></script>
<script>
Traitify.http.authKey = "Your Traitify public key";
Traitify.http.host = "https://api.traitify.com";
const assessmentID = "an assessment id you have generated via a server side client";
Traitify.http.get(`/assessments/${assessmentID}/matches/careers`).then((matches) => {
console.log(matches);
});
</script>
npm install
npm run dev
npm run build
FAQs
Traitiy Widgets
The npm package traitify-widgets receives a total of 119 weekly downloads. As such, traitify-widgets popularity was classified as not popular.
We found that traitify-widgets demonstrated a healthy version release cadence and project activity because the last version was released less than 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
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.